184 references to None
ConfigurationSchemaGenerator (5)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (3)
87ITypeSymbol? type = ResolveType(instanceArg.Value)?.WithNullableAnnotation(NullableAnnotation.None); 155type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None); 205type = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
28ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
72ITypeSymbol? typeSymbol = targetMethod.TypeArguments[0].WithNullableAnnotation(NullableAnnotation.None);
Microsoft.CodeAnalysis (6)
Compilation\Compilation.cs (1)
1084public IArrayTypeSymbol CreateArrayTypeSymbol(ITypeSymbol elementType, int rank = 1, NullableAnnotation elementNullableAnnotation = NullableAnnotation.None)
Symbols\IMethodSymbol.cs (1)
111/// then <see cref="NullableAnnotation.None"/> is returned.
Symbols\INamedTypeSymbol.cs (1)
85/// then <see cref="NullableAnnotation.None"/> is returned for that type argument.
Symbols\ITypeParameterSymbol.cs (1)
53/// constraint, this returns <see cref="NullableAnnotation.None"/>.
Symbols\ITypeSymbol.cs (1)
188/// Nullable annotation associated with the type, or <see cref="NullableAnnotation.None"/> if there are none.
Symbols\NullableFlowState.cs (1)
44return CodeAnalysis.NullableAnnotation.None;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
105(NullableAnnotation.None, NullableAnnotation.NotAnnotated) => true, 106(NullableAnnotation.NotAnnotated, NullableAnnotation.None) => true,
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
337NullableAnnotation nullableAnnotation = NullableAnnotation.None, 358public static IArrayTypeSymbol CreateArrayTypeSymbol(ITypeSymbol elementType, int rank = 1, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 429NullableAnnotation nullableAnnotation = NullableAnnotation.None, 448NullableAnnotation nullableAnnotation = NullableAnnotation.None, 473NullableAnnotation nullableAnnotation = NullableAnnotation.None)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
83protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None)
Microsoft.CodeAnalysis.CSharp (12)
BoundTree\BoundNode.cs (2)
249CodeAnalysis.NullableAnnotation.None => BoundNodeAttributes.TopLevelNone, 286BoundNodeAttributes.TopLevelNone => CodeAnalysis.NullableAnnotation.None,
Symbols\MethodSymbol.cs (1)
1146RequiresInstanceReceiver ? CodeAnalysis.NullableAnnotation.NotAnnotated : CodeAnalysis.NullableAnnotation.None;
Symbols\NullableAnnotationExtensions.cs (4)
93if (annotation == CodeAnalysis.NullableAnnotation.None) 138NullableAnnotation.Oblivious => CodeAnalysis.NullableAnnotation.None, 140NullableAnnotation.Ignored => CodeAnalysis.NullableAnnotation.None, 151CodeAnalysis.NullableAnnotation.None => CSharp.NullableAnnotation.Oblivious,
Symbols\PublicModel\NamedTypeSymbol.cs (1)
17public NamedTypeSymbol(CodeAnalysis.NullableAnnotation nullableAnnotation = CodeAnalysis.NullableAnnotation.None)
Symbols\PublicModel\TypeParameterSymbol.cs (2)
38false when !_underlying.HasReferenceTypeConstraint => CodeAnalysis.NullableAnnotation.None, 41null => CodeAnalysis.NullableAnnotation.None,
Symbols\PublicModel\TypeSymbol.cs (2)
69(NullableAnnotation != CodeAnalysis.NullableAnnotation.None && otherType.NullableAnnotation != CodeAnalysis.NullableAnnotation.None)) &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
61NullableAnnotation.None => NullableSyntaxAnnotationEx.Oblivious,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
CodeGen\CodeGenTupleTest.cs (8)
6807elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)); 6820elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6845tuple2 = comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.None, 9)); 6876elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None)); 6889elementNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableAnnotation.None)); 6914tuple2 = comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.None, 9));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (24)
Semantics\LambdaDiscardParametersTests.cs (1)
71VerifyDiscardParameterSymbol(underscores[1], "System.String", CodeAnalysis.NullableAnnotation.None, model);
Semantics\NativeIntegerTests.cs (1)
1627Assert.Same(underlyingType, ((INamedTypeSymbol)type.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None)).NativeIntegerUnderlyingType);
Semantics\NullableContextTests.cs (5)
2079VerifySpeculativeSemanticModel(source, null, "string", Microsoft.CodeAnalysis.NullableAnnotation.None); 2106VerifySpeculativeSemanticModel(source, null, "string", Microsoft.CodeAnalysis.NullableAnnotation.None); 2125VerifySpeculativeSemanticModel(source, null, "string", Microsoft.CodeAnalysis.NullableAnnotation.None); 2156VerifySpeculativeSemanticModel(source, null, "string", Microsoft.CodeAnalysis.NullableAnnotation.None); 2216Microsoft.CodeAnalysis.NullableAnnotation.None;
Semantics\NullableReferenceTypesTests.cs (17)
71926Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfoAndVerifyIOperation(discard1.Designation).Nullability.Annotation); 71928Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard1).Nullability.Annotation); 71937Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard2).Nullability.Annotation); 71966Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern1).Nullability.Annotation); 71972Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern2).Nullability.Annotation); 138243Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138287Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138327Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138335Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138375Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138383Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138412Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138442Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138472Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 138500Assert.Equal(CodeAnalysis.NullableAnnotation.None, cT.GetPublicSymbol().ReferenceTypeConstraintNullableAnnotation); 155999Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[1]).Nullability.Annotation); 156001Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[3]).Nullability.Annotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (83)
Compilation\CompilationAPITests.cs (26)
2465Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementNullableAnnotation); 2466Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2473Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementNullableAnnotation); 2474Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2481Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementNullableAnnotation); 2482Assert.Equal(CodeAnalysis.NullableAnnotation.None, arrayType.ElementType.NullableAnnotation); 2492Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType).ElementNullableAnnotation); 2493Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType).ElementType.NullableAnnotation); 2494Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementNullableAnnotation); 2495Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation); 2496Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementNullableAnnotation); 2497Assert.Equal(CodeAnalysis.NullableAnnotation.None, comp.CreateArrayTypeSymbol(elementType, elementNullableAnnotation: CodeAnalysis.NullableAnnotation.None).ElementType.NullableAnnotation); 2703AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, GetAnonymousTypeNullableAnnotations(type)); 3039AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations); 3040AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations()); 3074AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations); 3075AssertEx.Equal(new[] { CodeAnalysis.NullableAnnotation.None, CodeAnalysis.NullableAnnotation.None }, type.TypeArgumentNullableAnnotations());
Compilation\SemanticModelAPITests.cs (6)
4493Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4494Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation); 4557Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4558Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation); 4571Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4572Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation);
Compilation\TypeInfoTests.cs (8)
42EqualityTesting.AssertEqual(new TypeInfo(int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), default, default), 43new TypeInfo(int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), default, default)); 47EqualityTesting.AssertEqual(new TypeInfo(intEnum1.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), default, default), 48new TypeInfo(intEnum2.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), int32.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), default, default));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1568c.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None),
Symbols\Source\NullablePublicAPITests.cs (34)
160PublicNullableAnnotation.None, 227PublicNullableAnnotation.None, 299PublicNullableAnnotation.None, 387PublicNullableAnnotation.None, 482PublicNullableAnnotation.None, 484PublicNullableAnnotation.None, 494PublicNullableAnnotation.None, 576Assert.Equal(PublicNullableAnnotation.None, method.ReceiverNullableAnnotation); 577Assert.Equal(PublicNullableAnnotation.None, method.ReceiverType.NullableAnnotation); 587PublicNullableAnnotation.None, 648PublicNullableAnnotation.None, 706PublicNullableAnnotation.None, 770PublicNullableAnnotation.None, 771PublicNullableAnnotation.None, 835PublicNullableAnnotation.None, 903PublicNullableAnnotation.None, 904PublicNullableAnnotation.None, 960PublicNullableAnnotation.None, 961PublicNullableAnnotation.None, 1018PublicNullableAnnotation.None, 1019PublicNullableAnnotation.None, 1674Assert.Equal(PublicNullableAnnotation.None, type.Nullability.Annotation); 1717Assert.Equal(PublicNullableAnnotation.None, type.Nullability.Annotation); 2929Assert.Equal(PublicNullableAnnotation.None, typeInfo.Type.NullableAnnotation); 3114Assert.Equal(PublicNullableAnnotation.None, ((IMethodSymbol)symbol).TypeArgumentNullableAnnotations[0]); 3115Assert.Equal(PublicNullableAnnotation.None, ((IMethodSymbol)symbol).TypeArguments[0].NullableAnnotation); 4400Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation); 4430Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation); 4555Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation); 4613Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation); 4677Assert.Equal(PublicNullableAnnotation.None, ((ITypeSymbol)symbol2.Symbol).NullableAnnotation); 5191test(SemanticModelOptions.DisableNullableAnalysis, expectedAnnotation: PublicNullableAnnotation.None); 5236Assert.Equal(PublicNullableAnnotation.None, typeInfo.Type.NullableAnnotation); 5468Assert.Equal(PublicNullableAnnotation.None, type.ElementNullableAnnotation);
Symbols\SymbolEqualityTests.cs (8)
252VerifyEquality(type1.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), type2.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), 260VerifyEquality(type1, type2.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), 264VerifyEquality(type1.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), type2, 488VerifyEquality(type1.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), type2.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), 496VerifyEquality(type1, type2.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), 500VerifyEquality(type1.WithNullableAnnotation(CodeAnalysis.NullableAnnotation.None), type2,
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
61NullableAnnotation.None => NullableSyntaxAnnotationEx.Oblivious,
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Utilities\SymbolEquivalenceComparerTests.cs (3)
1419Assert.Equal(NullableAnnotation.None, a1.NullableAnnotation); 1482Assert.Equal(NullableAnnotation.None, a1.NullableAnnotation); 1545Assert.Equal(NullableAnnotation.None, a1.NullableAnnotation);
Microsoft.CodeAnalysis.Features (1)
GenerateType\AbstractGenerateTypeService.State.cs (1)
258BaseTypeOrInterfaceOpt = (INamedTypeSymbol)baseType.WithNullableAnnotation(NullableAnnotation.None);
Microsoft.CodeAnalysis.VisualBasic (13)
Symbols\ArrayTypeSymbol.vb (1)
414Return NullableAnnotation.None
Symbols\EventSymbol.vb (1)
286Return NullableAnnotation.None
Symbols\FieldSymbol.vb (1)
478Return NullableAnnotation.None
Symbols\MethodSymbol.vb (3)
979Return NullableAnnotation.None 1094Return NullableAnnotation.None 1118Return Me.TypeArguments.SelectAsArray(Function(t) NullableAnnotation.None)
Symbols\NamedTypeSymbol.vb (1)
1383Return Me.TypeArgumentsNoUseSiteDiagnostics.SelectAsArray(Function(t) NullableAnnotation.None)
Symbols\ParameterSymbol.vb (1)
332Return NullableAnnotation.None
Symbols\PropertySymbol.vb (1)
623Return NullableAnnotation.None
Symbols\Source\LocalSymbol.vb (1)
403Return NullableAnnotation.None
Symbols\TypeParameterSymbol.vb (2)
371Return NullableAnnotation.None 401Return Me.ConstraintTypesNoUseSiteDiagnostics.SelectAsArray(Function(t) NullableAnnotation.None)
Symbols\TypeSymbol.vb (1)
774Return NullableAnnotation.None
Microsoft.CodeAnalysis.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
105(NullableAnnotation.None, NullableAnnotation.NotAnnotated) => true, 106(NullableAnnotation.NotAnnotated, NullableAnnotation.None) => true,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (5)
337NullableAnnotation nullableAnnotation = NullableAnnotation.None, 358public static IArrayTypeSymbol CreateArrayTypeSymbol(ITypeSymbol elementType, int rank = 1, NullableAnnotation nullableAnnotation = NullableAnnotation.None) 429NullableAnnotation nullableAnnotation = NullableAnnotation.None, 448NullableAnnotation nullableAnnotation = NullableAnnotation.None, 473NullableAnnotation nullableAnnotation = NullableAnnotation.None)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
83protected IEnumerable<TypeInferenceInfo> CreateResult(SpecialType type, NullableAnnotation nullableAnnotation = NullableAnnotation.None)
Microsoft.Extensions.Options.SourceGeneration (6)
Parser.cs (6)
90_ = _visitedModelTypes.Add(modelType.WithNullableAnnotation(NullableAnnotation.None)); 392else if (!_visitedModelTypes.Add(memberType.WithNullableAnnotation(NullableAnnotation.None))) 406_ = _visitedModelTypes.Remove(memberType.WithNullableAnnotation(NullableAnnotation.None)); 455else if (!_visitedModelTypes.Add(enumeratedType.WithNullableAnnotation(NullableAnnotation.None))) 469_ = _visitedModelTypes.Remove(enumeratedType.WithNullableAnnotation(NullableAnnotation.None)); 686var mt = modelType.WithNullableAnnotation(NullableAnnotation.None);
Microsoft.Gen.Logging (4)
Parsing\Parser.TagProvider.cs (4)
163if (SymbolEqualityComparer.Default.Equals(type.WithNullableAnnotation(NullableAnnotation.None), target.WithNullableAnnotation(NullableAnnotation.None))) 170if (SymbolEqualityComparer.Default.Equals(target.WithNullableAnnotation(NullableAnnotation.None), iface.WithNullableAnnotation(NullableAnnotation.None)))
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
50type = type.WithNullableAnnotation(NullableAnnotation.None);