64 references to UnmanagedToManaged
Microsoft.Interop.ComInterfaceGenerator (21)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
194
if (srcCtx.VtableIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
89
var unmanagedToManagedFactory = new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
));
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
99
if (stubContext.VtableIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
ComInterfaceGenerator.cs (1)
431
return MarshalDirection.
UnmanagedToManaged
;
ComInterfaceGeneratorHelpers.cs (4)
13
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
UnmanagedToManaged
);
15
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
UnmanagedToManaged
);
29
(true, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
31
(false, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
ComMethodContext.cs (1)
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 (1)
19
MarshalDirection.
UnmanagedToManaged
=> new UnmanagedToManagedMarshaller().Bind(info, context),
Marshallers\ObjectUnwrapperResolver.cs (1)
16
return context.Direction == MarshalDirection.
UnmanagedToManaged
Marshallers\StructAsHResultMarshallerFactory.cs (1)
40
if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
VirtualMethodPointerStubGenerator.cs (2)
84
generatorResolverCreator(methodStub.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
));
199
generatorResolverCreator(method.EnvironmentFlags, MarshalDirection.
UnmanagedToManaged
));
VtableIndexStubGenerator.cs (2)
87
.Where(data => data.VtableIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional);
347
if (!virtualMethodIndexData.ImplicitThisParameter && virtualMethodIndexData.Direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
VtableIndexStubGeneratorHelpers.cs (4)
15
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
UnmanagedToManaged
);
17
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
UnmanagedToManaged
);
29
(true, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
31
(false, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedEnabledMarshallingGeneratorResolver,
Microsoft.Interop.JavaScript.JSImportGenerator (8)
JSGeneratorFactory.cs (1)
29
if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.
UnmanagedToManaged
&& info.ManagedIndex == TypePositionInfo.UnsetIndex)
Marshaling\FuncJSGenerator.cs (3)
17
if (marshalDirection == MarshalDirection.
UnmanagedToManaged
19
|| (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)))
25
&& ((context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
Marshaling\PrimitiveJSGenerator.cs (1)
19
if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && marshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshaling\TaskJSGenerator.cs (3)
16
if (marshalDirection == MarshalDirection.
UnmanagedToManaged
18
|| (context.CurrentStage == StubIdentifierContext.Stage.Unmarshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)))
24
&& ((context.CurrentStage == StubIdentifierContext.Stage.Marshal && CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
Microsoft.Interop.SourceGeneration (35)
BoundGenerators.cs (1)
94
if (errorHandlingInfo is not null && context.Direction == MarshalDirection.
UnmanagedToManaged
)
DefaultIdentifierContext.cs (1)
51
&& _direction == MarshalDirection.
UnmanagedToManaged
)
GeneratedStatements.cs (1)
79
MarshalDirection.
UnmanagedToManaged
=> GenerateStatementForManagedInvoke(marshallers, invokeContext, expressionToInvoke),
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (2)
124
MarshalDirection.
UnmanagedToManaged
=> marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode),
382
if (elementDirection == MarshalDirection.
UnmanagedToManaged
Marshalling\BlittableMarshaller.cs (1)
61
if (direction is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (1)
62
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\BreakingChangeDetector.cs (1)
27
&& context.Direction == MarshalDirection.
UnmanagedToManaged
)
Marshalling\CharMarshaller.cs (1)
80
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\CustomTypeMarshallingGenerator.cs (4)
34
|| (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& ShouldGenerateByValueOutMarshalling))
58
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
64
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional
71
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional
Marshalling\DelegateMarshaller.cs (1)
39
if (elementMarshalDirection is MarshalDirection.
UnmanagedToManaged
or MarshalDirection.Bidirectional)
Marshalling\ElementsMarshalling.cs (2)
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 (10)
253
if (context.Direction is not (MarshalDirection.ManagedToUnmanaged or MarshalDirection.
UnmanagedToManaged
))
264
: MarshalDirection.
UnmanagedToManaged
;
269
return MarshalDirection.
UnmanagedToManaged
;
283
return MarshalDirection.
UnmanagedToManaged
;
295
return MarshalDirection.
UnmanagedToManaged
;
301
return MarshalDirection.
UnmanagedToManaged
;
318
if (context.Direction is MarshalDirection.
UnmanagedToManaged
)
323
MarshalDirection.
UnmanagedToManaged
=> StubIdentifierContext.Stage.CleanupCalleeAllocated,
435
MarshalDirection.
UnmanagedToManaged
=> info.IsNativeReturnPosition,
450
MarshalDirection.
UnmanagedToManaged
=> info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
61
else if (generator.CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
)
Marshalling\StatefulMarshallingStrategy.cs (2)
215
if (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
257
if (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (2)
386
if (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
420
if (CodeContext.Direction == MarshalDirection.
UnmanagedToManaged
&& !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
StubCodeContext.cs (1)
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
);