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)
12
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.ManagedToUnmanaged);
13
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.UnmanagedToManaged);
14
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.ManagedToUnmanaged);
15
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.UnmanagedToManaged);
17
private static IMarshallingGeneratorResolver CreateGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
25
public static IMarshallingGeneratorResolver GetGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
28
(true,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
29
(true,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
30
(false,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
31
(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)
14
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.ManagedToUnmanaged);
15
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling,
MarshalDirection
.UnmanagedToManaged);
16
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.ManagedToUnmanaged);
17
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None,
MarshalDirection
.UnmanagedToManaged);
19
private static IMarshallingGeneratorResolver CreateGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
25
public static IMarshallingGeneratorResolver GetGeneratorResolver(EnvironmentFlags env,
MarshalDirection
direction)
28
(true,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
29
(true,
MarshalDirection
.UnmanagedToManaged) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
30
(false,
MarshalDirection
.ManagedToUnmanaged) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
31
(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)
118
MarshalDirection
elementDirection = MarshallerHelpers.GetMarshalDirection(info, context);
122
MarshalDirection
.ManagedToUnmanaged => marshallers.GetModeOrDefault(Options.ManagedToUnmanagedMode),
123
MarshalDirection
.Bidirectional => marshallers.GetModeOrDefault(Options.BidirectionalMode),
124
MarshalDirection
.UnmanagedToManaged => marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode),
216
if (MarshallerHelpers.GetMarshalDirection(info, context) !=
MarshalDirection
.ManagedToUnmanaged)
337
if (context.Direction ==
MarshalDirection
.ManagedToUnmanaged)
379
MarshalDirection
elementDirection = MarshallerHelpers.GetMarshalDirection(info, context);
382
if (elementDirection ==
MarshalDirection
.UnmanagedToManaged
392
if (elementDirection ==
MarshalDirection
.Bidirectional
402
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)
225
string source = MarshallerHelpers.GetMarshalDirection(CollectionSource.TypeInfo, CollectionSource.CodeContext) ==
MarshalDirection
.ManagedToUnmanaged
242
if (CollectionSource.CodeContext.Direction is
MarshalDirection
.UnmanagedToManaged && CollectionSource.TypeInfo.ByValueContentsMarshalKind is ByValueContentsMarshalKind.Out)
351
&& MarshallerHelpers.GetMarshalDirection(info, context) !=
MarshalDirection
.UnmanagedToManaged;
Marshalling\IidParameterIndexMarshallerResolver.cs (1)
11
|| context.Direction !=
MarshalDirection
.UnmanagedToManaged)
Marshalling\MarshallerHelpers.cs (28)
251
public static
MarshalDirection
GetMarshalDirection(TypePositionInfo info, StubCodeContext context)
253
if (context.Direction is not (
MarshalDirection
.ManagedToUnmanaged or
MarshalDirection
.UnmanagedToManaged))
258
if (context.Direction ==
MarshalDirection
.ManagedToUnmanaged)
263
?
MarshalDirection
.Bidirectional
264
:
MarshalDirection
.UnmanagedToManaged;
269
return
MarshalDirection
.UnmanagedToManaged;
273
return
MarshalDirection
.ManagedToUnmanaged;
279
return
MarshalDirection
.ManagedToUnmanaged;
281
return
MarshalDirection
.Bidirectional;
283
return
MarshalDirection
.UnmanagedToManaged;
291
return
MarshalDirection
.ManagedToUnmanaged;
295
return
MarshalDirection
.UnmanagedToManaged;
301
return
MarshalDirection
.UnmanagedToManaged;
303
return
MarshalDirection
.Bidirectional;
305
return
MarshalDirection
.ManagedToUnmanaged;
318
if (context.Direction is
MarshalDirection
.UnmanagedToManaged)
323
MarshalDirection
.UnmanagedToManaged => StubIdentifierContext.Stage.CleanupCalleeAllocated,
324
MarshalDirection
.ManagedToUnmanaged => StubIdentifierContext.Stage.CleanupCallerAllocated,
325
MarshalDirection
.Bidirectional => StubIdentifierContext.Stage.CleanupCallerAllocated,
335
public static void ValidateCountInfoAvailableAtCall(
MarshalDirection
stubDirection, TypePositionInfo info, GeneratorDiagnosticsBag generatorDiagnostics, IMethodSymbol symbol, DiagnosticDescriptor outParamDescriptor, DiagnosticDescriptor returnValueDescriptor)
339
if (stubDirection is
MarshalDirection
.ManagedToUnmanaged)
430
public static bool IsInStubReturnPosition(TypePositionInfo info,
MarshalDirection
direction)
434
MarshalDirection
.ManagedToUnmanaged => info.IsManagedReturnPosition,
435
MarshalDirection
.UnmanagedToManaged => info.IsNativeReturnPosition,
445
public static bool IsInInvocationReturnPosition(TypePositionInfo info,
MarshalDirection
direction)
449
MarshalDirection
.ManagedToUnmanaged => info.IsNativeReturnPosition,
450
MarshalDirection
.UnmanagedToManaged => info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (2)
55
if (generator.CodeContext.Direction ==
MarshalDirection
.ManagedToUnmanaged)
61
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);