5 implementations of IBoundMarshallingGenerator
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Marshaling\BaseJSGenerator.cs (1)
8
internal abstract class BaseJSGenerator(TypePositionInfo info, StubCodeContext codeContext) :
IBoundMarshallingGenerator
Microsoft.Interop.SourceGeneration (4)
Marshalling\CustomTypeMarshallingGenerator.cs (1)
10
:
IBoundMarshallingGenerator
Marshalling\MarshallingGenerator.cs (1)
150
internal sealed class BoundMarshallingGenerator(TypePositionInfo info, StubCodeContext context, IUnboundMarshallingGenerator unbound) :
IBoundMarshallingGenerator
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
6
public sealed class StaticPinnableManagedValueMarshaller(IBoundMarshallingGenerator innerMarshallingGenerator, string getPinnableReferenceType) :
IBoundMarshallingGenerator
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
94
internal sealed class FreeAlwaysOwnedOriginalValueGenerator(IBoundMarshallingGenerator inner) :
IBoundMarshallingGenerator
54 references to IBoundMarshallingGenerator
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSGeneratorFactory.cs (1)
336
ResolvedGeneratorAndType resolved(
IBoundMarshallingGenerator
generator, MarshalerType baseType, IEnumerable<MarshalerType>? subTypes = null)
Microsoft.Interop.SourceGeneration (53)
BoundGenerators.cs (22)
20
IBoundMarshallingGenerator
defaultBoundGenerator = fallbackGenerator.Bind(new TypePositionInfo(SpecialTypeInfo.Void, NoMarshallingInfo.Instance), context);
23
ImmutableArray<
IBoundMarshallingGenerator
>.Builder signatureMarshallers = ImmutableArray.CreateBuilder<
IBoundMarshallingGenerator
>();
24
ImmutableArray<
IBoundMarshallingGenerator
>.Builder nativeParamMarshallers = ImmutableArray.CreateBuilder<
IBoundMarshallingGenerator
>();
25
ImmutableArray<
IBoundMarshallingGenerator
>.Builder managedParamMarshallers = ImmutableArray.CreateBuilder<
IBoundMarshallingGenerator
>();
27
IBoundMarshallingGenerator
managedReturnMarshaller = defaultBoundGenerator;
28
IBoundMarshallingGenerator
nativeReturnMarshaller = defaultBoundGenerator;
29
IBoundMarshallingGenerator
managedExceptionMarshaller = defaultBoundGenerator;
42
IBoundMarshallingGenerator
generator = CreateGenerator(argType, generatorResolver);
70
IBoundMarshallingGenerator
? overlappedMarshaller = FindOverlappedMarshaller(errorHandlingInfo);
77
IBoundMarshallingGenerator
errorHandlingMarshaller = CreateGenerator(errorHandlingInfo, errorHandlerFactory);
96
IBoundMarshallingGenerator
? overlappedMarshaller = null;
209
IBoundMarshallingGenerator
? FindOverlappedMarshaller(TypePositionInfo info)
224
IBoundMarshallingGenerator
CreateGenerator(TypePositionInfo p, IMarshallingGeneratorResolver factory)
232
public
IBoundMarshallingGenerator
ManagedReturnMarshaller { get; private init; }
234
public
IBoundMarshallingGenerator
NativeReturnMarshaller { get; private init; }
236
public
IBoundMarshallingGenerator
ManagedExceptionMarshaller { get; private init; }
238
public ImmutableArray<
IBoundMarshallingGenerator
> SignatureMarshallers { get; private init; }
240
public ImmutableArray<
IBoundMarshallingGenerator
> ManagedParameterMarshallers { get; private init; }
242
public ImmutableArray<
IBoundMarshallingGenerator
> NativeParameterMarshallers { get; private init; }
GeneratedStatements.cs (3)
53
foreach (
IBoundMarshallingGenerator
marshaller in marshallers.SignatureMarshallers)
96
IBoundMarshallingGenerator
valueMarshaller = marshallers.ManagedParameterMarshallers.Last();
143
IBoundMarshallingGenerator
marshaller = marshallers.ManagedExceptionMarshaller;
ManagedToNativeStubGenerator.cs (1)
74
foreach (
IBoundMarshallingGenerator
generator in _marshallers.SignatureMarshallers)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (4)
180
IBoundMarshallingGenerator
marshallingGenerator = new CustomTypeMarshallingGenerator(marshallingStrategy, ByValueMarshalKindSupportDescriptor.Default, marshallerData.Shape.HasFlag(MarshallerShape.StatelessPinnableReference));
211
IBoundMarshallingGenerator
elementMarshaller = resolvedElementMarshaller.Generator;
309
IBoundMarshallingGenerator
marshallingGenerator = new CustomTypeMarshallingGenerator(marshallingStrategy, byValueMarshalKindSupport, isPinned);
359
private static ElementsMarshalling CreateElementsMarshalling(CustomTypeMarshallerData marshallerData,
IBoundMarshallingGenerator
elementMarshaller, string unmanagedElementType, IElementsMarshallingCollectionSource collectionSource)
Marshalling\ElementsMarshalling.cs (3)
149
IBoundMarshallingGenerator
elementMarshaller,
263
IBoundMarshallingGenerator
elementMarshaller,
323
IBoundMarshallingGenerator
elementMarshaller,
Marshalling\MarshallingGenerator.cs (1)
183
public static
IBoundMarshallingGenerator
Bind(this IUnboundMarshallingGenerator unbound, TypePositionInfo info, StubCodeContext context) => new BoundMarshallingGenerator(info, context, unbound);
Marshalling\MarshallingGeneratorExtensions.cs (8)
16
public static string AsReturnType(this
IBoundMarshallingGenerator
generator)
30
public static string? GenerateAttributesForReturnType(this
IBoundMarshallingGenerator
generator)
45
public static GeneratedParameter AsParameter(this
IBoundMarshallingGenerator
generator, StubIdentifierContext context)
119
public static string AsArgument(this
IBoundMarshallingGenerator
generator, StubIdentifierContext context)
134
public static string AsManagedArgument(this
IBoundMarshallingGenerator
generator, StubIdentifierContext context)
143
public static string GenerateNativeByRefInitialization(this
IBoundMarshallingGenerator
generator, StubIdentifierContext context)
149
public static bool IsForwarder(this
IBoundMarshallingGenerator
generator) => generator is BoundMarshallingGenerator { IsForwarder: true };
151
public static bool IsBlittable(this
IBoundMarshallingGenerator
generator) => generator is BoundMarshallingGenerator { IsBlittable: true };
Marshalling\ResolvedGenerator.cs (3)
10
public record struct ResolvedGenerator([property: MemberNotNullWhen(true, nameof(ResolvedGenerator.IsResolved), nameof(ResolvedGenerator.IsResolvedWithoutErrors))]
IBoundMarshallingGenerator
? Generator, ImmutableArray<GeneratorDiagnostic> Diagnostics)
20
public static ResolvedGenerator Resolved(
IBoundMarshallingGenerator
generator)
30
public static ResolvedGenerator ResolvedWithDiagnostics(
IBoundMarshallingGenerator
generator, ImmutableArray<GeneratorDiagnostic> diagnostics)
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
6
public sealed class StaticPinnableManagedValueMarshaller(
IBoundMarshallingGenerator
innerMarshallingGenerator, string getPinnableReferenceType) : IBoundMarshallingGenerator
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
94
internal sealed class FreeAlwaysOwnedOriginalValueGenerator(
IBoundMarshallingGenerator
inner) : IBoundMarshallingGenerator
UnmanagedToManagedStubGenerator.cs (1)
64
ImmutableArray<
IBoundMarshallingGenerator
> parameters = _marshallers.ManagedParameterMarshallers;
VariableDeclarations.cs (5)
14
foreach (
IBoundMarshallingGenerator
marshaller in marshallers.NativeParameterMarshallers)
37
foreach (
IBoundMarshallingGenerator
errorMarshaller in marshallers.SignatureMarshallers)
48
void AppendVariableDeclarations(
IBoundMarshallingGenerator
marshaller)
65
foreach (
IBoundMarshallingGenerator
marshaller in marshallers.NativeParameterMarshallers)
84
void AppendVariableDeclarations(
IBoundMarshallingGenerator
marshaller)