123 instantiations of DisallowNull
aspire (1)
Certificates\CertificateGeneration\MacOSCertificateManager.cs (1)
427int IEqualityComparer<X509Certificate2>.GetHashCode([DisallowNull] X509Certificate2 obj) =>
Aspire.Dashboard (2)
Otlp\Model\OtlpInstrument.cs (1)
142public int GetHashCode([DisallowNull] ReadOnlyMemory<KeyValuePair<string, string>> obj)
Otlp\Model\OtlpResource.cs (1)
349public int GetHashCode([DisallowNull] KeyValuePair<string, string>[] obj)
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (1)
49int IEqualityComparer<TSyntaxNode>.GetHashCode([DisallowNull] TSyntaxNode obj)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposable.cs (1)
319[DisallowNull]
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
112 [DisallowNull]
Microsoft.CodeAnalysis (10)
Compilation\Compilation.cs (1)
1882internal bool FilterAndAppendAndFreeDiagnostics(DiagnosticBag accumulator, [DisallowNull] ref DiagnosticBag? incoming, CancellationToken cancellationToken)
Operations\ControlFlowGraphBuilder.cs (4)
406void dispatchException([DisallowNull] ControlFlowRegion? fromRegion) 1022RegionBuilder? tryGetImplicitEntryRegion(BasicBlockBuilder block, [DisallowNull] RegionBuilder? currentRegion) 1156void collectAncestorsAndSelf([DisallowNull] RegionBuilder? from, [NotNull] ref ArrayBuilder<RegionBuilder>? builder) 5550void handleCase(ICaseClauseOperation caseClause, BasicBlockBuilder body, [DisallowNull] BasicBlockBuilder? nextCase)
Operations\OperationMapBuilder.cs (1)
35public override object? VisitBinaryOperator([DisallowNull] IBinaryOperation? operation, Dictionary<SyntaxNode, IOperation> argument)
SourceGeneration\UserFunction.cs (1)
48public int GetHashCode([DisallowNull] T obj)
Symbols\Attributes\CommonMethodEarlyWellKnownAttributeData.cs (1)
80[DisallowNull]
Symbols\Attributes\CommonPropertyEarlyWellKnownAttributeData.cs (2)
17[DisallowNull] 42[DisallowNull]
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Operators.cs (1)
3971public int GetHashCode([DisallowNull] MethodSymbol method)
BoundTree\UnboundLambda.cs (1)
1489public int GetHashCode([DisallowNull] (NamedTypeSymbol Type, bool IsExpressionTree) obj)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
1111void storeExpressionIfNotConstant([DisallowNull] ref BoundExpression? expression, ArrayBuilder<LocalSymbol> localsBuilder, ArrayBuilder<BoundExpression> sideEffectsBuilder)
Symbols\MethodSymbol.cs (1)
1072static bool isGenericMethod([DisallowNull] MethodSymbol? method)
Microsoft.CodeAnalysis.CSharp.Features (2)
ConvertToExtension\ExtensionMethodEqualityComparer.cs (2)
59public int GetHashCode([DisallowNull] AttributeData obj) 110public int GetHashCode([DisallowNull] ITypeParameterSymbol obj)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
359private static SyntaxNode? GetTopContainingNode([DisallowNull] SyntaxNode? node)
Microsoft.CodeAnalysis.Features (2)
Completion\CompletionService.ProviderManager.cs (1)
246int IEqualityComparer<ImmutableHashSet<string>>.GetHashCode([DisallowNull] ImmutableHashSet<string> obj)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
4252public int GetHashCode([DisallowNull] SemanticEditInfo obj)
Microsoft.CodeAnalysis.Workspaces (8)
CodeFixes\ExportCodeFixProviderAttribute.cs (1)
29[DisallowNull]
CodeRefactorings\ExportCodeRefactoringProviderAttribute.cs (1)
27[DisallowNull]
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (1)
49int IEqualityComparer<TSyntaxNode>.GetHashCode([DisallowNull] TSyntaxNode obj)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposable.cs (1)
319[DisallowNull]
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
340[DisallowNull] 349[DisallowNull]
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (1)
36[DisallowNull]
Workspace\Solution\SolutionState.CachingFilePathComparer.cs (1)
51public int GetHashCode([DisallowNull] string obj)
Microsoft.DotNet.ApiCompatibility (4)
Comparing\AttributeDataEqualityComparer.cs (1)
16public int GetHashCode([DisallowNull] AttributeData obj) => throw new NotImplementedException();
Comparing\NamedArgumentComparer.cs (1)
15public int GetHashCode([DisallowNull] KeyValuePair<string, TypedConstant> obj) => throw new NotImplementedException();
Comparing\SymbolEqualityComparer.cs (1)
20public int GetHashCode([DisallowNull] ISymbol obj) => GetKey(obj).GetHashCode();
Comparing\TypedConstantEqualityComparer.cs (1)
15public int GetHashCode([DisallowNull] TypedConstant obj) => throw new NotImplementedException();
Microsoft.Extensions.Configuration (2)
ChainedConfigurationSource.cs (1)
16[DisallowNull]
StreamConfigurationSource.cs (1)
17[DisallowNull]
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationSource.cs (1)
24[DisallowNull]
Microsoft.Extensions.DependencyInjection (3)
ServiceLookup\CallSiteFactory.cs (2)
889[DisallowNull] 892[DisallowNull]
ServiceLookup\CallSiteValidator.cs (1)
116[DisallowNull]
Microsoft.Extensions.FileProviders.Physical (2)
PollingFileChangeToken.cs (1)
74[DisallowNull]
PollingWildCardChangeToken.cs (1)
71[DisallowNull]
Microsoft.Extensions.Http (2)
DefaultHttpMessageHandlerBuilder.cs (1)
23[DisallowNull]
HttpMessageHandlerBuilder.cs (1)
30[DisallowNull]
NuGet.CommandLine.XPlat (1)
Commands\Package\PackageWithVersionRange.cs (1)
85public int GetHashCode([DisallowNull] PackageWithVersionRange obj)
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\Schema\ColumnAttribute.cs (1)
57[DisallowNull]
System\ComponentModel\DataAnnotations\Schema\TableAttribute.cs (1)
35[DisallowNull]
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
149[DisallowNull]
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
126[DisallowNull]
System.ComponentModel.TypeConverter (1)
System\ComponentModel\TypeDescriptor.cs (1)
2579[DisallowNull]
System.Data.Common (3)
System\Data\DataViewManager.cs (1)
44[DisallowNull]
System\Data\DataViewSettingCollection.cs (1)
89[DisallowNull]
System\Data\DBConcurrencyException.cs (1)
47[DisallowNull]
System.DirectoryServices (2)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (1)
347[DisallowNull]
System\DirectoryServices\SortOption.cs (1)
26[DisallowNull]
System.Net.Http (2)
System\Net\Http\DelegatingHandler.cs (1)
19[DisallowNull]
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
65[DisallowNull]
System.Net.HttpListener (1)
System\Net\HttpListener.cs (1)
57[DisallowNull]
System.Net.Mail (5)
System\Net\Mail\MailMessage.cs (2)
69[DisallowNull] 83[DisallowNull]
System\Net\Mail\MailPriority.cs (2)
78[DisallowNull] 226[DisallowNull]
System\Net\Mail\SmtpClient.cs (1)
145[DisallowNull]
System.Net.Requests (3)
System\Net\FtpWebRequest.cs (2)
288[DisallowNull] 311[DisallowNull]
System\Net\WebRequest.cs (1)
451[DisallowNull]
System.Net.Sockets (2)
System\Net\Sockets\Socket.cs (1)
584[DisallowNull]
System\Net\Sockets\TCPClient.cs (1)
347[DisallowNull]
System.Private.CoreLib (12)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (5)
61public abstract int GetHashCode([DisallowNull] T obj); 123public override int GetHashCode([DisallowNull] T obj) => 155public override int GetHashCode([DisallowNull] T obj) => 224public override int GetHashCode([DisallowNull] T obj) => 323public override int GetHashCode([DisallowNull] string obj) => obj?.GetHashCode() ?? 0;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IEqualityComparer.cs (1)
14int GetHashCode([DisallowNull] T obj);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (1)
408public int GetHashCode([DisallowNull] T obj)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\FastResourceComparer.cs (1)
25public int GetHashCode([DisallowNull] string? key)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
541public static void StructureToPtr<T>([DisallowNull] T structure, IntPtr ptr, bool fDeleteOld) 590public static void PtrToStructure<T>(IntPtr ptr, [DisallowNull] T structure)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.NoCom.cs (1)
88public static IntPtr GetComInterfaceForObject<T, TInterface>([DisallowNull] T o)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
255public static ComVariant Create<T>([DisallowNull] T value)
System.Private.DataContractSerialization (1)
System\Xml\XmlBaseWriter.cs (1)
2484[DisallowNull]
System.Private.Windows.Core (1)
System\Collections\Specialized\CompatibleIComparer.cs (1)
15public int GetHashCode([DisallowNull] string obj)
System.Private.Windows.Core.TestUtilities (1)
XUnit\FloatingPointToleranceComparerer.cs (1)
22public int GetHashCode([DisallowNull] T obj) => obj.GetHashCode();
System.Private.Xml (6)
System\Xml\Schema\BaseValidator.cs (1)
129[DisallowNull]
System\Xml\Schema\XmlSchemaDocumentation.cs (1)
26[DisallowNull]
System\Xml\Schema\XmlSchemaValidator.cs (1)
280[DisallowNull]
System\Xml\Serialization\CodeGenerator.cs (1)
1595[DisallowNull]
System\Xml\Serialization\Mappings.cs (1)
495[DisallowNull]
System\Xml\Xsl\QIL\QilReference.cs (1)
42[DisallowNull]
System.Resources.Extensions (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\FastResourceComparer.cs (1)
25public int GetHashCode([DisallowNull] string? key)
System.Security.Cryptography (1)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (1)
105[DisallowNull]
System.Security.Cryptography.Xml (3)
System\Security\Cryptography\Xml\CipherData.cs (2)
36[DisallowNull] 52[DisallowNull]
System\Security\Cryptography\Xml\EncryptionProperty.cs (1)
40[DisallowNull]
System.Speech (12)
Internal\Synthesis\VoiceSynthesis.cs (1)
1184private TTSVoice? MatchVoice(CultureInfo? culture, VoiceGender gender, VoiceAge age, int variant, bool switchContext, [DisallowNull] ref InstalledVoice? viDefault)
Recognition\Grammar.cs (1)
581[DisallowNull]
Recognition\SrgsGrammar\SrgsNameValueTag.cs (2)
38[DisallowNull] 54[DisallowNull]
Recognition\SrgsGrammar\SrgsToken.cs (2)
49[DisallowNull] 63[DisallowNull]
Synthesis\TTSEngine\TTSEngineTypes.cs (6)
220[DisallowNull] public SayAs? SayAs { get { return _sayAs; } internal set { ArgumentNullException.ThrowIfNull(value); _sayAs = value; } } 221[DisallowNull] public Prosody? Prosody { get { return _prosody; } internal set { ArgumentNullException.ThrowIfNull(value); _prosody = value; } } 222[DisallowNull] public char[]? Phoneme { get { return _phoneme; } internal set { ArgumentNullException.ThrowIfNull(value); _phoneme = value; } } 413[DisallowNull] public string? InterpretAs { get { return _interpretAs; } set { Helpers.ThrowIfEmptyOrNull(value, nameof(value)); _interpretAs = value; } } 414[DisallowNull] public string? Format { get { return _format; } set { Helpers.ThrowIfEmptyOrNull(value, nameof(value)); _format = value; } } 415[DisallowNull] public string? Detail { get { return _detail; } set { Helpers.ThrowIfEmptyOrNull(value, nameof(value)); _detail = value; } }
System.Text.Json (4)
System\Text\Json\Serialization\Converters\CastingConverter.cs (1)
92public override void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options)
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (1)
16public sealed override void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options)
System\Text\Json\Serialization\JsonConverterOfT.cs (2)
640public virtual void WriteAsPropertyName(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options) 652internal virtual void WriteAsPropertyNameCore(Utf8JsonWriter writer, [DisallowNull] T value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.cs (2)
245[CLSCompliant(false), DisallowNull] 261[CLSCompliant(false), DisallowNull]
System.Transactions.Local (1)
System\Transactions\TransactionManager.cs (1)
105[DisallowNull]
System.Windows.Forms (5)
System\Windows\Forms\Controls\ListControl\ListControl.cs (1)
353[DisallowNull]
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1184[DisallowNull]
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
524[DisallowNull]
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
501[DisallowNull]
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
973[DisallowNull]
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\ComponentCache.cs (1)
45[DisallowNull]
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
70[DisallowNull]
8 references to DisallowNull
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!);
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
274=> compilation.GetTypeByMetadataName(typeof(DisallowNullAttribute).FullName!);
mscorlib (1)
mscorlib.cs (1)
60[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
netstandard (1)
netstandard.cs (1)
620[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
132[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
System.Text.Json (3)
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
812/// <see cref="AllowNullAttribute"/> and <see cref="DisallowNullAttribute"/>.
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (1)
68/// from attributes such as <see cref="AllowNullAttribute"/> or <see cref="DisallowNullAttribute"/>.
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
274/// from attributes such as <see cref="AllowNullAttribute"/> or <see cref="DisallowNullAttribute"/>.