Пример #1
0
        protected void ValidateService()
        {
            string          serviceName;
            ServiceSettings settings = GeneralUtilities.GetDefaultSettings(GeneralUtilities.TryGetServiceRootPath(CurrentPath()),
                                                                           ServiceName, null, null, null, null, CurrentSubscription.SubscriptionId, out serviceName);

            if (string.IsNullOrEmpty(serviceName))
            {
                throw new Exception(string.Format(Resources.ServiceExtensionCannotFindServiceName, ServiceName));
            }
            else
            {
                ServiceName = serviceName;
                if (ComputeClient.HostedServices.CheckNameAvailability(ServiceName).IsAvailable)
                {
                    throw new Exception(string.Format(Resources.ServiceExtensionCannotFindServiceName, ServiceName));
                }
            }

            ExtensionManager = new ExtensionManager(this, ServiceName);
        }