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