Table of Contents

Class RpcTargetMetadata.ClassAndInterfaces

Namespace
StreamJsonRpc
Assembly
StreamJsonRpc.dll

Represents a collection of interfaces implemented by a specified class type for use as an RPC target.

public class RpcTargetMetadata.ClassAndInterfaces
Inheritance
RpcTargetMetadata.ClassAndInterfaces
Inherited Members

Remarks

Use this class to track and manage the interfaces that a given class type implements, typically for remote procedure call (RPC) scenarios. Interfaces must be added explicitly after construction using the Add method, unless the Create factory method is used to automatically populate the collection.

Constructors

ClassAndInterfaces(Type)

Initializes a new instance of the RpcTargetMetadata.ClassAndInterfaces class.

public ClassAndInterfaces(Type classType)

Parameters

classType Type

The class type serving as the RPC target.

Remarks

After construction, all interfaces that the classType implements must be added using the Add(Type) method.

Use the Create(Type) factory method to automate full initialization of this collection, at the cost of a less trimmable application.

Methods

Add(Type)

Adds an interface to the set of interfaces supported by the RPC target.

public void Add(Type iface)

Parameters

iface Type

The interface type to add. Must be an interface implemented by the target class.

Create(Type)

Creates a new instance of the RpcTargetMetadata.ClassAndInterfaces class that represents the specified class type and all of its implemented interfaces.

public static RpcTargetMetadata.ClassAndInterfaces Create(Type classType)

Parameters

classType Type

The Type object representing the class to include, along with all interfaces implemented by the class. Must not be null.

Returns

RpcTargetMetadata.ClassAndInterfaces

A RpcTargetMetadata.ClassAndInterfaces instance containing the specified class type and all interfaces it implements.