Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        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));
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }