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