76 references to ManagedToUnmanaged
Microsoft.Interop.ComInterfaceGenerator (17)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
190
if (srcCtx.VtableIndexData.Direction is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
88
var managedToUnmanagedFactory = new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
));
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
92
if (stubContext.VtableIndexData.Direction is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
ComInterfaceGenerator.cs (1)
435
return MarshalDirection.
ManagedToUnmanaged
;
ComInterfaceGeneratorHelpers.cs (4)
11
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
ManagedToUnmanaged
);
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
ManagedToUnmanaged
);
27
(true, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
29
(false, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
ComMethodContext.cs (1)
78
if (GenerationContext.VtableIndexData.Direction is not (MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
20
MarshalDirection.
ManagedToUnmanaged
=> new ManagedToUnmanagedMarshaller().Bind(info, context),
Marshallers\StructAsHResultMarshallerFactory.cs (1)
34
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
VirtualMethodPointerStubGenerator.cs (1)
34
generatorResolverCreator(methodStub.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
),
VtableIndexStubGenerator.cs (1)
48
.Where(data => data.VtableIndexData.Direction is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional);
VtableIndexStubGeneratorHelpers.cs (4)
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
ManagedToUnmanaged
);
15
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
ManagedToUnmanaged
);
27
(true, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
29
(false, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
Microsoft.Interop.JavaScript.JSImportGenerator (9)
JSGeneratorFactory.cs (1)
48
bool isToJs = MarshallerHelpers.GetMarshalDirection(info, context) == MarshalDirection.
ManagedToUnmanaged
;
Marshaling\BaseJSGenerator.cs (1)
34
&& marshalDirection == MarshalDirection.
ManagedToUnmanaged
Marshaling\FuncJSGenerator.cs (3)
18
&& ((context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)
24
if (marshalDirection == MarshalDirection.
ManagedToUnmanaged
26
|| (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)))
Marshaling\PrimitiveJSGenerator.cs (1)
24
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && marshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshaling\TaskJSGenerator.cs (3)
17
&& ((context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)
23
if (marshalDirection == MarshalDirection.
ManagedToUnmanaged
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 (47)
BoundGenerators.cs (1)
68
if (errorHandlingInfo is not null && context.Direction == MarshalDirection.
ManagedToUnmanaged
)
DefaultIdentifierContext.cs (2)
36
&& _direction == MarshalDirection.
ManagedToUnmanaged
76
&& _direction == MarshalDirection.
ManagedToUnmanaged
GeneratedStatements.cs (1)
78
MarshalDirection.
ManagedToUnmanaged
=> GenerateStatementForNativeInvoke(marshallers, invokeContext, expressionToInvoke),
ManagedToNativeStubGenerator.cs (2)
53
MarshalDirection.
ManagedToUnmanaged
,
64
MarshalDirection.
ManagedToUnmanaged
,
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (4)
121
MarshalDirection.
ManagedToUnmanaged
=> marshallers.GetModeOrDefault(Options.ManagedToUnmanagedMode),
215
if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.
ManagedToUnmanaged
)
336
if (context.Direction == MarshalDirection.
ManagedToUnmanaged
)
401
if (elementDirection == MarshalDirection.
ManagedToUnmanaged
Marshalling\BlittableMarshaller.cs (1)
54
if (direction is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (1)
55
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshalling\CharMarshaller.cs (2)
68
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
94
return !IsPinningPathSupported(info, context) && (elementMarshalDirection != MarshalDirection.
ManagedToUnmanaged
|| info.IsByRef);
Marshalling\CustomTypeMarshallingGenerator.cs (6)
33
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional
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)
65
|| (CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& ShouldGenerateByValueOutMarshalling))
72
|| (CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& ShouldGenerateByValueOutMarshalling))
Marshalling\DefaultMarshallingGeneratorResolver.cs (3)
63
direction == MarshalDirection.
ManagedToUnmanaged
66
direction == MarshalDirection.
ManagedToUnmanaged
69
direction == MarshalDirection.
ManagedToUnmanaged
Marshalling\DelegateMarshaller.cs (2)
32
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
46
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshalling\ElementsMarshalling.cs (1)
224
string source = MarshallerHelpers.GetMarshalDirection(CollectionSource.TypeInfo, CollectionSource.CodeContext) == MarshalDirection.
ManagedToUnmanaged
Marshalling\MarshallerHelpers.cs (10)
252
if (context.Direction is not (MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.UnmanagedToManaged))
257
if (context.Direction == MarshalDirection.
ManagedToUnmanaged
)
272
return MarshalDirection.
ManagedToUnmanaged
;
278
return MarshalDirection.
ManagedToUnmanaged
;
290
return MarshalDirection.
ManagedToUnmanaged
;
304
return MarshalDirection.
ManagedToUnmanaged
;
323
MarshalDirection.
ManagedToUnmanaged
=> StubIdentifierContext.Stage.CleanupCallerAllocated,
338
if (stubDirection is MarshalDirection.
ManagedToUnmanaged
)
433
MarshalDirection.
ManagedToUnmanaged
=> info.IsManagedReturnPosition,
448
MarshalDirection.
ManagedToUnmanaged
=> info.IsNativeReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
54
if (generator.CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)
Marshalling\StatefulMarshallingStrategy.cs (3)
209
if (CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == 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))
Marshalling\StatelessMarshallingStrategy.cs (6)
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)
415
if (CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
StubCodeContext.cs (1)
34
Direction: MarshalDirection.
ManagedToUnmanaged
);