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)
12
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.
UnmanagedToManaged
);
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.None, MarshalDirection.
UnmanagedToManaged
);
28
(true, MarshalDirection.
UnmanagedToManaged
) => s_unmanagedToManagedDisabledMarshallingGeneratorResolver,
30
(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)
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 (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)
123
MarshalDirection.
UnmanagedToManaged
=> marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode),
381
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)
241
if (CollectionSource.CodeContext.Direction is MarshalDirection.
UnmanagedToManaged
&& CollectionSource.TypeInfo.ByValueContentsMarshalKind is ByValueContentsMarshalKind.Out)
350
&& MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.
UnmanagedToManaged
;
Marshalling\IidParameterIndexMarshallerResolver.cs (1)
11
|| context.Direction != MarshalDirection.
UnmanagedToManaged
)
Marshalling\MarshallerHelpers.cs (10)
252
if (context.Direction is not (MarshalDirection.ManagedToUnmanaged or MarshalDirection.
UnmanagedToManaged
))
263
: MarshalDirection.
UnmanagedToManaged
;
268
return MarshalDirection.
UnmanagedToManaged
;
282
return MarshalDirection.
UnmanagedToManaged
;
294
return MarshalDirection.
UnmanagedToManaged
;
300
return MarshalDirection.
UnmanagedToManaged
;
317
if (context.Direction is MarshalDirection.
UnmanagedToManaged
)
322
MarshalDirection.
UnmanagedToManaged
=> StubIdentifierContext.Stage.CleanupCalleeAllocated,
434
MarshalDirection.
UnmanagedToManaged
=> info.IsNativeReturnPosition,
449
MarshalDirection.
UnmanagedToManaged
=> info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
60
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
);