Table of Contents

Class RpcMarshalableAttribute

Namespace
Nerdbank.JsonRpc
Assembly
Nerdbank.JsonRpc.dll

Indicates that values typed as this interface are marshaled by reference and can be invoked remotely.

[AttributeUsage(AttributeTargets.Interface, Inherited = false, AllowMultiple = false)]
public sealed class RpcMarshalableAttribute : Attribute
Inheritance
RpcMarshalableAttribute
Inherited Members

Remarks

Marshalable interfaces must declare methods only. Explicit-lifetime interfaces must extend IDisposable; set CallScopedLifetime to use a proxy only for the duration of the RPC call that receives it. Apply [GenerateShape(IncludeMethods = MethodShapeFlags.PublicInstance)] from PolyType so the methods can be dispatched.

Properties

CallScopedLifetime

Gets or sets a value indicating whether the marshaled proxy is limited to the receiving RPC call.

public bool CallScopedLifetime { get; set; }

Property Value

bool

Remarks

Call-scoped interfaces may be sent only as request arguments, not as results or notification arguments. When the successful result contains async enumerables, the scope extends until those enumerations finish or are disposed.