61 references to ManagedToUnmanaged
Microsoft.Interop.ComInterfaceGenerator (15)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
84
var managedToUnmanagedFactory = ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
);
ComInterfaceGenerator.cs (1)
407
return MarshalDirection.
ManagedToUnmanaged
;
ComInterfaceGeneratorHelpers.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
);
29
(true, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedDisabledMarshallingGeneratorResolver,
31
(false, MarshalDirection.
ManagedToUnmanaged
) => s_managedToUnmanagedEnabledMarshallingGeneratorResolver,
ComMethodContext.cs (1)
80
if (GenerationContext.VtableIndexData.Direction is not (MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional) || IsHiddenOnDerivedInterface)
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
25
MarshalDirection.
ManagedToUnmanaged
=> new ManagedToUnmanagedMarshaller().Bind(info, context),
Marshallers\StructAsHResultMarshallerFactory.cs (1)
39
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
VirtualMethodPointerStubGenerator.cs (1)
41
generatorResolverCreator(methodStub.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
),
VtableIndexStubGenerator.cs (1)
80
.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 (8)
JSImportCodeGenerator.cs (2)
47
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnNativeIdentifier, MarshalDirection.
ManagedToUnmanaged
)
54
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.
ManagedToUnmanaged
)
Marshaling\FuncJSGenerator.cs (2)
48
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& TypeInfo.IsManagedReturnPosition)
63
if (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& !TypeInfo.IsManagedReturnPosition)
Marshaling\PrimitiveJSGenerator.cs (2)
36
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& TypeInfo.IsManagedReturnPosition)
51
if (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& !TypeInfo.IsManagedReturnPosition)
Marshaling\TaskJSGenerator.cs (2)
49
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& TypeInfo.IsManagedReturnPosition)
68
if (context.CurrentStage == StubIdentifierContext.Stage.PinnedMarshal && CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& !TypeInfo.IsManagedReturnPosition)
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
150
var factory = DefaultMarshallingGeneratorResolver.Create(env.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
, TypeNames.LibraryImportAttribute_ShortName, []);
LibraryImportGenerator.cs (1)
338
: DefaultMarshallingGeneratorResolver.Create(pinvokeStub.EnvironmentFlags, MarshalDirection.
ManagedToUnmanaged
, TypeNames.LibraryImportAttribute_ShortName, []);
Microsoft.Interop.SourceGeneration (36)
GeneratedStatements.cs (1)
52
if (codeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)
ManagedToNativeStubGenerator.cs (2)
66
_context = new DefaultIdentifierContext(ReturnIdentifier, $"{ReturnIdentifier}{StubIdentifierContext.GeneratedNativeIdentifierSuffix}", MarshalDirection.
ManagedToUnmanaged
)
73
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.
ManagedToUnmanaged
)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (4)
137
MarshalDirection.
ManagedToUnmanaged
=> marshallers.GetModeOrDefault(Options.ManagedToUnmanagedMode),
231
if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.
ManagedToUnmanaged
)
369
if (context.Direction == MarshalDirection.
ManagedToUnmanaged
)
441
if (elementDirection == MarshalDirection.
ManagedToUnmanaged
Marshalling\BlittableMarshaller.cs (1)
72
if (direction is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (1)
60
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshalling\CharMarshaller.cs (2)
89
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
126
return !IsPinningPathSupported(info, context) && (elementMarshalDirection != MarshalDirection.
ManagedToUnmanaged
|| info.IsByRef);
Marshalling\CustomTypeMarshallingGenerator.cs (6)
36
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional
43
if (CodeContext.SingleFrameSpansNativeContext && elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
)
49
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
55
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
68
|| (CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
&& ShouldGenerateByValueOutMarshalling))
75
|| (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)
39
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
80
if (elementMarshalDirection is MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.Bidirectional)
Marshalling\MarshallerHelpers.cs (12)
292
/// For example, an out parameter is marshalled in the <see cref="MarshalDirection.UnmanagedToManaged"/> direction in a <see cref="MarshalDirection.
ManagedToUnmanaged
"/> stub,
293
/// but from <see cref="MarshalDirection.
ManagedToUnmanaged
"/> in a <see cref="MarshalDirection.UnmanagedToManaged"/> stub.
300
if (context.Direction is not (MarshalDirection.
ManagedToUnmanaged
or MarshalDirection.UnmanagedToManaged))
305
if (context.Direction == MarshalDirection.
ManagedToUnmanaged
)
313
return MarshalDirection.
ManagedToUnmanaged
;
319
return MarshalDirection.
ManagedToUnmanaged
;
331
return MarshalDirection.
ManagedToUnmanaged
;
345
return MarshalDirection.
ManagedToUnmanaged
;
364
MarshalDirection.
ManagedToUnmanaged
=> StubIdentifierContext.Stage.CleanupCallerAllocated,
379
if (stubDirection is MarshalDirection.
ManagedToUnmanaged
)
475
MarshalDirection.
ManagedToUnmanaged
=> info.IsManagedReturnPosition,
490
MarshalDirection.
ManagedToUnmanaged
=> info.IsNativeReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
67
if (generator.CodeContext.Direction == MarshalDirection.
ManagedToUnmanaged
)
StubCodeContext.cs (1)
34
Direction: MarshalDirection.
ManagedToUnmanaged
);