コード例 #1
0
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context)
 {
     if (context.SingleFrameSpansNativeContext && _enablePinning)
     {
         return(false);
     }
     return(marshalKind.HasFlag(ByValueContentsMarshalKind.Out));
 }
コード例 #2
0
ファイル: MarshallerHelpers.cs プロジェクト: z77ma/runtime
 public static RefKind GetRefKindForByValueContentsKind(this ByValueContentsMarshalKind byValue)
 {
     return(byValue switch
     {
         ByValueContentsMarshalKind.Default => RefKind.None,
         ByValueContentsMarshalKind.In => RefKind.In,
         ByValueContentsMarshalKind.InOut => RefKind.Ref,
         ByValueContentsMarshalKind.Out => RefKind.Out,
         _ => throw new System.ArgumentOutOfRangeException(nameof(byValue))
     });
コード例 #3
0
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context)
 {
     if (context.SingleFrameSpansNativeContext && _enablePinning)
     {
         // Only report no support for by-value contents when element is strictly blittable, such that
         // the status remains the same regardless of whether or not runtime marshalling is enabled
         if (_elementInfo.MarshallingAttributeInfo is NoMarshallingInfo ||
             _elementInfo.MarshallingAttributeInfo is UnmanagedBlittableMarshallingInfo {
             IsStrictlyBlittable : true
         } ||
コード例 #4
0
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context)
 {
     return(_enableByValueContentsMarshalling);
 }
コード例 #5
0
ファイル: BlittableMarshaller.cs プロジェクト: z77ma/runtime
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) => false;
コード例 #6
0
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context)
 {
     return(_manualMarshallingGenerator.SupportsByValueMarshalKind(marshalKind, context));
 }
コード例 #7
0
 /// <inheritdoc />
 public abstract bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context);
コード例 #8
0
 public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) => _inner.SupportsByValueMarshalKind(marshalKind, context);