60 references to Constants
Microsoft.Interop.JavaScript.JSImportGenerator (60)
Analyzers\JSExportDiagnosticsAnalyzer.cs (1)
18protected override string AttributeMetadataName => Constants.JSExportAttribute;
Analyzers\JSImportDiagnosticsAnalyzer.cs (1)
18protected override string AttributeMetadataName => Constants.JSImportAttribute;
JSExportGenerator.cs (24)
41.ForAttributeWithMetadataName(Constants.JSExportAttribute, 123Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute)))))) 125Parameter(Identifier(Constants.ArgumentsBuffer)).WithType(PointerType(ParseTypeName(Constants.JSMarshalerArgumentGlobal)))))) 157&& attr.AttributeClass.ToDisplayString() == Constants.JSExportAttribute) 213Attribute(IdentifierName(Constants.ThreadStaticGlobal)))))); 228IdentifierName(Constants.ModuleInitializerAttributeGlobal)), 231IdentifierName(Constants.DynamicDependencyAttributeGlobal)) 241IdentifierName(Constants.DynamicallyAccessedMemberTypesGlobal), 245IdentifierName(Constants.DynamicallyAccessedMemberTypesGlobal), 270Attribute(IdentifierName(Constants.CompilerGeneratedAttributeGlobal))) 283IdentifierName(Constants.OSArchitectureGlobal), 284IdentifierName(Constants.ArchitectureWasmGlobal))), 303new ReferenceTypeInfo(Constants.ExceptionGlobal, Constants.ExceptionGlobal), 304new JSMarshallingInfo(NoMarshallingInfo.Instance, new JSSimpleTypeInfo(KnownManagedType.Exception, ParseTypeName(Constants.ExceptionGlobal))) 309InstanceIdentifier = Constants.ArgumentException, 346AttributeListSyntax registrationAttribute = AttributeList(SingletonSeparatedList(Attribute(IdentifierName(Constants.DynamicDependencyAttributeGlobal)) 375IdentifierName(Constants.ArgumentsBuffer), 380arguments.Add(Argument(IdentifierName(Constants.ArgumentsBuffer))); 388IdentifierName(Constants.ArgumentsBuffer), 406Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute)))))); 419IdentifierName(Constants.JSFunctionSignatureGlobal), IdentifierName(Constants.BindCSFunctionMethod)))
JSImportGenerator.cs (15)
42.ForAttributeWithMetadataName(Constants.JSImportAttribute, 95Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute)))))) 100FieldDeclarationSyntax sigField = FieldDeclaration(VariableDeclaration(IdentifierName(Constants.JSFunctionSignatureGlobal)) 140&& attr.AttributeClass.ToDisplayString() == Constants.JSImportAttribute) 194InstanceIdentifier = Constants.ArgumentException, 202InstanceIdentifier = Constants.ArgumentReturn, 278IdentifierName(Constants.JSFunctionSignatureGlobal), IdentifierName(Constants.BindJSFunctionMethod))) 285TypeSyntax jsMarshalerArgument = ParseTypeName(Constants.JSMarshalerArgumentGlobal); 299Constants.ArgumentsBuffer, 302IdentifierName(Constants.JSFunctionSignatureGlobal), 305Argument(IdentifierName(Constants.ArgumentsBuffer))), 308IdentifierName(Constants.ArgumentsBuffer), 317IdentifierName(Constants.JSFunctionSignatureGlobal), 329Attribute(IdentifierName(Constants.DebuggerNonUserCodeAttribute))))));
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 (6)
17private static ValueTypeInfo JSMarshalerArgument = new ValueTypeInfo(Constants.JSMarshalerArgumentGlobal, Constants.JSMarshalerArgument, IsByRefLike: false); 61return IdentifierName(Constants.ToManagedBigMethod); 63return IdentifierName(Constants.ToManagedMethod); 72return IdentifierName(Constants.ToJSBigMethod); 74return 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)
36return IdentifierName(Constants.JSMarshalerTypeGlobalDot + marshalerType.ToString());