Implemented interface member:
property
CodeContext
Microsoft.Interop.ICustomTypeMarshallingStrategy.CodeContext
10 references to CodeContext
Microsoft.Interop.SourceGeneration (10)
Marshalling\StatelessMarshallingStrategy.cs (10)
181
if (MarshallerHelpers.GetCleanupStage(TypeInfo,
CodeContext
) is StubIdentifierContext.Stage.CleanupCallerAllocated
182
&& MarshallerHelpers.GetMarshalDirection(TypeInfo,
CodeContext
) != MarshalDirection.ManagedToUnmanaged)
185
writer.WriteLine($"{numElementsIdentifier} = {ElementsMarshalling.GenerateNumElementsExpression(countInfo, countInfoRequiresCast,
CodeContext
, context)};");
191
if (MarshallerHelpers.GetCleanupStage(TypeInfo,
CodeContext
) is StubIdentifierContext.Stage.CleanupCalleeAllocated
192
&& MarshallerHelpers.GetMarshalDirection(TypeInfo,
CodeContext
) != MarshalDirection.ManagedToUnmanaged)
195
writer.WriteLine($"{numElementsIdentifier} = {ElementsMarshalling.GenerateNumElementsExpression(countInfo, countInfoRequiresCast,
CodeContext
, context)};");
208
writer.WriteLine($"{numElementsIdentifier} = {ElementsMarshalling.GenerateNumElementsExpression(countInfo, countInfoRequiresCast,
CodeContext
, context)};");
216
&& MarshallerHelpers.CanUseCallerAllocatedBuffer(TypeInfo,
CodeContext
)))
253
if (
CodeContext
.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
264
writer.WriteLine($"{numElementsIdentifier} = {ElementsMarshalling.GenerateNumElementsExpression(countInfo, countInfoRequiresCast,
CodeContext
, context)};");