52 references to UnmanagedToManaged
Microsoft.Interop.ComInterfaceGenerator (19)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
85
var unmanagedToManagedFactory = ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
);
ComInterfaceGenerator.cs (1)
403
return MarshalDirection.
UnmanagedToManaged
;
ComInterfaceGeneratorHelpers.cs (4)
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
UnmanagedToManaged
);
16
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
UnmanagedToManaged
);
30
(true, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
32
(false, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
ComMethodContext.cs (1)
94
if (GenerationContext.VtableIndexData.Direction is not (MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional) || IsHiddenOnDerivedInterface)
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
23
return context.Direction == MarshalDirection.
UnmanagedToManaged
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
24
MarshalDirection.
UnmanagedToManaged
=> new UnmanagedToManagedMarshaller().Bind(info, context),
Marshallers\ObjectUnwrapperResolver.cs (1)
21
return context.Direction == MarshalDirection.
UnmanagedToManaged
Marshallers\StructAsHResultMarshallerFactory.cs (1)
57
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
VirtualMethodPointerStubGenerator.cs (2)
142
generatorResolverCreator(methodStub.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
));
269
generatorResolverCreator(method.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
));
VtableIndexStubGenerator.cs (2)
94
.Where(data => data.VtableIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional);
265
if (!virtualMethodIndexData.ImplicitThisParameter && virtualMethodIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
VtableIndexStubGeneratorHelpers.cs (4)
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
UnmanagedToManaged
);
16
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
UnmanagedToManaged
);
28
(true, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
30
(false, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSGeneratorFactory.cs (1)
29
if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.
UnmanagedToManaged
&& info.ManagedIndex == TypePositionInfo.UnsetIndex)
Marshaling\FuncJSGenerator.cs (2)
35
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& TypeInfo.IsManagedReturnPosition)
45
if (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsManagedReturnPosition)
Marshaling\PrimitiveJSGenerator.cs (1)
26
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && marshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshaling\TaskJSGenerator.cs (2)
32
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& TypeInfo.IsManagedReturnPosition)
46
if (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsManagedReturnPosition)
Microsoft.Interop.SourceGeneration (27)
GeneratedStatements.cs (1)
59
else if (codeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (2)
139
MarshalDirection.
UnmanagedToManaged
=> marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode),
421
if (elementDirection == MarshalDirection.
UnmanagedToManaged
Marshalling\BlittableMarshaller.cs (1)
83
if (direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (1)
76
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\BreakingChangeDetector.cs (1)
27
&& context.Direction == MarshalDirection.
UnmanagedToManaged
)
Marshalling\CharMarshaller.cs (1)
105
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\CustomTypeMarshallingGenerator.cs (4)
37
|| (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& ShouldGenerateByValueOutMarshalling))
61
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
67
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional
74
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional
Marshalling\DelegateMarshaller.cs (1)
58
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\MarshallerHelpers.cs (11)
265
/// For example, an out parameter is marshalled in the <see cref="MarshalDirection.
UnmanagedToManaged
"/> direction in a <see cref="MarshalDirection.ManagedToUnmanaged"/> stub,
266
/// but from <see cref="MarshalDirection.ManagedToUnmanaged"/> in a <see cref="MarshalDirection.
UnmanagedToManaged
"/> stub.
273
if (context.Direction is not (MarshalDirection.ManagedToUnmanaged or MarshalDirection.
UnmanagedToManaged
))
282
return MarshalDirection.
UnmanagedToManaged
;
296
return MarshalDirection.
UnmanagedToManaged
;
308
return MarshalDirection.
UnmanagedToManaged
;
314
return MarshalDirection.
UnmanagedToManaged
;
331
if (context.Direction is MarshalDirection.
UnmanagedToManaged
)
336
MarshalDirection.
UnmanagedToManaged
=> StubIdentifierContext.Stage.CleanupCalleeAllocated,
449
MarshalDirection.
UnmanagedToManaged
=> info.IsNativeReturnPosition,
464
MarshalDirection.
UnmanagedToManaged
=> info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
73
else if (generator.CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
StubCodeContext.cs (1)
39
Direction: MarshalDirection.
UnmanagedToManaged
);
UnmanagedToManagedStubGenerator.cs (2)
34
_context = new DefaultIdentifierContext(ReturnIdentifier, $"{ReturnIdentifier}{StubIdentifierContext.GeneratedNativeIdentifierSuffix}", MarshalDirection.
UnmanagedToManaged
);
38
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.
UnmanagedToManaged
);