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); } }
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); } }); }