55 references to UnmanagedToManaged
Microsoft.Interop.ComInterfaceGenerator (21)
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)
UnmanagedToManagedStubGenerator.cs (2)
34
_context = new DefaultIdentifierContext(ReturnIdentifier, $"{ReturnIdentifier}{StubIdentifierContext.GeneratedNativeIdentifierSuffix}", MarshalDirection.
UnmanagedToManaged
);
38
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.
UnmanagedToManaged
);
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 (9)
JSExportCodeGenerator.cs (2)
40
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnNativeIdentifier, MarshalDirection.
UnmanagedToManaged
)
47
_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.
UnmanagedToManaged
)
JSGeneratorFactory.cs (1)
36
bool isToJs = info.ManagedIndex != TypePositionInfo.ReturnIndex ^ context.Direction == MarshalDirection.
UnmanagedToManaged
;
Marshaling\FuncJSGenerator.cs (2)
53
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& TypeInfo.IsManagedReturnPosition)
68
if (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsManagedReturnPosition)
Marshaling\PrimitiveJSGenerator.cs (2)
41
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& TypeInfo.IsManagedReturnPosition)
56
if (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsManagedReturnPosition)
Marshaling\TaskJSGenerator.cs (2)
56
if (context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& TypeInfo.IsManagedReturnPosition)
75
if (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsManagedReturnPosition)
Microsoft.Interop.SourceGeneration (25)
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)
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
))
309
return MarshalDirection.
UnmanagedToManaged
;
323
return MarshalDirection.
UnmanagedToManaged
;
335
return MarshalDirection.
UnmanagedToManaged
;
341
return MarshalDirection.
UnmanagedToManaged
;
358
if (context.Direction is MarshalDirection.
UnmanagedToManaged
)
363
MarshalDirection.
UnmanagedToManaged
=> StubIdentifierContext.Stage.CleanupCalleeAllocated,
476
MarshalDirection.
UnmanagedToManaged
=> info.IsNativeReturnPosition,
491
MarshalDirection.
UnmanagedToManaged
=> info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
73
else if (generator.CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
StubCodeContext.cs (1)
39
Direction: MarshalDirection.
UnmanagedToManaged
);