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
System.Type

Exceptions

System.NullReferenceException

Thrown if interfaceType's System.Type.FullName is null

System.ArgumentOutOfRangeException

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

Thrown if we are already connected

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
System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute

Exceptions

System.NullReferenceException

Thrown if T's System.Type.FullName is null

System.ArgumentOutOfRangeException

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