25 references to Create
Microsoft.CodeAnalysis (3)
ConstantValue.cs (1)
393
case ConstantValueTypeDiscriminator.String: return
Create
((string)value);
MetadataReader\MetadataDecoder.cs (1)
1127
return ConstantValue.
Create
(sigReader.ReadUTF16(sigReader.RemainingBytes));
MetadataReader\PEModule.cs (1)
3749
return ConstantValue.
Create
(reader.ReadUTF16(reader.Length));
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_InterpolatedString.cs (3)
47
resultConstant = ConstantValue.
Create
(string.Empty);
414
expressions[0] = new BoundLiteral(syntax, ConstantValue.
Create
(formatString.ToStringAndFree()), GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_String, diagnostics, syntax)) { WasCompilerGenerated = true };
955
argumentsBuilder.Add(boundLiteral.Update(ConstantValue.
Create
(literalText), boundLiteral.Type));
Binder\Binder_Invocation.cs (4)
1691
defaultValue = new BoundLiteral(syntax, ConstantValue.
Create
(path), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
1696
defaultValue = new BoundLiteral(syntax, ConstantValue.
Create
(memberName), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
1705
defaultValue = new BoundLiteral(syntax, ConstantValue.
Create
(argument.Syntax.ToString()), Compilation.GetSpecialType(SpecialType.System_String)) { WasCompilerGenerated = true };
2349
return new BoundNameOfOperator(node, boundArgument, ConstantValue.
Create
(name), Compilation.GetSpecialType(SpecialType.System_String));
CodeGen\EmitStatement.cs (1)
1470
stringJumpTable.StringCaseLabels.Select(p => new KeyValuePair<ConstantValue, object>(ConstantValue.
Create
(p.value), p.label)).ToArray(),
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (1)
98
f.StringLiteral(ConstantValue.
Create
(errorCode.GetExceptionMessage())),
Lowering\SyntheticBoundNodeFactory.cs (2)
1150
var stringConst = ConstantValue.
Create
(value);
1162
return StringLiteral(ConstantValue.
Create
(stringValue));
Utilities\ValueSetFactory.StringTC.cs (1)
44
ConstantValue IEquatableValueTC<string>.ToConstantValue(string value) => ConstantValue.
Create
(value);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\ConstantTests.cs (1)
4021
stringConst = ConstantValue.
Create
("abcdefghijklmnopqrstuvwxyz"),
Semantics\NamedAndOptionalTests.cs (3)
2200
Assert.Equal(ConstantValue.
Create
("A"), parameters[2].ExplicitDefaultConstantValue);
2226
Assert.Equal(ConstantValue.
Create
("A"), parameters[6].ExplicitDefaultConstantValue);
2232
Assert.Equal(ConstantValue.
Create
("A"), parameters[7].ExplicitDefaultConstantValue); // not imported for non-optional parameter
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
PDB\PdbHelpers.cs (2)
102
(SpecialType.System_String, null) => ConstantValue.
Create
(string.Empty),
103
(SpecialType.System_String, string str) => ConstantValue.
Create
(str),
Microsoft.CodeAnalysis.UnitTests (4)
CorLibTypesTests.cs (4)
172
var cv5 = ConstantValue.
Create
(null);
228
var cv1 = ConstantValue.
Create
("1");
229
var cv2 = ConstantValue.
Create
("2");
252
cv = ConstantValue.
Create
(strVal);