public T Get <T>(ProxyBase dto, string propertyName) { WebSocketMessage query = new WebSocketMessage() { DtoGuid = dto.DtoGuid, MessageType = WebSocketMessage.WebSocketMessageType.Get, MemberName = propertyName, #if DEBUG DtoName = dto.ToString() #endif }; return(_send <T>(query)); }
public T Query <T>(ProxyBase dto, string methodName, params object[] parameters) { WebSocketMessage query = new WebSocketMessage() { DtoGuid = dto.DtoGuid, MessageType = WebSocketMessage.WebSocketMessageType.Query, MemberName = methodName, Parameters = parameters, #if DEBUG DtoName = dto.ToString() #endif }; return(_send <T>(query)); }
public void EventRemove(ProxyBase dto, string eventName) { WebSocketMessage query = new WebSocketMessage() { DtoGuid = dto.DtoGuid, MessageType = WebSocketMessage.WebSocketMessageType.EventRemove, MemberName = eventName, #if DEBUG DtoName = dto.ToString() #endif }; if (_clientSocket.ReadyState == WebSocketState.Open) { _clientSocket.SendAsync(Serialize(query), null); } }
public void Set(ProxyBase dto, object value, string propertyName) { WebSocketMessage query = new WebSocketMessage() { DtoGuid = dto.DtoGuid, MessageType = WebSocketMessage.WebSocketMessageType.Set, MemberName = propertyName, Parameters = new object[] { value }, #if DEBUG DtoName = dto.ToString() #endif }; if (_clientSocket.ReadyState == WebSocketState.Open) { _clientSocket.Send(Serialize(query)); } }
public void Invoke(ProxyBase dto, string methodName, params object[] parameters) { WebSocketMessage query = new WebSocketMessage() { DtoGuid = dto.DtoGuid, MessageType = WebSocketMessage.WebSocketMessageType.Invoke, MemberName = methodName, Parameters = parameters, #if DEBUG DtoName = dto.ToString() #endif }; if (_clientSocket.ReadyState == WebSocketState.Open) { _clientSocket.SendAsync(Serialize(query), null); } }