예제 #1
0
 private void OnJsonRequestCompleted(object sender, JsonRequestCompletedEventArgs args)
 {
     if (this.JsonRpcCompleted != null)
     {
         var rpcArgs = new JsonRpcCompletedEventArgs(args.Result, args.Error, args.UserState);
         this.JsonRpcCompleted(this, rpcArgs);
     }
 }
예제 #2
0
        public void PostAsync(Uri uri, object userState = null)
        {
            if (uri == null)
            {
                throw new ArgumentNullException("uri");
            }

            this.Post(uri, (result, error) =>
            {
                if (this.JsonRequestCompleted != null)
                {
                    var args = new JsonRequestCompletedEventArgs(result, error, userState);
                    this.JsonRequestCompleted(this, args);
                }
            });
        }