56 references to TypedConstant
Microsoft.CodeAnalysis (4)
MetadataReader\MetadataDecoder.cs (3)
2146
return new
TypedConstant
(type, TypedConstantKind.Error, null);
2157
return new
TypedConstant
(type, TypedConstantKind.Error, null);
2160
return new
TypedConstant
(type, kind, value);
Symbols\TypedConstant.cs (1)
35
:
this
(type, TypedConstantKind.Array, value: array.IsDefault ? null : (object)array)
Microsoft.CodeAnalysis.CSharp (52)
Binder\Binder_Attributes.cs (3)
901
return new
TypedConstant
(spread.Expression.Type, TypedConstantKind.Error, value: null);
1058
return new
TypedConstant
(type, TypedConstantKind.Error, null);
1066
return new
TypedConstant
(type, typedConstantKind, simpleValue);
Emitter\Model\PEAssemblyBuilder.cs (1)
381
[new
TypedConstant
(Compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, markerName)],
Emitter\Model\PEModuleBuilder.cs (5)
1743
var value = flagsBuilder.SelectAsArray((flag, byteType) => new
TypedConstant
(byteType, TypedConstantKind.Primitive, flag), byteType);
1765
ImmutableArray.Create(new
TypedConstant
(byteType, TypedConstantKind.Primitive, nullableValue)));
1785
ImmutableArray.Create(new
TypedConstant
(Compilation.GetSpecialType(SpecialType.System_Byte), TypedConstantKind.Primitive, value)));
1827
var transformFlags = builder.SelectAsArray((flag, constantType) => new
TypedConstant
(constantType, TypedConstantKind.Primitive, flag), booleanType);
1927
[new
TypedConstant
(Compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, markerName)]);
Emitter\NoPia\EmbeddedType.cs (2)
279
ImmutableArray.Create(new
TypedConstant
(stringType, TypedConstantKind.Primitive, guidString),
280
new
TypedConstant
(stringType, TypedConstantKind.Primitive,
Emitter\NoPia\EmbeddedTypesManager.cs (1)
189
ImmutableArray.Create(new
TypedConstant
(ctor.Parameters[0].Type, TypedConstantKind.Type, ctor.ContainingAssembly.GetSpecialType(SpecialType.System_Object))),
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
157
new
TypedConstant
(manager.System_Diagnostics_DebuggerBrowsableState, TypedConstantKind.Enum, DebuggerBrowsableState.Never))));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
224
arguments: ImmutableArray.Create(new
TypedConstant
(Manager.System_String, TypedConstantKind.Primitive, displayString)),
227
new
TypedConstant
(Manager.System_String, TypedConstantKind.Primitive, "<Anonymous Type>"))));
Symbols\Compilation_WellKnownMembers.cs (13)
477
new
TypedConstant
(systemByte, TypedConstantKind.Primitive, scale),
478
new
TypedConstant
(systemByte, TypedConstantKind.Primitive, (byte)(isNegative ? 128 : 0)),
479
new
TypedConstant
(systemUnit32, TypedConstantKind.Primitive, high),
480
new
TypedConstant
(systemUnit32, TypedConstantKind.Primitive, mid),
481
new
TypedConstant
(systemUnit32, TypedConstantKind.Primitive, low)
487
var ticks = new
TypedConstant
(GetSpecialType(SpecialType.System_Int64), TypedConstantKind.Primitive, value.Ticks);
502
ImmutableArray.Create(new
TypedConstant
(
805
var typedConstantDebugMode = new
TypedConstant
(debuggingModesType, TypedConstantKind.Enum, constantVal);
858
new
TypedConstant
(attributeTargetsType, TypedConstantKind.Enum, targets));
860
new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__AllowMultiple, new
TypedConstant
(boolType, TypedConstantKind.Primitive, allowMultiple)),
861
new KeyValuePair<WellKnownMember, TypedConstant>(WellKnownMember.System_AttributeUsageAttribute__Inherited, new
TypedConstant
(boolType, TypedConstantKind.Primitive, inherited)));
891
new
TypedConstant
(constantType, TypedConstantKind.Primitive, name), stringType);
938
var result = flagsBuilder.SelectAsArray((flag, constantType) => new
TypedConstant
(constantType, TypedConstantKind.Primitive, flag), booleanType);
Symbols\MethodSymbol.cs (4)
1298
new
TypedConstant
(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.RequiredMembersMarker), // message
1299
new
TypedConstant
(declaringCompilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)) // error
1304
ImmutableArray.Create(new
TypedConstant
(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RequiredMembers)))
1318
[new
TypedConstant
(declaringCompilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.ClosedClasses))]));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1256
return new
TypedConstant
(newConstantType, oldConstant.Kind, newConstantValue);
Symbols\Source\SourceAssemblySymbol.cs (6)
1829
var typedConstantRequestMinimum = new
TypedConstant
(securityActionType, TypedConstantKind.Enum, constantValue);
1835
var typedConstantTrue = new
TypedConstant
(boolType, TypedConstantKind.Primitive, value: true);
1975
var typedConstantNoStringInterning = new
TypedConstant
(int32Type, TypedConstantKind.Primitive, Cci.Constants.CompilationRelaxations_NoStringInterning);
1994
var typedConstantTrue = new
TypedConstant
(boolType, TypedConstantKind.Primitive, value: true);
2028
var typedConstant = new
TypedConstant
(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyContainer);
2038
var typedConstant = new
TypedConstant
(stringType, TypedConstantKind.Primitive, _compilation.Options.CryptoKeyFile);
Symbols\Source\SourceFixedFieldSymbol.cs (2)
48
var item1 = new
TypedConstant
(systemType, TypedConstantKind.Type, ((PointerTypeSymbol)this.Type).PointedAtType);
49
var item2 = new
TypedConstant
(intType, TypedConstantKind.Primitive, this.FixedSize);
Symbols\Source\SourceMethodSymbol.cs (2)
183
var arg = new
TypedConstant
(compilation.GetWellKnownType(WellKnownType.System_Type),
277
ImmutableArray.Create(new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.UserDefinedCompoundAssignmentOperators)))
Symbols\Source\SourceModuleSymbol.cs (3)
680
var version = ImmutableArray.Create(new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, 11));
686
var version = ImmutableArray.Create(new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, CSharpCompilationOptions.UpdatedMemorySafetyRulesVersion));
693
new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, _assemblySymbol.InternalsAreVisible));
Symbols\Source\SourceNamedTypeSymbol.cs (5)
1766
new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, PEModule.ByRefLikeMarker), // message
1767
new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_Boolean), TypedConstantKind.Primitive, true)), // error=true
1772
ImmutableArray.Create(new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, nameof(CompilerFeatureRequiredFeatures.RefStructs))),
1785
var defaultMemberNameConstant = new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_String), TypedConstantKind.Primitive, defaultMemberName);
1828
ImmutableArray.Create(new
TypedConstant
(compilation.GetWellKnownType(WellKnownType.System_Type), TypedConstantKind.Type, originalType)),
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
213
arguments: ImmutableArray.Create(new
TypedConstant
(compilation.GetSpecialType(SpecialType.System_Int32), TypedConstantKind.Primitive, _arrayLength)),