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

public Send ( string message ) : void
message string
Результат void
        public void Call(string methodName, params string[] args)
        {
            string message = string.Format("\"msg\": \"method\",\"method\": \"{0}\",\"params\": [{1}],\"id\": \"{2}\"", methodName, CreateJSonArray(args), this.NextId().ToString());

            message = "{" + message + "}";
            _connector.Send(message);
        }
Пример #2
0
 public void Call(string methodName, params object[] args)
 {
     _connector.Send(JsonConvert.SerializeObject(new
     {
         msg     = "method",
         method  = methodName,
         @params = args,
         id      = this.NextId().ToString()
     }
                                                 ));
 }
Пример #3
0
        public int Call(string methodName, params object[] args)
        {
            int    id   = this.NextId();
            string json = JsonConvert.SerializeObject(new
            {
                msg     = "method",
                method  = methodName,
                @params = args,
                id      = id.ToString()
            });

            _connector.Send(json);
            return(id);
        }