/// <summary> /// Helper method to initiate the call that sets KeyValue item. /// </summary> /// <param name="clientId">The adm client Id.</param> /// <param name="clientSecret">The adm client secret.</param> /// <param name="items">Specifies the KeyValue items to create.</param> /// <param name="onComplete">Specifies an "on complete" delegate callback.</param> /// <param name="stateObject">Specifies a user-defined object.</param> public static void SetAsync( string clientId, string clientSecret, KeyValueItem[] items, ServiceAgent<SetResult>.OnCompleteDelegate onComplete, object stateObject) { if (string.IsNullOrEmpty(clientId)) { throw new ArgumentNullException("clientId"); } if (string.IsNullOrEmpty(clientSecret)) { throw new ArgumentNullException("clientSecret"); } SetAsync( new AdmAuthClientIdentity(clientId, clientSecret, KeyValueService.ServiceScope), items, onComplete, stateObject); }
/// <summary> /// Helper method to initiate the call that sets KeyValue item. /// </summary> /// <param name="clientIdentity">The hawaii client identity.</param> /// <param name="items">Specifies the KeyValue items to create.</param> /// <param name="onComplete">Specifies an "on complete" delegate callback.</param> /// <param name="stateObject">Specifies a user-defined object.</param> private static void SetAsync( ClientIdentity clientIdentity, KeyValueItem[] items, ServiceAgent<SetResult>.OnCompleteDelegate onComplete, object stateObject) { SetAgent agent = new SetAgent( KeyValueService.HostName, clientIdentity, items, stateObject); agent.ProcessRequest(onComplete); }
/// <summary> /// Helper method to initiate the call that sets KeyValue item. /// </summary> /// <param name="hawaiiAppId">Specifies the Hawaii Application Id.</param> /// <param name="items">Specifies the KeyValue items to create.</param> /// <param name="onComplete">Specifies an "on complete" delegate callback.</param> /// <param name="stateObject">Specifies a user-defined object.</param> public static void SetAsync( string hawaiiAppId, KeyValueItem[] items, ServiceAgent<SetResult>.OnCompleteDelegate onComplete, object stateObject) { if (string.IsNullOrEmpty(hawaiiAppId)) { throw new ArgumentNullException("hawaiiAppId"); } SetAsync( new GuidAuthClientIdentity(hawaiiAppId), items, onComplete, stateObject); }