Client.AddService Method

Definition

Overloads

AddService(Type)

Tells the Client what interfaces you might be using

AddService<T>()

Tells the Client what interfaces you might be using

AddService(Type)

Tells the Client what interfaces you might be using

public void AddService (Type interfaceType);

Parameters

interfaceType
Type

Exceptions

Thrown if interfaceType's FullName is null

Thrown if interfaceType is not an interface, or has already been added as a service.

Thrown if we are already connected

Applies to

AddService<T>()

Tells the Client what interfaces you might be using

[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Use AddService(Type interfaceType) instead.")]
public void AddService<T> () where T : class;

Type Parameters

T

The same interface that you are using on the server

Attributes

Exceptions

Thrown if T's FullName is null

Thrown if T is not an interface, or has already been added as a service.

Applies to