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