Exemple #1
0
            {
                Console.WriteLine("HostedService AffinityGroupName:{0}", hostedServiceProperties.AffinityGroup);
            }

            if (!string.IsNullOrEmpty(hostedServiceProperties.Location))
            {
                Console.WriteLine("HostedService Location:{0}", hostedServiceProperties.Location);
            }
        }

        internal static void LogObject(Deployment deployment)
        {
		public IEnumerable<HostedService> GetHostedServiceProcess(out Operation operation)
		{
			IEnumerable<HostedService> hostedServices;
			Func<string, HostedService> func = null;
			Func<string, HostedServiceList> func1 = null;
			IEnumerable<HostedService> hostedServices1 = null;
			operation = null;
			using (OperationContextScope operationContextScope = new OperationContextScope((IContextChannel)base.Channel))
			{
				try
				{
					if (this.ServiceName == null)
					{
						GetAzureServiceCommand getAzureServiceCommand = this;
						if (func1 == null)
						{
							func1 = (string s) => base.Channel.ListHostedServices(s);
						}
						hostedServices1 = ((CmdletBase<IServiceManagement>)getAzureServiceCommand).RetryCall<HostedServiceList>(func1);
					}
					else
					{
						HostedService[] hostedServiceArray = new HostedService[1];
						HostedService[] hostedServiceArray1 = hostedServiceArray;
						int num = 0;
						GetAzureServiceCommand getAzureServiceCommand1 = this;
						if (func == null)
						{
							func = (string s) => base.Channel.GetHostedService(s, this.ServiceName);
						}
						hostedServiceArray1[num] = ((CmdletBase<IServiceManagement>)getAzureServiceCommand1).RetryCall<HostedService>(func);
						hostedServices1 = hostedServiceArray;
					}
					operation = base.WaitForOperation(base.CommandRuntime.ToString());
				}
				catch (CommunicationException communicationException1)
				{
					CommunicationException communicationException = communicationException1;
					if (communicationException as EndpointNotFoundException == null || base.IsVerbose())
					{
						this.WriteErrorDetails(communicationException);
					}
					else
					{
						hostedServices = null;
						return hostedServices;
					}
				}
				return hostedServices1;
			}
			return hostedServices;
		}