209 references to MarshalDirection
Microsoft.Interop.ComInterfaceGenerator (64)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (4)
190
if (srcCtx.VtableIndexData.Direction is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
194
if (srcCtx.VtableIndexData.Direction is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
88
var managedToUnmanagedFactory = new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags,
MarshalDirection
.ManagedToUnmanaged));
89
var unmanagedToManagedFactory = new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags,
MarshalDirection
.UnmanagedToManaged));
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (4)
92
if (stubContext.VtableIndexData.Direction is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
99
if (stubContext.VtableIndexData.Direction is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
ComInterfaceGenerator.cs (5)
270
var
direction = GetDirectionFromOptions(generatedComInterfaceAttributeData.Options);
423
private static
MarshalDirection
GetDirectionFromOptions(ComInterfaceOptions options)
427
return
MarshalDirection
.Bidirectional;
431
return
MarshalDirection
.UnmanagedToManaged;
435
return
MarshalDirection
.ManagedToUnmanaged;
ComInterfaceGeneratorHelpers.cs (10)
11
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.ManagedToUnmanaged);
12
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.UnmanagedToManaged);
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.ManagedToUnmanaged);
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.UnmanagedToManaged);
16
private static IMarshallingGeneratorResolver CreateGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
24
public static IMarshallingGeneratorResolver GetGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
27
(true,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
28
(true,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
29
(false,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
30
(false,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
ComMethodContext.cs (4)
78
if (GenerationContext.VtableIndexData.Direction is not (
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
98
if (GenerationContext.VtableIndexData.Direction is not (
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
17
return context.Direction ==
MarshalDirection
.UnmanagedToManaged
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (2)
19
MarshalDirection
.UnmanagedToManaged => new UnmanagedToManagedMarshaller().Bind(info, context),
20
MarshalDirection
.ManagedToUnmanaged => new ManagedToUnmanagedMarshaller().Bind(info, context),
Marshallers\ObjectUnwrapperResolver.cs (1)
16
return context.Direction ==
MarshalDirection
.UnmanagedToManaged
Marshallers\StructAsHResultMarshallerFactory.cs (4)
34
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
40
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
VirtualMethodIndexData.cs (2)
15
MarshalDirection
Direction,
42
public
MarshalDirection
Direction { get; init; }
VirtualMethodPointerStubGenerator.cs (6)
22
Func<EnvironmentFlags,
MarshalDirection
, IMarshallingGeneratorResolver> generatorResolverCreator)
34
generatorResolverCreator(methodStub.EnvironmentFlags,
MarshalDirection
.ManagedToUnmanaged),
77
Func<EnvironmentFlags,
MarshalDirection
, IMarshallingGeneratorResolver> generatorResolverCreator)
84
generatorResolverCreator(methodStub.EnvironmentFlags,
MarshalDirection
.UnmanagedToManaged));
193
Func<EnvironmentFlags,
MarshalDirection
, IMarshallingGeneratorResolver> generatorResolverCreator)
199
generatorResolverCreator(method.EnvironmentFlags,
MarshalDirection
.UnmanagedToManaged));
VtableIndexStubGenerator.cs (9)
48
.Where(data => data.VtableIndexData.Direction is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional);
87
.Where(data => data.VtableIndexData.Direction is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional);
227
MarshalDirection
direction =
MarshalDirection
.Bidirectional;
240
direction = (
MarshalDirection
)directionValue.Value!;
347
if (!virtualMethodIndexData.ImplicitThisParameter && virtualMethodIndexData.Direction is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
VtableIndexStubGeneratorHelpers.cs (10)
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.ManagedToUnmanaged);
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.UnmanagedToManaged);
15
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.ManagedToUnmanaged);
16
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.UnmanagedToManaged);
18
private static IMarshallingGeneratorResolver CreateGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
24
public static IMarshallingGeneratorResolver GetGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
27
(true,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
28
(true,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
29
(false,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
30
(false,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
Microsoft.Interop.JavaScript.JSImportGenerator (23)
JSGeneratorFactory.cs (2)
29
if (MarshallerHelpers.GetMarshalDirection(info, context) !=
MarshalDirection
.UnmanagedToManaged && info.ManagedIndex == TypePositionInfo.UnsetIndex)
48
bool isToJs = MarshallerHelpers.GetMarshalDirection(info, context) ==
MarshalDirection
.ManagedToUnmanaged;
Marshaling\BaseJSGenerator.cs (2)
32
MarshalDirection
marshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
34
&& marshalDirection ==
MarshalDirection
.ManagedToUnmanaged
Marshaling\FuncJSGenerator.cs (7)
15
MarshalDirection
marshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
17
if (marshalDirection ==
MarshalDirection
.UnmanagedToManaged
18
&& ((context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)
19
|| (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged)))
24
if (marshalDirection ==
MarshalDirection
.ManagedToUnmanaged
25
&& ((context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged)
26
|| (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)))
Marshaling\PrimitiveJSGenerator.cs (5)
17
MarshalDirection
marshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
19
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && marshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
24
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && marshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
Marshaling\TaskJSGenerator.cs (7)
14
MarshalDirection
marshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
16
if (marshalDirection ==
MarshalDirection
.UnmanagedToManaged
17
&& ((context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)
18
|| (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged)))
23
if (marshalDirection ==
MarshalDirection
.ManagedToUnmanaged
24
&& ((context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged)
25
|| (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)))
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
150
var factory = new ByValueContentsMarshalKindValidator(DefaultMarshallingGeneratorResolver.Create(env.EnvironmentFlags,
MarshalDirection
.ManagedToUnmanaged, TypeNames.LibraryImportAttribute_ShortName, []));
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
305
MarshalDirection
.ManagedToUnmanaged,
LibraryImportGenerator.cs (1)
306
: DefaultMarshallingGeneratorResolver.Create(pinvokeStub.EnvironmentFlags,
MarshalDirection
.ManagedToUnmanaged, TypeNames.LibraryImportAttribute_ShortName, []);
Microsoft.Interop.SourceGeneration (119)
BoundGenerators.cs (2)
68
if (errorHandlingInfo is not null && context.Direction ==
MarshalDirection
.ManagedToUnmanaged)
94
if (errorHandlingInfo is not null && context.Direction ==
MarshalDirection
.UnmanagedToManaged)
DefaultIdentifierContext.cs (5)
14
private readonly
MarshalDirection
_direction;
20
MarshalDirection
direction,
36
&& _direction ==
MarshalDirection
.ManagedToUnmanaged
51
&& _direction ==
MarshalDirection
.UnmanagedToManaged)
76
&& _direction ==
MarshalDirection
.ManagedToUnmanaged
GeneratedStatements.cs (2)
78
MarshalDirection
.ManagedToUnmanaged => GenerateStatementForNativeInvoke(marshallers, invokeContext, expressionToInvoke),
79
MarshalDirection
.UnmanagedToManaged => GenerateStatementForManagedInvoke(marshallers, invokeContext, expressionToInvoke),
ManagedToNativeStubGenerator.cs (2)
53
MarshalDirection
.ManagedToUnmanaged,
64
MarshalDirection
.ManagedToUnmanaged,
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (10)
117
MarshalDirection
elementDirection = MarshallerHelpers.GetMarshalDirection(info, context);
121
MarshalDirection
.ManagedToUnmanaged => marshallers.GetModeOrDefault(Options.ManagedToUnmanagedMode),
122
MarshalDirection
.Bidirectional => marshallers.GetModeOrDefault(Options.BidirectionalMode),
123
MarshalDirection
.UnmanagedToManaged => marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode),
215
if (MarshallerHelpers.GetMarshalDirection(info, context) !=
MarshalDirection
.ManagedToUnmanaged)
336
if (context.Direction ==
MarshalDirection
.ManagedToUnmanaged)
378
MarshalDirection
elementDirection = MarshallerHelpers.GetMarshalDirection(info, context);
381
if (elementDirection ==
MarshalDirection
.UnmanagedToManaged
391
if (elementDirection ==
MarshalDirection
.Bidirectional
401
if (elementDirection ==
MarshalDirection
.ManagedToUnmanaged
Marshalling\BlittableMarshaller.cs (5)
47
MarshalDirection
direction = MarshallerHelpers.GetMarshalDirection(info, codeContext);
54
if (direction is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional && info.IsByRef)
61
if (direction is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (5)
47
MarshalDirection
elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext);
55
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
62
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
Marshalling\BreakingChangeDetector.cs (1)
27
&& context.Direction ==
MarshalDirection
.UnmanagedToManaged)
Marshalling\CharMarshaller.cs (7)
61
MarshalDirection
elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext);
68
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
80
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
93
MarshalDirection
elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, context);
94
return !IsPinningPathSupported(info, context) && (elementMarshalDirection !=
MarshalDirection
.ManagedToUnmanaged || info.IsByRef);
Marshalling\CustomTypeMarshallingGenerator.cs (17)
24
MarshalDirection
elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext);
33
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional
34
|| (CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged && ShouldGenerateByValueOutMarshalling))
40
if (CodeContext.SingleFrameSpansNativeContext && elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged)
46
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
52
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
58
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
64
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional
65
|| (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && ShouldGenerateByValueOutMarshalling))
71
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional
72
|| (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && ShouldGenerateByValueOutMarshalling))
Marshalling\DefaultMarshallingGeneratorResolver.cs (4)
23
MarshalDirection
direction,
63
direction ==
MarshalDirection
.ManagedToUnmanaged
66
direction ==
MarshalDirection
.ManagedToUnmanaged
69
direction ==
MarshalDirection
.ManagedToUnmanaged
Marshalling\DelegateMarshaller.cs (7)
25
MarshalDirection
elementMarshalDirection = MarshallerHelpers.GetMarshalDirection(info, codeContext);
32
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
39
if (elementMarshalDirection is
MarshalDirection
.UnmanagedToManaged or
MarshalDirection
.Bidirectional)
46
if (elementMarshalDirection is
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.Bidirectional)
Marshalling\ElementsMarshalling.cs (3)
224
string source = MarshallerHelpers.GetMarshalDirection(CollectionSource.TypeInfo, CollectionSource.CodeContext) ==
MarshalDirection
.ManagedToUnmanaged
241
if (CollectionSource.CodeContext.Direction is
MarshalDirection
.UnmanagedToManaged && CollectionSource.TypeInfo.ByValueContentsMarshalKind is ByValueContentsMarshalKind.Out)
350
&& MarshallerHelpers.GetMarshalDirection(info, context) !=
MarshalDirection
.UnmanagedToManaged;
Marshalling\IidParameterIndexMarshallerResolver.cs (1)
11
|| context.Direction !=
MarshalDirection
.UnmanagedToManaged)
Marshalling\MarshallerHelpers.cs (28)
250
public static
MarshalDirection
GetMarshalDirection(TypePositionInfo info, StubCodeContext context)
252
if (context.Direction is not (
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.UnmanagedToManaged))
257
if (context.Direction ==
MarshalDirection
.ManagedToUnmanaged)
262
?
MarshalDirection
.Bidirectional
263
:
MarshalDirection
.UnmanagedToManaged;
268
return
MarshalDirection
.UnmanagedToManaged;
272
return
MarshalDirection
.ManagedToUnmanaged;
278
return
MarshalDirection
.ManagedToUnmanaged;
280
return
MarshalDirection
.Bidirectional;
282
return
MarshalDirection
.UnmanagedToManaged;
290
return
MarshalDirection
.ManagedToUnmanaged;
294
return
MarshalDirection
.UnmanagedToManaged;
300
return
MarshalDirection
.UnmanagedToManaged;
302
return
MarshalDirection
.Bidirectional;
304
return
MarshalDirection
.ManagedToUnmanaged;
317
if (context.Direction is
MarshalDirection
.UnmanagedToManaged)
322
MarshalDirection
.UnmanagedToManaged => StubIdentifierContext.Stage.CleanupCalleeAllocated,
323
MarshalDirection
.ManagedToUnmanaged => StubIdentifierContext.Stage.CleanupCallerAllocated,
324
MarshalDirection
.Bidirectional => StubIdentifierContext.Stage.CleanupCallerAllocated,
334
public static void ValidateCountInfoAvailableAtCall(
MarshalDirection
stubDirection, TypePositionInfo info, GeneratorDiagnosticsBag generatorDiagnostics, IMethodSymbol symbol, DiagnosticDescriptor outParamDescriptor, DiagnosticDescriptor returnValueDescriptor)
338
if (stubDirection is
MarshalDirection
.ManagedToUnmanaged)
429
public static bool IsInStubReturnPosition(TypePositionInfo info,
MarshalDirection
direction)
433
MarshalDirection
.ManagedToUnmanaged => info.IsManagedReturnPosition,
434
MarshalDirection
.UnmanagedToManaged => info.IsNativeReturnPosition,
444
public static bool IsInInvocationReturnPosition(TypePositionInfo info,
MarshalDirection
direction)
448
MarshalDirection
.ManagedToUnmanaged => info.IsNativeReturnPosition,
449
MarshalDirection
.UnmanagedToManaged => info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (2)
54
if (generator.CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)
60
else if (generator.CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged)
Marshalling\StatefulMarshallingStrategy.cs (5)
209
if (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
215
if (CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
235
if (MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) is not
MarshalDirection
.ManagedToUnmanaged
252
if (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
257
if (CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (8)
182
&& MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) !=
MarshalDirection
.ManagedToUnmanaged)
192
&& MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) !=
MarshalDirection
.ManagedToUnmanaged)
253
if (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
332
if (countInfo is NoCountInfo && MarshallerHelpers.GetMarshalDirection(TypeInfo, CodeContext) ==
MarshalDirection
.ManagedToUnmanaged)
381
if (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
386
if (CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
415
if (CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
420
if (CodeContext.Direction ==
MarshalDirection
.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
StubCodeContext.cs (3)
29
MarshalDirection
Direction)
34
Direction:
MarshalDirection
.ManagedToUnmanaged);
39
Direction:
MarshalDirection
.UnmanagedToManaged);
UnmanagedToManagedStubGenerator.cs (2)
27
_context = new DefaultIdentifierContext(ReturnIdentifier, $"{ReturnIdentifier}{StubIdentifierContext.GeneratedNativeIdentifierSuffix}",
MarshalDirection
.UnmanagedToManaged);
31
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier,
MarshalDirection
.UnmanagedToManaged);