dotnet / dotnet/systemweb-adapters

Publish list of APIs that are recommended for BannedApiAnalyzer

Open
#244 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
384
Forks
76
Avg merge
2h 24m
Merged PRs (30d)
1

Description

### Describe the bug
Migrations utilizing NoGetByIntNameValueCollection should also utilize a banned api analyzer to help prevent runtime exceptions.

### Exceptions (if any)
Platform not supported exception

### Further technical details

https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md

something like this for the banned symbols text file:
```
M:System.Collections.Specialized.NameValueCollection.Get(System.Int32);Don't use BannedType
M:System.Collections.Specialized.NameValueCollection.GetKey(System.Int32);Don't use BannedType
P:System.Collections.Specialized.NameValueCollection.Item(System.Int32);Don't use BannedType
M:System.Collections.Specialized.NameValueCollection.GetValues(System.Int32);Don't use BannedType
P:System.Collections.Specialized.NameValueCollection.Keys;Don't use BannedType
P:System.Collections.Specialized.NameObjectCollectionBase.Keys;Don't use BannedType
M:System.Collections.Specialized.NameValueCollection.#ctor(System.Collections.Specialized.NameValueCollection);Don't use BannedType
M:System.Collections.Specialized.NameValueCollection.Add(System.Collections.Specialized.NameValueCollection);Don't use BannedType
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.