C# Class DotNetify.DotNetifyHub

This class is a SignalR hub for communicating with browser clients.
Inheritance: Microsoft.AspNet.SignalR.Hub
Mostra file Open project: dsuryd/dotNetify

Private Properties

Property Type Description

Public Methods

Method Description
Dispose_VM ( string vmId ) : void

This method is called by browser clients to remove its view model as it's no longer used.

DotNetifyHub ( ) : System

Default constructor.

DotNetifyHub ( IVMControllerFactory vmControllerFactory ) : System

Constructor for dependency injection.

OnDisconnected ( bool stopCalled ) : System.Threading.Tasks.Task

Handles when a client gets disconnected.

Request_VM ( string vmId, object vmArg ) : void

This method is called by browser clients to request view model data.

Response_VM ( string connectionId, string vmId, string vmData ) : void

This method is called by the VMManager to send response back to browser clients.

Update_VM ( string vmId, object>.Dictionary vmData ) : void

This method is called by browser clients to update a view model's value.

Method Details

Dispose_VM() public method

This method is called by browser clients to remove its view model as it's no longer used.
public Dispose_VM ( string vmId ) : void
vmId string Identifies the view model. By convention, this should match a view model class name.
return void

DotNetifyHub() public method

Default constructor.
public DotNetifyHub ( ) : System
return System

DotNetifyHub() public method

Constructor for dependency injection.
public DotNetifyHub ( IVMControllerFactory vmControllerFactory ) : System
vmControllerFactory IVMControllerFactory Factory of view model controllers.
return System

OnDisconnected() public method

Handles when a client gets disconnected.
public OnDisconnected ( bool stopCalled ) : System.Threading.Tasks.Task
stopCalled bool True, if stop was called on the client closing the connection gracefully; /// false, if the connection has been lost for longer than the timeout.
return System.Threading.Tasks.Task

Request_VM() public method

This method is called by browser clients to request view model data.
public Request_VM ( string vmId, object vmArg ) : void
vmId string Identifies the view model.
vmArg object Optional view model's initialization argument.
return void

Response_VM() public static method

This method is called by the VMManager to send response back to browser clients.
public static Response_VM ( string connectionId, string vmId, string vmData ) : void
connectionId string Identifies the browser client making prior request.
vmId string Identifies the view model.
vmData string View model data in serialized JSON.
return void

Update_VM() public method

This method is called by browser clients to update a view model's value.
public Update_VM ( string vmId, object>.Dictionary vmData ) : void
vmId string Identifies the view model.
vmData object>.Dictionary View model update data, where key is the property path and value is the property's new value.
return void