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
interfaceIdintThe stable signed 32-bit protocol identifier for the optional interface.
optionalInterfaceTypeThe optional RPC interface type.
Properties
InterfaceId
Gets the stable signed 32-bit protocol identifier.
public int InterfaceId { get; }
Property Value
OptionalInterface
Gets the optional RPC interface type.
public Type OptionalInterface { get; }