33 references to MarshallerHelpers
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceGenerator.cs (1)
358MarshallerHelpers.ValidateCountInfoAvailableAtCall(
ComMethodContext.cs (1)
149? Argument(IdentifierName(info.InstanceIdentifier)).WithRefKindKeyword(MarshallerHelpers.GetManagedArgumentRefKindKeyword(info))
Marshallers\StructAsHResultMarshallerFactory.cs (2)
39if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.ManagedToUnmanaged or MarshalDirection.Bidirectional) 57if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Microsoft.Interop.SourceGeneration (29)
BoundGenerators.cs (2)
118SignatureMarshallers = MarshallerHelpers.GetTopologicallySortedElements( 137return MarshallerHelpers.GetDependentElementsOfMarshallingInfo(info.MarshallingAttributeInfo)
DefaultIdentifierContext.cs (2)
30if (MarshallerHelpers.IsInStubReturnPosition(info, _direction)) 45else if (MarshallerHelpers.IsInInvocationReturnPosition(info, _direction))
LinearCollectionElementIdentifierContext.cs (1)
17public string IndexerIdentifier => MarshallerHelpers.GetIndexerIdentifier(_elementIndirectionLevel - 1);
ManagedToNativeStubGenerator.cs (3)
140StatementSyntax clearLastError = MarshallerHelpers.CreateClearLastSystemErrorStatement(SuccessErrorCode); 142StatementSyntax getLastError = MarshallerHelpers.CreateGetLastSystemErrorStatement(LastErrorIdentifier); 186allStatements.Add(MarshallerHelpers.CreateSetLastPInvokeErrorStatement(LastErrorIdentifier));
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (3)
133MarshalDirection elementDirection = MarshallerHelpers.GetMarshalDirection(info, context); 231if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.ManagedToUnmanaged) 419MarshalDirection elementDirection = MarshallerHelpers.GetMarshalDirection(info, context);
Marshalling\BlittableMarshaller.cs (1)
65MarshalDirection direction = MarshallerHelpers.GetMarshalDirection(info, codeContext);
Marshalling\BoolMarshaller.cs (1)
52MarshalDirection elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext);
Marshalling\CharMarshaller.cs (2)
82MarshalDirection elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext); 125MarshalDirection elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, context);
Marshalling\CustomTypeMarshallingGenerator.cs (1)
28MarshalDirection elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
Marshalling\DelegateMarshaller.cs (1)
32MarshalDirection elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext);
Marshalling\ElementsMarshalling.cs (3)
98return MarshallerHelpers.GetIndexedManagedElementExpression(paramInfo, codeContext, context); 115var numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context); 129var numElementsIdentifier = MarshallerHelpers.GetNumElementsIdentifier(info, context);
Marshalling\MarshallingGeneratorExtensions.cs (3)
107.WithModifiers(MarshallerHelpers.GetManagedParameterModifiers(info)) 146ValueBoundaryBehavior.ManagedIdentifier when info.IsByRef => Argument(IdentifierName(managedIdentifier)).WithRefKindKeyword(MarshallerHelpers.GetManagedArgumentRefKindKeyword(info)), 160return Argument(IdentifierName(managedIdentifier)).WithRefKindKeyword(MarshallerHelpers.GetManagedArgumentRefKindKeyword(info));
Marshalling\StatefulMarshallingStrategy.cs (2)
27if (MarshallerHelpers.GetCleanupStage(info, stubContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated) 41if (MarshallerHelpers.GetCleanupStage(info, stubContext) is not StubIdentifierContext.Stage.CleanupCalleeAllocated)
MarshallingAttributeInfo.cs (1)
136_ => CreateWellKnownComExceptionMarshallingData($"{TypeNames.ExceptionAsDefaultMarshaller}<{MarshallerHelpers.GetCompatibleGenericTypeParameterSyntax(SyntaxFactory.ParseTypeName(unmanagedReturnType.FullTypeName))}>", unmanagedReturnType),
SignatureContext.cs (1)
47.WithModifiers(MarshallerHelpers.GetManagedParameterModifiers(typeInfo));
StubCodeContext.cs (1)
61return MarshallerHelpers.IsInStubReturnPosition(info, Direction);
VariableDeclarations.cs (1)
29initializations.Add(MarshallerHelpers.DefaultInit(info, context));