예제 #1
0
        private void ExecSave(KiiHttpClientFactory factory, KiiTopicCallback callback)
        {
            if (callback == null)
            {
                throw new ArgumentNullException("KiiTopicCallback must not be null");
            }
            Utils.CheckInitialize(false);
            KiiHttpClient client = factory.Create(Url, Kii.AppId, Kii.AppKey, KiiHttpMethod.PUT);

            KiiCloudEngine.SetAuthBearer(client);
            client.SendRequest((ApiResponse response, Exception e) => {
                callback(this, e);
            });
        }
예제 #2
0
 /// <summary>
 /// Asynchronous call of <see cref='Save()'/>
 /// </summary>
 /// <remarks></remarks>
 /// <param name="callback">Callback.</param>
 /// <exception cref='ArgumentNullException'>
 /// Is thrown when an argument is null.
 /// </exception>
 /// <exception cref='CloudException'>
 /// Is thrown when server sends error response.
 /// </exception>
 public void Save(KiiTopicCallback callback)
 {
     this.ExecSave(Kii.AsyncHttpClientFactory, callback);
 }