68 references to Constants
Microsoft.Interop.JavaScript.JSImportGenerator (68)
JSExportCodeGenerator.cs (14)
107.WithDeclaration(CatchDeclaration(IdentifierName(Constants.ExceptionGlobal)).WithIdentifier(Identifier("ex"))) 111IdentifierName(Constants.ArgumentException), IdentifierName(Constants.ToJSMethod))) 140IdentifierName(Constants.OSArchitectureGlobal), 141IdentifierName(Constants.ArchitectureWasmGlobal))), 160IdentifierName(Constants.JSFunctionSignatureGlobal), IdentifierName(Constants.BindCSFunctionMethod))) 170return Argument(ArrayCreationExpression(ArrayType(IdentifierName(Constants.JSMarshalerTypeGlobal)) 183statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(Constants.JSMarshalerArgumentGlobal))) 184.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(Constants.ArgumentException)) 185.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(Constants.ArgumentsBuffer)) 189statementsToUpdate.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, 147Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute)))))) 149Parameter(Identifier("__arguments_buffer")).WithType(PointerType(ParseTypeName(Constants.JSMarshalerArgumentGlobal)))))) 181&& attr.AttributeClass.ToDisplayString() == Constants.JSExportAttribute) 242Attribute(IdentifierName(Constants.ThreadStaticGlobal)))))); 257IdentifierName(Constants.ModuleInitializerAttributeGlobal)), 260IdentifierName(Constants.DynamicDependencyAttributeGlobal)) 270IdentifierName(Constants.DynamicallyAccessedMemberTypesGlobal), 274IdentifierName(Constants.DynamicallyAccessedMemberTypesGlobal), 299Attribute(IdentifierName(Constants.CompilerGeneratedAttributeGlobal))) 322AttributeListSyntax registrationAttribute = AttributeList(SingletonSeparatedList(Attribute(IdentifierName(Constants.DynamicDependencyAttributeGlobal))
JSImportCodeGenerator.cs (17)
152IdentifierName(Constants.JSFunctionSignatureGlobal), IdentifierName(Constants.BindJSFunctionMethod))) 162return Argument(ArrayCreationExpression(ArrayType(IdentifierName(Constants.JSMarshalerTypeGlobal)) 170VariableDeclaration(GenericName(Identifier(Constants.SpanGlobal)).WithTypeArgumentList( 171TypeArgumentList(SingletonSeparatedList<TypeSyntax>(IdentifierName(Constants.JSMarshalerArgumentGlobal))))) 172.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(Constants.ArgumentsBuffer)) 173.WithInitializer(EqualsValueClause(StackAllocArrayCreationExpression(ArrayType(IdentifierName(Constants.JSMarshalerArgumentGlobal)) 177statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(Constants.JSMarshalerArgumentGlobal))) 178.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(Constants.ArgumentException)) 179.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(Constants.ArgumentsBuffer)) 185IdentifierName(Constants.ArgumentException), IdentifierName("Initialize"))))); 187statementsToUpdate.Add(LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(Constants.JSMarshalerArgumentGlobal))) 188.WithVariables(SingletonSeparatedList(VariableDeclarator(Identifier(Constants.ArgumentReturn)) 189.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(Constants.ArgumentsBuffer)) 195IdentifierName(Constants.ArgumentReturn), IdentifierName("Initialize"))))); 201MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, IdentifierName(Constants.JSFunctionSignatureGlobal), IdentifierName("InvokeJS"))) 204Argument(IdentifierName(Constants.ArgumentsBuffer))}))));
JSImportGenerator.cs (4)
39.ForAttributeWithMetadataName(Constants.JSImportAttribute, 116Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute)))))) 121FieldDeclarationSyntax sigField = FieldDeclaration(VariableDeclaration(IdentifierName(Constants.JSFunctionSignatureGlobal)) 161&& attr.AttributeClass.ToDisplayString() == Constants.JSImportAttribute)
JSManagedTypeInfo.cs (7)
118case ITypeSymbol when fullTypeName == Constants.TaskGlobal: 120case INamedTypeSymbol { TypeArguments.Length: 1 } taskType when fullTypeName.StartsWith(Constants.TaskGlobal, StringComparison.Ordinal): 128case INamedTypeSymbol { TypeArguments.Length: 1 } spanType when fullTypeName.StartsWith(Constants.SpanGlobal, StringComparison.Ordinal): 136case INamedTypeSymbol { TypeArguments.Length: 1 } arraySegmentType when fullTypeName.StartsWith(Constants.ArraySegmentGlobal, StringComparison.Ordinal): 144case ITypeSymbol when fullTypeName == Constants.ActionGlobal: 146case INamedTypeSymbol actionType when fullTypeName.StartsWith(Constants.ActionGlobal, StringComparison.Ordinal): 157case INamedTypeSymbol funcType when fullTypeName.StartsWith(Constants.FuncGlobal, StringComparison.Ordinal):
JSMarshalAsAttributeInfoParser.cs (1)
19_jsMarshalAsAttribute = compilation.GetTypeByMetadataName(Constants.JSMarshalAsAttribute)!.ConstructUnboundGenericType();
Marshaling\BaseJSGenerator.cs (7)
52yield return LocalDeclarationStatement(VariableDeclaration(RefType(IdentifierName(Constants.JSMarshalerArgumentGlobal))) 54.WithInitializer(EqualsValueClause(RefExpression(ElementAccessExpression(IdentifierName(Constants.ArgumentsBuffer)) 68return IdentifierName(Constants.JSMarshalerTypeGlobalDot + marshalerType.ToString()); 76return IdentifierName(Constants.ToManagedBigMethod); 78return IdentifierName(Constants.ToManagedMethod); 87return IdentifierName(Constants.ToJSBigMethod); 89return 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)),