60 references to Constants
Microsoft.Interop.JavaScript.JSImportGenerator (60)
Analyzers\JSExportDiagnosticsAnalyzer.cs (1)
18
protected override string AttributeMetadataName =>
Constants
.JSExportAttribute;
Analyzers\JSImportDiagnosticsAnalyzer.cs (1)
18
protected override string AttributeMetadataName =>
Constants
.JSImportAttribute;
JSExportGenerator.cs (24)
41
.ForAttributeWithMetadataName(
Constants
.JSExportAttribute,
123
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))))
125
Parameter(Identifier(
Constants
.ArgumentsBuffer)).WithType(PointerType(ParseTypeName(
Constants
.JSMarshalerArgumentGlobal))))))
157
&& attr.AttributeClass.ToDisplayString() ==
Constants
.JSExportAttribute)
213
Attribute(IdentifierName(
Constants
.ThreadStaticGlobal))))));
228
IdentifierName(
Constants
.ModuleInitializerAttributeGlobal)),
231
IdentifierName(
Constants
.DynamicDependencyAttributeGlobal))
241
IdentifierName(
Constants
.DynamicallyAccessedMemberTypesGlobal),
245
IdentifierName(
Constants
.DynamicallyAccessedMemberTypesGlobal),
270
Attribute(IdentifierName(
Constants
.CompilerGeneratedAttributeGlobal)))
283
IdentifierName(
Constants
.OSArchitectureGlobal),
284
IdentifierName(
Constants
.ArchitectureWasmGlobal))),
303
new ReferenceTypeInfo(
Constants
.ExceptionGlobal,
Constants
.ExceptionGlobal),
304
new JSMarshallingInfo(NoMarshallingInfo.Instance, new JSSimpleTypeInfo(KnownManagedType.Exception, ParseTypeName(
Constants
.ExceptionGlobal)))
309
InstanceIdentifier =
Constants
.ArgumentException,
346
AttributeListSyntax registrationAttribute = AttributeList(SingletonSeparatedList(Attribute(IdentifierName(
Constants
.DynamicDependencyAttributeGlobal))
375
IdentifierName(
Constants
.ArgumentsBuffer),
380
arguments.Add(Argument(IdentifierName(
Constants
.ArgumentsBuffer)));
388
IdentifierName(
Constants
.ArgumentsBuffer),
406
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))));
419
IdentifierName(
Constants
.JSFunctionSignatureGlobal), IdentifierName(
Constants
.BindCSFunctionMethod)))
JSImportGenerator.cs (15)
42
.ForAttributeWithMetadataName(
Constants
.JSImportAttribute,
95
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))))
100
FieldDeclarationSyntax sigField = FieldDeclaration(VariableDeclaration(IdentifierName(
Constants
.JSFunctionSignatureGlobal))
140
&& attr.AttributeClass.ToDisplayString() ==
Constants
.JSImportAttribute)
194
InstanceIdentifier =
Constants
.ArgumentException,
202
InstanceIdentifier =
Constants
.ArgumentReturn,
278
IdentifierName(
Constants
.JSFunctionSignatureGlobal), IdentifierName(
Constants
.BindJSFunctionMethod)))
285
TypeSyntax jsMarshalerArgument = ParseTypeName(
Constants
.JSMarshalerArgumentGlobal);
299
Constants
.ArgumentsBuffer,
302
IdentifierName(
Constants
.JSFunctionSignatureGlobal),
305
Argument(IdentifierName(
Constants
.ArgumentsBuffer))),
308
IdentifierName(
Constants
.ArgumentsBuffer),
317
IdentifierName(
Constants
.JSFunctionSignatureGlobal),
329
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))));
JSManagedTypeInfo.cs (7)
118
case ITypeSymbol when fullTypeName ==
Constants
.TaskGlobal:
120
case INamedTypeSymbol { TypeArguments.Length: 1 } taskType when fullTypeName.StartsWith(
Constants
.TaskGlobal, StringComparison.Ordinal):
128
case INamedTypeSymbol { TypeArguments.Length: 1 } spanType when fullTypeName.StartsWith(
Constants
.SpanGlobal, StringComparison.Ordinal):
136
case INamedTypeSymbol { TypeArguments.Length: 1 } arraySegmentType when fullTypeName.StartsWith(
Constants
.ArraySegmentGlobal, StringComparison.Ordinal):
144
case ITypeSymbol when fullTypeName ==
Constants
.ActionGlobal:
146
case INamedTypeSymbol actionType when fullTypeName.StartsWith(
Constants
.ActionGlobal, StringComparison.Ordinal):
157
case INamedTypeSymbol funcType when fullTypeName.StartsWith(
Constants
.FuncGlobal, StringComparison.Ordinal):
JSMarshalAsAttributeInfoParser.cs (1)
19
_jsMarshalAsAttribute = compilation.GetTypeByMetadataName(
Constants
.JSMarshalAsAttribute)!.ConstructUnboundGenericType();
Marshaling\BaseJSGenerator.cs (6)
17
private static ValueTypeInfo JSMarshalerArgument = new ValueTypeInfo(
Constants
.JSMarshalerArgumentGlobal,
Constants
.JSMarshalerArgument, IsByRefLike: false);
61
return IdentifierName(
Constants
.ToManagedBigMethod);
63
return IdentifierName(
Constants
.ToManagedMethod);
72
return IdentifierName(
Constants
.ToJSBigMethod);
74
return IdentifierName(
Constants
.ToJSMethod);
Marshaling\FuncJSGenerator.cs (2)
98
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
113
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
Marshaling\TaskJSGenerator.cs (2)
79
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
102
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
SignatureBindingHelpers.cs (1)
36
return IdentifierName(
Constants
.JSMarshalerTypeGlobalDot + marshalerType.ToString());