68 references to Constants
Microsoft.Interop.JavaScript.JSImportGenerator (68)
JSExportCodeGenerator.cs (14)
107
.WithDeclaration(CatchDeclaration(IdentifierName(
Constants
.ExceptionGlobal)).WithIdentifier(Identifier("ex")))
111
IdentifierName(
Constants
.ArgumentException), IdentifierName(
Constants
.ToJSMethod)))
140
IdentifierName(
Constants
.OSArchitectureGlobal),
141
IdentifierName(
Constants
.ArchitectureWasmGlobal))),
160
IdentifierName(
Constants
.JSFunctionSignatureGlobal), IdentifierName(
Constants
.BindCSFunctionMethod)))
170
return Argument(ArrayCreationExpression(ArrayType(IdentifierName(
Constants
.JSMarshalerTypeGlobal))
183
statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))
184
.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(
Constants
.ArgumentException))
185
.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(
Constants
.ArgumentsBuffer))
189
statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))
190
.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(
Constants
.ArgumentReturn))
191
.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(
Constants
.ArgumentsBuffer))
JSExportGenerator.cs (11)
41
.ForAttributeWithMetadataName(
Constants
.JSExportAttribute,
147
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))))
149
Parameter(Identifier("__arguments_buffer")).WithType(PointerType(ParseTypeName(
Constants
.JSMarshalerArgumentGlobal))))))
181
&& attr.AttributeClass.ToDisplayString() ==
Constants
.JSExportAttribute)
242
Attribute(IdentifierName(
Constants
.ThreadStaticGlobal))))));
257
IdentifierName(
Constants
.ModuleInitializerAttributeGlobal)),
260
IdentifierName(
Constants
.DynamicDependencyAttributeGlobal))
270
IdentifierName(
Constants
.DynamicallyAccessedMemberTypesGlobal),
274
IdentifierName(
Constants
.DynamicallyAccessedMemberTypesGlobal),
299
Attribute(IdentifierName(
Constants
.CompilerGeneratedAttributeGlobal)))
322
AttributeListSyntax registrationAttribute = AttributeList(SingletonSeparatedList(Attribute(IdentifierName(
Constants
.DynamicDependencyAttributeGlobal))
JSImportCodeGenerator.cs (17)
152
IdentifierName(
Constants
.JSFunctionSignatureGlobal), IdentifierName(
Constants
.BindJSFunctionMethod)))
162
return Argument(ArrayCreationExpression(ArrayType(IdentifierName(
Constants
.JSMarshalerTypeGlobal))
170
VariableDeclaration(GenericName(Identifier(
Constants
.SpanGlobal)).WithTypeArgumentList(
171
TypeArgumentList(SingletonSeparatedList<TypeSyntax>(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))))
172
.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(
Constants
.ArgumentsBuffer))
173
.WithInitializer(EqualsValueClause(StackAllocArrayCreationExpression(ArrayType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal))
177
statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))
178
.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(
Constants
.ArgumentException))
179
.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(
Constants
.ArgumentsBuffer))
185
IdentifierName(
Constants
.ArgumentException), IdentifierName("Initialize")))));
187
statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))
188
.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(
Constants
.ArgumentReturn))
189
.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(
Constants
.ArgumentsBuffer))
195
IdentifierName(
Constants
.ArgumentReturn), IdentifierName("Initialize")))));
201
MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, IdentifierName(
Constants
.JSFunctionSignatureGlobal), IdentifierName("InvokeJS")))
204
Argument(IdentifierName(
Constants
.ArgumentsBuffer))}))));
JSImportGenerator.cs (4)
39
.ForAttributeWithMetadataName(
Constants
.JSImportAttribute,
116
Attribute(IdentifierName(
Constants
.DebuggerNonUserCodeAttribute))))))
121
FieldDeclarationSyntax sigField = FieldDeclaration(VariableDeclaration(IdentifierName(
Constants
.JSFunctionSignatureGlobal))
161
&& attr.AttributeClass.ToDisplayString() ==
Constants
.JSImportAttribute)
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 (7)
52
yield return LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)))
54
.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(
Constants
.ArgumentsBuffer))
68
return IdentifierName(
Constants
.JSMarshalerTypeGlobalDot + marshalerType.ToString());
76
return IdentifierName(
Constants
.ToManagedBigMethod);
78
return IdentifierName(
Constants
.ToManagedMethod);
87
return IdentifierName(
Constants
.ToJSBigMethod);
89
return IdentifierName(
Constants
.ToJSMethod);
Marshaling\FuncJSGenerator.cs (3)
36
?
Constants
.ArgumentReturn
121
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
136
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
Marshaling\PrimitiveJSGenerator.cs (1)
29
?
Constants
.ArgumentReturn
Marshaling\TaskJSGenerator.cs (3)
42
?
Constants
.ArgumentReturn
108
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),
131
.WithType(IdentifierName(
Constants
.JSMarshalerArgumentGlobal)),