Ejemplo n.º 1
0
		public void SetAffinityGroupProcess()
		{
			this.ValidateParameters();
			using (OperationContextScope operationContextScope = new OperationContextScope((IContextChannel)base.Channel))
			{
				try
				{
					UpdateAffinityGroupInput updateAffinityGroupInput = new UpdateAffinityGroupInput();
					updateAffinityGroupInput.Label = ServiceManagementHelper.EncodeToBase64String(this.Label);
					UpdateAffinityGroupInput description = updateAffinityGroupInput;
					if (this.Description != null)
					{
						description.Description = this.Description;
					}
					CmdletExtensions.WriteVerboseOutputForObject(this, description);
					base.RetryCall((string s) => base.Channel.UpdateAffinityGroup(s, this.Name, description));
					Operation operation = base.WaitForOperation(base.CommandRuntime.ToString());
					ManagementOperationContext managementOperationContext = new ManagementOperationContext();
					managementOperationContext.set_OperationDescription(base.CommandRuntime.ToString());
					managementOperationContext.set_OperationId(operation.OperationTrackingId);
					managementOperationContext.set_OperationStatus(operation.Status);
					ManagementOperationContext managementOperationContext1 = managementOperationContext;
					base.WriteObject(managementOperationContext1, true);
				}
				catch (CommunicationException communicationException1)
				{
					CommunicationException communicationException = communicationException1;
					this.WriteErrorDetails(communicationException);
				}
			}
		}
 public IAsyncResult BeginUpdateAffinityGroup(string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input, AsyncCallback callback, object state)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public static void UpdateAffinityGroup(this IServiceManagement proxy, string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input)
 {
     proxy.EndUpdateAffinityGroup(proxy.BeginUpdateAffinityGroup(subscriptionId, affinityGroupName, input, null, null));
 }
 public IAsyncResult BeginUpdateAffinityGroup(string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input, AsyncCallback callback, object state)
 {
     SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult();
     result.Values["subscriptionId"] = subscriptionId;
     result.Values["affinityGroupName"] = affinityGroupName;
     result.Values["input"] = input;
     result.Values["callback"] = callback;
     result.Values["state"] = state;
     return result;
 }
 public static void UpdateAffinityGroup(this IServiceManagement proxy, string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input)
 {
     proxy.EndUpdateAffinityGroup(proxy.BeginUpdateAffinityGroup(subscriptionId, affinityGroupName, input, null, null));
 }