64 references to UnmanagedToManaged
Microsoft.Interop.ComInterfaceGenerator (21)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
194if (srcCtx.VtableIndexData.Direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
89var unmanagedToManagedFactory = new ByValueContentsMarshalKindValidator(ComInterfaceGeneratorHelpers.GetGeneratorResolver(env.EnvironmentFlags, MarshalDirection.UnmanagedToManaged));
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
99if (stubContext.VtableIndexData.Direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
ComInterfaceGenerator.cs (1)
431return MarshalDirection.UnmanagedToManaged;
ComInterfaceGeneratorHelpers.cs (4)
12private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.UnmanagedToManaged); 14private 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)
98if (GenerationContext.VtableIndexData.Direction is not (MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
17return context.Direction == MarshalDirection.UnmanagedToManaged
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (1)
19MarshalDirection.UnmanagedToManaged => new UnmanagedToManagedMarshaller().Bind(info, context),
Marshallers\ObjectUnwrapperResolver.cs (1)
16return context.Direction == MarshalDirection.UnmanagedToManaged
Marshallers\StructAsHResultMarshallerFactory.cs (1)
40if (MarshallerHelpers.GetMarshalDirection(info, codeContext) is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
VirtualMethodPointerStubGenerator.cs (2)
84generatorResolverCreator(methodStub.EnvironmentFlags, MarshalDirection.UnmanagedToManaged)); 199generatorResolverCreator(method.EnvironmentFlags, MarshalDirection.UnmanagedToManaged));
VtableIndexStubGenerator.cs (2)
87.Where(data => data.VtableIndexData.Direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional); 347if (!virtualMethodIndexData.ImplicitThisParameter && virtualMethodIndexData.Direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
VtableIndexStubGeneratorHelpers.cs (4)
14private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(EnvironmentFlags.DisableRuntimeMarshalling, MarshalDirection.UnmanagedToManaged); 16private 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)
29if (MarshallerHelpers.GetMarshalDirection(info, context) != MarshalDirection.UnmanagedToManaged && info.ManagedIndex == TypePositionInfo.UnsetIndex)
Marshaling\FuncJSGenerator.cs (3)
17if (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)
19if (context.CurrentStage == StubIdentifierContext.Stage.UnmarshalCapture && marshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Marshaling\TaskJSGenerator.cs (3)
16if (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)
94if (errorHandlingInfo is not null && context.Direction == MarshalDirection.UnmanagedToManaged)
DefaultIdentifierContext.cs (1)
51&& _direction == MarshalDirection.UnmanagedToManaged)
GeneratedStatements.cs (1)
79MarshalDirection.UnmanagedToManaged => GenerateStatementForManagedInvoke(marshallers, invokeContext, expressionToInvoke),
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (2)
123MarshalDirection.UnmanagedToManaged => marshallers.GetModeOrDefault(Options.UnmanagedToManagedMode), 381if (elementDirection == MarshalDirection.UnmanagedToManaged
Marshalling\BlittableMarshaller.cs (1)
61if (direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional && info.IsByRef)
Marshalling\BoolMarshaller.cs (1)
62if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Marshalling\BreakingChangeDetector.cs (1)
27&& context.Direction == MarshalDirection.UnmanagedToManaged)
Marshalling\CharMarshaller.cs (1)
80if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Marshalling\CustomTypeMarshallingGenerator.cs (4)
34|| (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && ShouldGenerateByValueOutMarshalling)) 58if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional) 64if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional 71if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional
Marshalling\DelegateMarshaller.cs (1)
39if (elementMarshalDirection is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional)
Marshalling\ElementsMarshalling.cs (2)
241if (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)
252if (context.Direction is not (MarshalDirection.ManagedToUnmanaged or MarshalDirection.UnmanagedToManaged)) 263: MarshalDirection.UnmanagedToManaged; 268return MarshalDirection.UnmanagedToManaged; 282return MarshalDirection.UnmanagedToManaged; 294return MarshalDirection.UnmanagedToManaged; 300return MarshalDirection.UnmanagedToManaged; 317if (context.Direction is MarshalDirection.UnmanagedToManaged) 322MarshalDirection.UnmanagedToManaged => StubIdentifierContext.Stage.CleanupCalleeAllocated, 434MarshalDirection.UnmanagedToManaged => info.IsNativeReturnPosition, 449MarshalDirection.UnmanagedToManaged => info.IsManagedReturnPosition,
Marshalling\MarshallingGeneratorExtensions.cs (1)
60else if (generator.CodeContext.Direction == MarshalDirection.UnmanagedToManaged)
Marshalling\StatefulMarshallingStrategy.cs (2)
215if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 257if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (2)
386if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 420if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
StubCodeContext.cs (1)
39Direction: MarshalDirection.UnmanagedToManaged);
UnmanagedToManagedStubGenerator.cs (2)
27_context = new DefaultIdentifierContext(ReturnIdentifier, $"{ReturnIdentifier}{StubIdentifierContext.GeneratedNativeIdentifierSuffix}", MarshalDirection.UnmanagedToManaged); 31_context = new DefaultIdentifierContext(ReturnIdentifier, ReturnIdentifier, MarshalDirection.UnmanagedToManaged);