C# Класс DotNetify.DotNetifyHub

This class is a SignalR hub for communicating with browser clients.
Наследование: Microsoft.AspNet.SignalR.Hub
Показать файл Открыть проект

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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.

Описание методов

Dispose_VM() публичный Метод

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.
Результат void

DotNetifyHub() публичный Метод

Default constructor.
public DotNetifyHub ( ) : System
Результат System

DotNetifyHub() публичный Метод

Constructor for dependency injection.
public DotNetifyHub ( IVMControllerFactory vmControllerFactory ) : System
vmControllerFactory IVMControllerFactory Factory of view model controllers.
Результат System

OnDisconnected() публичный Метод

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.
Результат System.Threading.Tasks.Task

Request_VM() публичный Метод

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.
Результат void

Response_VM() публичный статический Метод

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.
Результат void

Update_VM() публичный Метод

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.
Результат void