74 references to None
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Constraints.cs (1)
120
var constraints = TypeParameterConstraintKind.
None
;
Symbols\ConstraintsHelper.cs (1)
378
if (clauses.All(clause => clause.Constraints == TypeParameterConstraintKind.
None
))
Symbols\Source\SourceNamedTypeSymbol.cs (2)
303
return (constraintKinds.Length > 0) ? constraintKinds[ordinal] : TypeParameterConstraintKind.
None
;
458
if (results.All(clause => clause.Constraints == TypeParameterConstraintKind.
None
))
Symbols\Source\SourceTypeParameterSymbol.cs (3)
577
if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.
None
)
712
if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.
None
)
723
return constraintKinds.IsEmpty ? TypeParameterConstraintKind.
None
: constraintKinds[Ordinal];
Symbols\Source\TypeParameterConstraintClause.cs (3)
73
TypeParameterConstraintKind.
None
,
89
case TypeParameterConstraintKind.
None
:
107
case TypeParameterConstraintKind.
None
:
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (62)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (10)
1494
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "A");
1498
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T");
1534
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T2");
1536
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1539
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "U2");
1541
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1546
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1548
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T4");
1551
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1553
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "U4");
Symbols\GenericConstraintTests.cs (52)
42
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
45
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA<T>");
81
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
85
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
89
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, true, false, "ValueType", "int", "int");
115
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
155
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
159
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>");
164
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
169
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>");
5137
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T", "U");
5140
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T", "I<U>", "I<object>");
5143
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>", "I<U>");
5146
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
5149
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<object>", "I<T>");
5152
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<I<U>>");
5249
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("O1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5250
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("O2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5255
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("V5").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5256
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("R1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5293
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5296
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5299
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5474
CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5476
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5478
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5480
CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5482
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5484
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5486
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5488
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5490
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5492
CheckConstraints(type.GetMethod("I<System.Object>.M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5494
CheckConstraints(type.BaseType().GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5525
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5527
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
5529
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5531
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
5593
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5596
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5599
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA");
5600
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IB");
5601
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5602
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B");
5604
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA");
5605
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IB", "IA");
5606
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A", "IA");
5607
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B", "IA");
5609
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "IA", "A");
5610
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "IB", "A");
5611
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5612
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B", "A");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
171
var constraints = TypeParameterConstraintKind.
None
;
189
var constraints = TypeParameterConstraintKind.
None
;