5 implementations of IBoundMarshallingGenerator
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Marshaling\BaseJSGenerator.cs (1)
15internal abstract class BaseJSGenerator(TypePositionInfo info, StubCodeContext codeContext) : IBoundMarshallingGenerator
Microsoft.Interop.SourceGeneration (4)
Marshalling\CustomTypeMarshallingGenerator.cs (1)
14: IBoundMarshallingGenerator
Marshalling\MarshallingGenerator.cs (1)
152internal sealed class BoundMarshallingGenerator(TypePositionInfo info, StubCodeContext context, IUnboundMarshallingGenerator unbound) : IBoundMarshallingGenerator
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
13public sealed class StaticPinnableManagedValueMarshaller(IBoundMarshallingGenerator innerMarshallingGenerator, TypeSyntax getPinnableReferenceType) : IBoundMarshallingGenerator
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
136internal sealed class FreeAlwaysOwnedOriginalValueGenerator(IBoundMarshallingGenerator inner) : IBoundMarshallingGenerator
55 references to IBoundMarshallingGenerator
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSGeneratorFactory.cs (1)
336ResolvedGeneratorAndType resolved(IBoundMarshallingGenerator generator, MarshalerType baseType, IEnumerable<MarshalerType>? subTypes = null)
Microsoft.Interop.SourceGeneration (54)
BoundGenerators.cs (22)
23IBoundMarshallingGenerator defaultBoundGenerator = fallbackGenerator.Bind(new TypePositionInfo(SpecialTypeInfo.Void, NoMarshallingInfo.Instance), context); 26ImmutableArray<IBoundMarshallingGenerator>.Builder signatureMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 27ImmutableArray<IBoundMarshallingGenerator>.Builder nativeParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 28ImmutableArray<IBoundMarshallingGenerator>.Builder managedParamMarshallers = ImmutableArray.CreateBuilder<IBoundMarshallingGenerator>(); 30IBoundMarshallingGenerator managedReturnMarshaller = defaultBoundGenerator; 31IBoundMarshallingGenerator nativeReturnMarshaller = defaultBoundGenerator; 32IBoundMarshallingGenerator managedExceptionMarshaller = defaultBoundGenerator; 45IBoundMarshallingGenerator generator = CreateGenerator(argType, generatorResolver); 73IBoundMarshallingGenerator? overlappedMarshaller = FindOverlappedMarshaller(errorHandlingInfo); 80IBoundMarshallingGenerator errorHandlingMarshaller = CreateGenerator(errorHandlingInfo, errorHandlerFactory); 99IBoundMarshallingGenerator? overlappedMarshaller = null; 212IBoundMarshallingGenerator? FindOverlappedMarshaller(TypePositionInfo info) 227IBoundMarshallingGenerator CreateGenerator(TypePositionInfo p, IMarshallingGeneratorResolver factory) 235public IBoundMarshallingGenerator ManagedReturnMarshaller { get; private init; } 237public IBoundMarshallingGenerator NativeReturnMarshaller { get; private init; } 239public IBoundMarshallingGenerator ManagedExceptionMarshaller { get; private init; } 241public ImmutableArray<IBoundMarshallingGenerator> SignatureMarshallers { get; private init; } 243public ImmutableArray<IBoundMarshallingGenerator> ManagedParameterMarshallers { get; private init; } 245public ImmutableArray<IBoundMarshallingGenerator> NativeParameterMarshallers { get; private init; }
GeneratedStatements.cs (5)
105foreach (IBoundMarshallingGenerator marshaller in marshallers.SignatureMarshallers) 138foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 172foreach (IBoundMarshallingGenerator marshaller in marshallers.ManagedParameterMarshallers) 206IBoundMarshallingGenerator valueParameterMarshaller = marshallers.ManagedParameterMarshallers.Last(); 232IBoundMarshallingGenerator managedExceptionMarshaller = marshallers.ManagedExceptionMarshaller;
ManagedToNativeStubGenerator.cs (1)
96foreach (IBoundMarshallingGenerator generator in _marshallers.SignatureMarshallers)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (4)
196IBoundMarshallingGenerator marshallingGenerator = new CustomTypeMarshallingGenerator(marshallingStrategy, ByValueMarshalKindSupportDescriptor.Default, marshallerData.Shape.HasFlag(MarshallerShape.StatelessPinnableReference)); 227IBoundMarshallingGenerator elementMarshaller = resolvedElementMarshaller.Generator; 342IBoundMarshallingGenerator marshallingGenerator = new CustomTypeMarshallingGenerator(marshallingStrategy, byValueMarshalKindSupport, isPinned); 392private static ElementsMarshalling CreateElementsMarshalling(CustomTypeMarshallerData marshallerData, IBoundMarshallingGenerator elementMarshaller, TypeSyntax unmanagedElementType, IElementsMarshallingCollectionSource collectionSource)
Marshalling\ElementsMarshalling.cs (3)
252IBoundMarshallingGenerator elementMarshaller, 474IBoundMarshallingGenerator elementMarshaller, 565IBoundMarshallingGenerator elementMarshaller,
Marshalling\MarshallingGenerator.cs (1)
185public static IBoundMarshallingGenerator Bind(this IUnboundMarshallingGenerator unbound, TypePositionInfo info, StubCodeContext context) => new BoundMarshallingGenerator(info, context, unbound);
Marshalling\MarshallingGeneratorExtensions.cs (8)
20public static TypeSyntax AsReturnType(this IBoundMarshallingGenerator generator) 36public static AttributeListSyntax? GenerateAttributesForReturnType(this IBoundMarshallingGenerator generator) 59public static ParameterSyntax AsParameter(this IBoundMarshallingGenerator generator, StubIdentifierContext context) 139public static ArgumentSyntax AsArgument(this IBoundMarshallingGenerator generator, StubIdentifierContext context) 154public static ArgumentSyntax AsManagedArgument(this IBoundMarshallingGenerator generator, StubIdentifierContext context) 165public static ExpressionSyntax GenerateNativeByRefInitialization(this IBoundMarshallingGenerator generator, StubIdentifierContext context) 172public static bool IsForwarder(this IBoundMarshallingGenerator generator) => generator is BoundMarshallingGenerator { IsForwarder: true }; 174public static bool IsBlittable(this IBoundMarshallingGenerator generator) => generator is BoundMarshallingGenerator { IsBlittable: true };
Marshalling\ResolvedGenerator.cs (3)
10public record struct ResolvedGenerator([property: MemberNotNullWhen(true, nameof(ResolvedGenerator.IsResolved), nameof(ResolvedGenerator.IsResolvedWithoutErrors))] IBoundMarshallingGenerator? Generator, ImmutableArray<GeneratorDiagnostic> Diagnostics) 20public static ResolvedGenerator Resolved(IBoundMarshallingGenerator generator) 30public static ResolvedGenerator ResolvedWithDiagnostics(IBoundMarshallingGenerator generator, ImmutableArray<GeneratorDiagnostic> diagnostics)
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
13public sealed class StaticPinnableManagedValueMarshaller(IBoundMarshallingGenerator innerMarshallingGenerator, TypeSyntax getPinnableReferenceType) : IBoundMarshallingGenerator
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
136internal sealed class FreeAlwaysOwnedOriginalValueGenerator(IBoundMarshallingGenerator inner) : IBoundMarshallingGenerator
VariableDeclarations.cs (5)
21foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 49foreach (IBoundMarshallingGenerator errorMarshaller in marshallers.SignatureMarshallers) 70static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault) 99foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 127static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault)