Table of Contents

Class RpcMarshalableOptionalInterfaceAttribute

Namespace
Nerdbank.JsonRpc
Assembly
Nerdbank.JsonRpc.dll

Declares an optional interface that a marshalable object may implement.

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

Remarks

When a value implements OptionalInterface, its marker advertises InterfaceId and the receiver selects a generated proxy implementing that interface. The proxy may also implement extra interfaces; use Is(Type) to distinguish advertised capabilities. Interface IDs are permanent protocol identifiers and must be unique among attributes applied to the same marshalable interface.

Constructors

RpcMarshalableOptionalInterfaceAttribute(int, Type)

Initializes a new instance of the RpcMarshalableOptionalInterfaceAttribute class.

public RpcMarshalableOptionalInterfaceAttribute(int interfaceId, Type optionalInterface)

Parameters

interfaceId int

The stable signed 32-bit protocol identifier for the optional interface.

optionalInterface Type

The optional RPC interface type.

Properties

InterfaceId

Gets the stable signed 32-bit protocol identifier.

public int InterfaceId { get; }

Property Value

int

OptionalInterface

Gets the optional RPC interface type.

public Type OptionalInterface { get; }

Property Value

Type