Click or drag to resize

Controller Class

Inherit this class to create your custom controllers.
Inheritance Hierarchy
SystemObject
  Crosser.Common.ServerController

Namespace:  Crosser.Common.Server
Assembly:  Crosser.Common (in Crosser.Common.dll) Version: 0.0.4
Syntax
C#
public abstract class Controller : IController, 
	IDisposable

The Controller type exposes the following members.

Constructors
  NameDescription
Public methodController
Ctor
Top
Properties
  NameDescription
Public propertyAlias
The alias used to connect to this controller. The alias is set by adding a AliasAttribute to your controller classes
Public propertyAuthorize
If the controller is decorated with a AuthorizeAttribute this will return true
Public propertyAuthorizeAttribute
The AuthorizeAttribute (if any) that the controller is decorated with
Public propertyBinaryKey
A binary representation of the controller Alias
Public propertyConnectionContext
ConnectionContext mapped from from the ConnectionContext
Public propertyProtocol
Reference to the IProtocol that owns the IController instance
Top
Methods
  NameDescription
Public methodClose
Will call the OnClose method and then remove the controller from the Protocol and dispose the controller.
Public methodDispose
Clean up resources and dispose
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnClosed
Override this in your controler to be notified when the instance is closed/disposed. The controller is closed when the connection closed or if the client actively call the close method on the controller.
Public methodOnInitialize
Override this in your controller to be notified when the instance is created. This will be called when the protocol creates a new instance of a controller.
Public methodOpen
If you want to call a controller just nu get an instance of it you can use this method as a target. You may also override this method in your controller implementation.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodCallAllT
The method builds a RPC frame and sends it to all clients having an instance of the IController type T
(Defined by CommunicationExtensions.)
Public Extension MethodCallOthersT
The method builds a RPC frame and sends it to all clients having an instance of the IController type T The calling client is excluded from the clients being called.
(Defined by CommunicationExtensions.)
Public Extension MethodCallWhereT
The method builds a RPC frame and sends it to clients having an instance of the IController type T and matches the expression
(Defined by CommunicationExtensions.)
Public Extension MethodFindT
Finds clients that has instances of the IController and match the expression
(Defined by CommunicationExtensions.)
Public Extension MethodGetCustomAttributesOfTypeTA
Returns all attributes of type TA on a IController object
(Defined by ReflectionHelper.)
Top
See Also