Table of Contents

Class RpcMarshalableAttribute

Namespace
StreamJsonRpc
Assembly
StreamJsonRpc.dll

Designates an interface that is used in an RPC contract to marshal the object so the receiver can invoke remote methods on it instead of serializing the object to send its data to the remote end.

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

Remarks

Properties

CallScopedLifetime

Gets a value indicating whether the marshaled object is only allowed in requests and may only be invoked by the receiver until the response is sent.

public bool CallScopedLifetime { get; init; }

Property Value

bool

Remarks

Objects marshaled via an interface attributed with this property set to true may only be used as RPC method parameters. They will not be allowed as return values from RPC methods.

While the receiver may dispose of the proxy they receive, this disposal will not propagate to the sender, and their originating object will not be disposed of. The original object owner retains ownership of the lifetime of the object after the RPC call.

IsOptional

Gets a value indicating whether the interface may appear as an OptionalInterface.

public bool IsOptional { get; init; }

Property Value

bool