15 references to VirtualMethodPointerStubGenerator
Microsoft.Interop.ComInterfaceGenerator (15)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (2)
192
(_, managedToNativeDiags) =
VirtualMethodPointerStubGenerator
.GenerateManagedToNativeStub(srcCtx, static (env, dir) => new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env, dir)));
196
(_, nativeToManagedDiags) =
VirtualMethodPointerStubGenerator
.GenerateNativeToManagedStub(srcCtx, static (env, dir) => new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env, dir)));
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (2)
94
var (_, diagnostics) =
VirtualMethodPointerStubGenerator
.GenerateManagedToNativeStub(stubContext, static (env, dir) => new ByValueContentsMarshalKindValidator(VtableIndexStubGeneratorHelpers.GetGeneratorResolver(env, dir)));
101
var (_, diagnostics) =
VirtualMethodPointerStubGenerator
.GenerateNativeToManagedStub(stubContext, static (env, dir) => new ByValueContentsMarshalKindValidator(VtableIndexStubGeneratorHelpers.GetGeneratorResolver(env, dir)));
ComInterfaceGenerator.cs (4)
285
ImmutableArray<string> callConv =
VirtualMethodPointerStubGenerator
.GetCallingConventionsFromAttributes(
522
string functionPointerType =
VirtualMethodPointerStubGenerator
.GenerateUnmanagedFunctionPointerTypeForMethod(
534
string functionPointerType =
VirtualMethodPointerStubGenerator
.GenerateUnmanagedFunctionPointerTypeForMethod(
726
VirtualMethodPointerStubGenerator
.GetManagedSignature(genCtx),
ComMethodContext.cs (2)
88
var (methodStub, diagnostics) =
VirtualMethodPointerStubGenerator
.GenerateManagedToNativeStub(sourceAvailableContext, ComInterfaceGeneratorHelpers.GetGeneratorResolver);
108
var (methodStub, diagnostics) =
VirtualMethodPointerStubGenerator
.GenerateNativeToManagedStub(sourceAvailableContext, ComInterfaceGeneratorHelpers.GetGeneratorResolver);
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
45
writer.WriteLine($"{TypeNames.GlobalAlias}{TypeNames.System_Runtime_InteropServices_Marshal}.ThrowExceptionForHR({managedIdentifier}, new({interfaceId}), (nint){
VirtualMethodPointerStubGenerator
.NativeThisParameterIdentifier});");
VtableIndexStubGenerator.cs (4)
64
var (member, _) =
VirtualMethodPointerStubGenerator
.GenerateManagedToNativeStub(stub, VtableIndexStubGeneratorHelpers.GetGeneratorResolver);
103
var (member, _) =
VirtualMethodPointerStubGenerator
.GenerateNativeToManagedStub(stub, VtableIndexStubGeneratorHelpers.GetGeneratorResolver);
189
string functionPointerType =
VirtualMethodPointerStubGenerator
.GenerateUnmanagedFunctionPointerTypeForMethod(method, VtableIndexStubGeneratorHelpers.GetGeneratorResolver);
375
ImmutableArray<string> callConv =
VirtualMethodPointerStubGenerator
.GetCallingConventionsFromAttributes(suppressGCTransitionAttribute, unmanagedCallConvAttribute, defaultCallingConventions: ImmutableArray<string>.Empty);