Ejemplo n.º 1
0
        public static GlobalComponents Load(string azurePath, string subscriptionsDataFile)
        {
            Validate.ValidateNullArgument(azurePath, string.Format(Resources.InvalidNullArgument, "azurePath"));
            Validate.ValidateStringIsNullOrEmpty(azurePath, Resources.AzureDirectoryName);

            var globalComponents = new GlobalComponents(azurePath, subscriptionsDataFile);
            globalComponents.LoadCurrent();

            return globalComponents;
        }
Ejemplo n.º 2
0
        public static GlobalComponents CreateFromPublishSettings(string azurePath, string subscriptionsDataFile, string publishSettingsFile)
        {
            Validate.ValidateNullArgument(azurePath, string.Format(Resources.InvalidNullArgument, "azurePath"));

            var globalComponents = new GlobalComponents(azurePath, subscriptionsDataFile);
            globalComponents.NewFromPublishSettings(globalComponents.GlobalPaths.SubscriptionsDataFile, publishSettingsFile);
            globalComponents.Save();

            return globalComponents;
        }
Ejemplo n.º 3
0
        public static GlobalComponents Create(string azurePath, string subscriptionsDataFile, X509Certificate2 certificate, string serviceEndpoint)
        {
            Validate.ValidateNullArgument(azurePath, string.Format(Resources.InvalidNullArgument, "azurePath"));
            Validate.ValidateNullArgument(certificate, string.Format(Resources.InvalidCertificateSingle, "certificate"));
            Validate.ValidateNullArgument(serviceEndpoint, string.Format(Resources.InvalidEndpoint, "serviceEndpoint"));

            var globalComponents = new GlobalComponents(azurePath, subscriptionsDataFile);
            globalComponents.New(globalComponents.GlobalPaths.SubscriptionsDataFile, certificate, serviceEndpoint);
            globalComponents.Save();

            return globalComponents;
        }