public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) { if (context.SingleFrameSpansNativeContext && _enablePinning) { return(false); } return(marshalKind.HasFlag(ByValueContentsMarshalKind.Out)); }
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)) });
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 } ||
public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) { return(_enableByValueContentsMarshalling); }
public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) => false;
public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) { return(_manualMarshallingGenerator.SupportsByValueMarshalKind(marshalKind, context)); }
/// <inheritdoc /> public abstract bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context);
public bool SupportsByValueMarshalKind(ByValueContentsMarshalKind marshalKind, StubCodeContext context) => _inner.SupportsByValueMarshalKind(marshalKind, context);