60 references to ByValueContentsMarshalKind
Microsoft.Interop.ComInterfaceGenerator (6)
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
67public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\KeepAliveThisMarshaller.cs (1)
35public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (2)
58public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic) 95public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\ObjectUnwrapperResolver.cs (1)
62public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshallers\StructAsHResultMarshallerFactory.cs (1)
94public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSGeneratorFactory.cs (1)
20if (!info.IsManagedExceptionPosition && !info.IsManagedReturnPosition && (info.IsByRef || info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default))
Marshaling\BaseJSGenerator.cs (1)
31public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Microsoft.Interop.SourceGeneration (52)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (1)
453private static RefKind CreateElementRefKind(RefKind refKind, ByValueContentsMarshalKind byValueContentsMarshalKind)
Marshalling\BlittableMarshaller.cs (1)
102public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\BoolMarshaller.cs (1)
100public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\ByValueMarshalKindSupportDescriptor.cs (9)
42/// Provides an implementation of <see cref="IUnboundMarshallingGenerator.SupportsByValueMarshalKind(ByValueContentsMarshalKind, TypePositionInfo, out GeneratorDiagnostic?)"/> through <see cref="GetSupport(ByValueContentsMarshalKind, TypePositionInfo, out GeneratorDiagnostic?)"/> 71public ByValueMarshalKindSupport GetSupport(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic) 76if (marshalKind != ByValueContentsMarshalKind.Default) 91Debug.Assert(marshalKind is ByValueContentsMarshalKind.Default); 98ByValueContentsMarshalKind.Default => DefaultSupport.GetSupport(info, out diagnostic), 99ByValueContentsMarshalKind.In => InSupport.GetSupport(info, out diagnostic), 100ByValueContentsMarshalKind.Out => OutSupport.GetSupport(info, out diagnostic), 101ByValueContentsMarshalKind.InOut => InOutSupport.GetSupport(info, out diagnostic),
Marshalling\CharMarshaller.cs (1)
137public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\CustomTypeMarshallingGenerator.cs (2)
92=> TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out) 99public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Marshalling\DelegateMarshaller.cs (1)
95public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\ElementsMarshalling.cs (2)
448if (CollectionSource.CodeContext.Direction is MarshalDirection.UnmanagedToManaged && CollectionSource.TypeInfo.ByValueContentsMarshalKind is ByValueContentsMarshalKind.Out) 605return context.ElementIndirectionLevel != 0 || info.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out || info.RefKind == RefKind.Out || info.IsNativeReturnPosition;
Marshalling\Forwarder.cs (1)
34public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic)
Marshalling\MarshallerHelpers.cs (5)
18public static RefKind GetRefKindForByValueContentsKind(this ByValueContentsMarshalKind byValue) 22ByValueContentsMarshalKind.Default => RefKind.None, 23ByValueContentsMarshalKind.In => RefKind.In, 24ByValueContentsMarshalKind.InOut => RefKind.Ref, 25ByValueContentsMarshalKind.Out => RefKind.Out,
Marshalling\MarshallingGenerator.cs (8)
58/// An enumeration describing if the provided <see cref="ByValueContentsMarshalKind" /> is supported and changes behavior from the default behavior. 63/// The provided <see cref="ByValueContentsMarshalKind" /> is supported and changes behavior from the default behavior. 67/// The provided <see cref="ByValueContentsMarshalKind" /> is not supported. 71/// The provided <see cref="ByValueContentsMarshalKind" /> is supported but does not change behavior from the default in this scenario. 75/// The provided <see cref="ByValueContentsMarshalKind" /> is supported but does not follow best practices. 148ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic); 174public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic) 254ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, TypePositionInfo info, out GeneratorDiagnostic? diagnostic);
Marshalling\MarshallingGeneratorExtensions.cs (2)
116if (info.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.In)) 120if (info.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
Marshalling\StatefulMarshallingStrategy.cs (5)
362if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out) 370if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 397|| TypeInfo.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default) 424if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 432if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (5)
440if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 653if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out) 662if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 700if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 708if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
99public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
177public ByValueMarshalKindSupport SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, out GeneratorDiagnostic? diagnostic)
TypePositionInfo.cs (6)
71public ByValueContentsMarshalKind ByValueContentsMarshalKind { get; init; } 116private static (ByValueContentsMarshalKind, Location? inAttribute, Location? outAttribute) GetByValueContentsMarshalKind(IEnumerable<AttributeData> attributes, Compilation compilation) 121ByValueContentsMarshalKind marshalKind = ByValueContentsMarshalKind.Default; 129marshalKind |= ByValueContentsMarshalKind.Out; 134marshalKind |= ByValueContentsMarshalKind.In;