Marshalling\ElementsMarshalling.cs (21)
67=> MarshallerHelpers.GetIndexedManagedElementExpression(paramInfo, codeContext, context);
82string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
88string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
154string managedSpanIdentifier = MarshallerHelpers.GetManagedSpanIdentifier(CollectionSource.TypeInfo, context);
155string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
174string managedSpanIdentifier = MarshallerHelpers.GetManagedSpanIdentifier(CollectionSource.TypeInfo, context);
175string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
189string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(CollectionSource.TypeInfo, context);
190string managedSpanIdentifier = MarshallerHelpers.GetManagedSpanIdentifier(CollectionSource.TypeInfo, context);
191string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
205string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
208? MarshallerHelpers.GetLastIndexMarshalledIdentifier(CollectionSource.TypeInfo, context)
224string source = MarshallerHelpers.GetMarshalDirection(CollectionSource.TypeInfo, CollectionSource.CodeContext) == MarshalDirection.ManagedToUnmanaged
235string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(CollectionSource.TypeInfo, context);
236string managedSpanIdentifier = MarshallerHelpers.GetManagedSpanIdentifier(CollectionSource.TypeInfo, context);
237string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
267string managedSpanIdentifier = MarshallerHelpers.GetManagedSpanIdentifier(CollectionSource.TypeInfo, context);
268string nativeSpanIdentifier = MarshallerHelpers.GetNativeSpanIdentifier(CollectionSource.TypeInfo, context);
337incrementors += $", ++{MarshallerHelpers.GetLastIndexMarshalledIdentifier(CollectionSource.TypeInfo, context)}";
350&& MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.UnmanagedToManaged;
363writer.WriteLine($"int {MarshallerHelpers.GetLastIndexMarshalledIdentifier(CollectionSource.TypeInfo, context)} = 0;");
Marshalling\StatefulMarshallingStrategy.cs (11)
17if (MarshallerHelpers.GetCleanupStage(info, stubContext) is StubIdentifierContext.Stage.CleanupCallerAllocated
26if (MarshallerHelpers.GetCleanupStage(info, stubContext) is StubIdentifierContext.Stage.CleanupCalleeAllocated
118if (MarshallerHelpers.CanUseCallerAllocatedBuffer(TypeInfo, CodeContext))
158string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
165string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
235if (MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) is not MarshalDirection.ManagedToUnmanaged
238string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
240writer.WriteLine(MarshallerHelpers.SkipInitOrDefaultInit(
267string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
289if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated)
298if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCalleeAllocated)
Marshalling\StatelessMarshallingStrategy.cs (23)
100if (!MarshallerHelpers.CanUseCallerAllocatedBuffer(TypeInfo, CodeContext))
112string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
139if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated)
150if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCalleeAllocated)
181if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated
182&& MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) != MarshalDirection.ManagedToUnmanaged)
184string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
191if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCalleeAllocated
192&& MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) != MarshalDirection.ManagedToUnmanaged)
194string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
207string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
216&& MarshallerHelpers.CanUseCallerAllocatedBuffer(TypeInfo, CodeContext)))
219string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
238string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
240writer.WriteLine(MarshallerHelpers.SkipInitOrDefaultInit(
263string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
276string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
289string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
331string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
332if (countInfo is NoCountInfo && MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) == MarshalDirection.ManagedToUnmanaged)
346if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated)
365string numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(TypeInfo, context);
371if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated)