57 references to GlobalAlias
Microsoft.Interop.ComInterfaceGenerator (13)
ComInterfaceGenerator.cs (1)
160return (HintName: interfaceContext.Info.Type.FullTypeName.Replace(TypeNames.GlobalAlias, "").Replace("@", ""), Source: writer.ToString());
ComInterfaceInfo.cs (2)
240attrInfo.StringMarshallingCustomType.FullTypeName.Replace(TypeNames.GlobalAlias, ""), 322exceptionToUnmanagedMarshallerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).Replace(TypeNames.GlobalAlias, ""),
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (2)
31$"{TypeNames.GlobalAlias + TypeNames.System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch}*", 43writer.WriteLine($"{managed} = {TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch}.GetInstance<{info.ManagedType.FullTypeName}>({native});");
Marshallers\KeepAliveThisMarshaller.cs (1)
18writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_GC}.KeepAlive(this);");
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
45writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.ThrowExceptionForHR({managedIdentifier}, new({interfaceId}), (nint){VirtualMethodPointerStubGenerator.NativeThisParameterIdentifier});");
Marshallers\ObjectUnwrapperResolver.cs (1)
40writer.WriteLine($"{managedIdentifier} = ({info.ManagedType.FullTypeName}){TypeNames.GlobalAlias}{TypeNames.UnmanagedObjectUnwrapper}.GetObjectForUnmanagedWrapper<{unwrapperType}>({nativeIdentifier});");
Marshallers\StructAsHResultMarshallerFactory.cs (2)
36writer.WriteLine($"{unmanaged} = {TypeNames.GlobalAlias}{TypeNames.System_Runtime_CompilerServices_Unsafe}.BitCast<{info.ManagedType.FullTypeName}, {AsNativeType(info).FullTypeName}>({managed});"); 42writer.WriteLine($"{managed} = {TypeNames.GlobalAlias}{TypeNames.System_Runtime_CompilerServices_Unsafe}.BitCast<{AsNativeType(info).FullTypeName}, {info.ManagedType.FullTypeName}>({unmanaged});");
VirtualMethodPointerStubGenerator.cs (3)
45writer.WriteLine($"var ({NativeThisParameterIdentifier}, {VirtualMethodTableIdentifier}) = (({TypeNames.GlobalAlias}{TypeNames.IUnmanagedVirtualMethodTableProvider})this).GetVirtualMethodTableInfoForKey(typeof({methodStub.TypeKeyOwner.FullTypeName}));"); 100string unmanagedCallersOnlyAttribute = TypeNames.GlobalAlias + TypeNames.UnmanagedCallersOnlyAttribute; 178new ReferenceTypeInfo(TypeNames.GlobalAlias + TypeNames.System_Exception, TypeNames.System_Exception),
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Marshaling\BaseJSGenerator.cs (1)
38writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_CompilerServices_Unsafe}.SkipInit(out {js});");
Marshaling\ImplicitArgumentGenerator.cs (1)
13writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_CompilerServices_Unsafe}.SkipInit(out {js});");
Microsoft.Interop.LibraryImportGenerator (10)
LibraryImportGenerator.cs (10)
93attributes.Add(TypeNames.GlobalAlias + TypeNames.SuppressGCTransitionAttribute); 98attributes.Add(TypeNames.GlobalAlias + TypeNames.System_Diagnostics_StackTraceHiddenAttribute); 103attributes.Add(TypeNames.GlobalAlias + TypeNames.System_Diagnostics_DebuggerHiddenAttribute); 108string unmanagedCallConv = TypeNames.GlobalAlias + TypeNames.UnmanagedCallConvAttribute; 120unmanagedCallConv += $"({CallConvsField} = new {TypeNames.GlobalAlias}{TypeNames.System_Type}[] {initializer})"; 128attributes.Add($"{TypeNames.GlobalAlias}{TypeNames.DefaultDllImportSearchPathsAttribute}(({TypeNames.GlobalAlias}{TypeNames.DllImportSearchPath}){searchPaths})"); 132attributes.Add(TypeNames.GlobalAlias + TypeNames.WasmImportLinkageAttribute); 380return $"{TypeNames.GlobalAlias}{TypeNames.DllImportAttribute}({string.Join(", ", arguments)})"; 384=> $"{TypeNames.GlobalAlias}{typeof(T).FullName}.{value}";
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
DownlevelLibraryImportGenerator.cs (4)
119attributes.Add($"{TypeNames.GlobalAlias}{TypeNames.DefaultDllImportSearchPathsAttribute}(({TypeNames.GlobalAlias}{TypeNames.DllImportSearchPath}){searchPaths})"); 326return $"{TypeNames.GlobalAlias}{TypeNames.DllImportAttribute}({string.Join(", ", arguments)})"; 330=> $"{TypeNames.GlobalAlias}{typeof(T).FullName}.{value}";
Microsoft.Interop.SourceGeneration (28)
GeneratedStatements.cs (1)
145writer.WriteLine($"catch ({TypeNames.GlobalAlias}{TypeNames.System_Exception} {managed})");
MarshalAsParser.cs (4)
33writer.Write($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_MarshalAsAttribute}(({TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_UnmanagedType}){(int)unmanagedType}"); 98writer.Write($", {nameof(ArraySubType)} = ({TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_UnmanagedType}){(int)ArraySubType}"); 259or $"{TypeNames.GlobalAlias}{TypeNames.System_Guid}";
Marshalling\DelegateMarshaller.cs (3)
35writer.WriteLine($"{nativeIdentifier} = {managedIdentifier} != null ? {TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.GetFunctionPointerForDelegate({managedIdentifier}) : default;"); 42writer.WriteLine($"{managedIdentifier} = {nativeIdentifier} != default ? {TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.GetDelegateForFunctionPointer<{info.ManagedType.FullTypeName}>({nativeIdentifier}) : null;"); 48writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_GC}.KeepAlive({managedIdentifier});");
Marshalling\ElementsMarshalling.cs (3)
24protected const string MemoryMarshalType = TypeNames.GlobalAlias + TypeNames.System_Runtime_InteropServices_MemoryMarshal; 25protected const string UnsafeType = TypeNames.GlobalAlias + TypeNames.System_Runtime_CompilerServices_Unsafe; 315writer.WriteLine($"{elementSetupSubContext.GetIdentifiers(elementMarshaller.TypeInfo).native} = ({TypeNames.GlobalAlias}{TypeNames.System_IntPtr}){identifierContext.GetIdentifiers(elementMarshaller.TypeInfo).native};");
Marshalling\IidParameterIndexMarshallerResolver.cs (5)
50writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_IntPtr} {queriedInterfaceIdentifier} = 0;"); 51writer.WriteLine($"int {queryInterfaceHResultIdentifier} = {TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.QueryInterface(({TypeNames.GlobalAlias}{TypeNames.System_IntPtr}){unknownIdentifier}, in {iidExpression}, out {queriedInterfaceIdentifier});"); 59writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.Release({queriedInterfaceIdentifier});"); 63writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.ThrowExceptionForHR({queryInterfaceHResultIdentifier});");
Marshalling\MarshallerHelpers.cs (5)
28? TypeNames.GlobalAlias + TypeNames.System_IntPtr 37FormattableString.Invariant($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.SetLastSystemError({errorCode});"); 43$"{lastErrorIdentifier} = {TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.GetLastSystemError();"; 50$"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.SetLastPInvokeError({lastErrorIdentifier});"; 227return $"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_CompilerServices_Unsafe}.SkipInit(out {info.InstanceIdentifier});";
Marshalling\MarshallingGeneratorExtensions.cs (2)
102attributes.Add(TypeNames.GlobalAlias + TypeNames.System_Runtime_InteropServices_InAttribute); 106attributes.Add(TypeNames.GlobalAlias + TypeNames.System_Runtime_InteropServices_OutAttribute);
MarshallingAttributeInfo.cs (1)
183ManagedTypeInfo marshallerTypeInfo = new ReferenceTypeInfo(TypeNames.GlobalAlias + marshallerName, marshallerName);
SignatureContext.cs (2)
78additionalAttrs.Add($"{TypeNames.GlobalAlias}{TypeNames.System_CodeDom_Compiler_GeneratedCodeAttribute}({CodeWriterHelpers.StringLiteral(generatorName)}, {CodeWriterHelpers.StringLiteral(generatorVersion)})"); 82additionalAttrs.Add(TypeNames.GlobalAlias + TypeNames.System_Runtime_CompilerServices_SkipLocalsInitAttribute);
TypeNames.cs (2)
52public const string System_Span = GlobalAlias + "System.Span"; 54public const string System_ReadOnlySpan = GlobalAlias + "System.ReadOnlySpan";