49 references to IBoundMarshallingGenerator
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSGeneratorFactory.cs (1)
330ResolvedGeneratorAndType resolved(IBoundMarshallingGenerator generator, MarshalerType baseType, IEnumerable<MarshalerType>? subTypes = null)
Marshaling\BaseJSGenerator.cs (1)
15internal abstract class BaseJSGenerator(TypePositionInfo info, StubCodeContext codeContext) : IBoundMarshallingGenerator
Microsoft.Interop.SourceGeneration (47)
BoundGenerators.cs (19)
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; 46IBoundMarshallingGenerator generator = CreateGenerator(argType, generatorResolver); 77IBoundMarshallingGenerator? overlappedMarshaller = null; 185IBoundMarshallingGenerator CreateGenerator(TypePositionInfo p, IMarshallingGeneratorResolver factory) 193public IBoundMarshallingGenerator ManagedReturnMarshaller { get; private init; } 195public IBoundMarshallingGenerator NativeReturnMarshaller { get; private init; } 197public IBoundMarshallingGenerator ManagedExceptionMarshaller { get; private init; } 199public ImmutableArray<IBoundMarshallingGenerator> SignatureMarshallers { get; private init; } 201public ImmutableArray<IBoundMarshallingGenerator> ManagedParameterMarshallers { get; private init; } 203public ImmutableArray<IBoundMarshallingGenerator> NativeParameterMarshallers { get; private init; }
GeneratedStatements.cs (4)
75foreach (IBoundMarshallingGenerator marshaller in marshallers.SignatureMarshallers) 99foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 133foreach (IBoundMarshallingGenerator marshaller in marshallers.ManagedParameterMarshallers) 160IBoundMarshallingGenerator managedExceptionMarshaller = marshallers.ManagedExceptionMarshaller;
ManagedToNativeStubGenerator.cs (1)
81foreach (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\CustomTypeMarshallingGenerator.cs (1)
14: IBoundMarshallingGenerator
Marshalling\MarshallingGenerator.cs (1)
156internal sealed class BoundMarshallingGenerator(TypePositionInfo info, StubCodeContext context, IUnboundMarshallingGenerator unbound) : IBoundMarshallingGenerator
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 (2)
13public sealed class StaticPinnableManagedValueMarshaller(IBoundMarshallingGenerator innerMarshallingGenerator, TypeSyntax getPinnableReferenceType) : IBoundMarshallingGenerator
VariableDeclarations.cs (4)
21foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 55static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault) 84foreach (IBoundMarshallingGenerator marshaller in marshallers.NativeParameterMarshallers) 112static void AppendVariableDeclarations(ImmutableArray<LocalDeclarationStatementSyntax>.Builder statementsToUpdate, IBoundMarshallingGenerator marshaller, StubIdentifierContext context, bool initializeToDefault)