示例#1
0
        //--//

        public bool GetInputs(out CloudWebDeployInputs result)
        {
            result = new CloudWebDeployInputs( );

            result.Credentials = AzureConsoleHelper.GetUserSubscriptionCredentials( );
            if (result.Credentials == null)
            {
                result = null;
                return(false);
            }

            ServiceBusNamespace selectedNamespace = AzureConsoleHelper.SelectNamespace(result.Credentials);

            if (selectedNamespace == null)
            {
                result = null;
                Console.WriteLine("Quiting...");
                return(false);
            }
            result.NamePrefix = selectedNamespace.Name;
            if (result.NamePrefix.EndsWith("-ns"))
            {
                result.NamePrefix = result.NamePrefix.Substring(0, result.NamePrefix.Length - 3);
            }

            result.SBNamespace        = selectedNamespace.Name;
            result.StorageAccountName = result.NamePrefix.ToLowerInvariant( ) + "storage";

            result.Location = selectedNamespace.Region;

            return(true);
        }
示例#2
0
        //--//

        public bool GetInputs(out ClearResourcesInputs result)
        {
            result = new ClearResourcesInputs( );

            result.Credentials = AzureConsoleHelper.GetUserSubscriptionCredentials( );
            if (result.Credentials == null)
            {
                result = null;
                return(false);
            }

            ServiceBusNamespace selectedNamespace = AzureConsoleHelper.SelectNamespace(result.Credentials,
                                                                                       "Please select namespace you want to clear resources for: ", "Enter manually (if Namespace was deleted but there are resources with the same name prefix).");

            if (selectedNamespace == null)
            {
                result = null;
                Console.WriteLine("Quiting...");
                return(false);
            }
            result.NamePrefix = selectedNamespace.Name;

            if (selectedNamespace.Region != null)
            {
                result.NamespaceExists = true;
                result.Location        = selectedNamespace.Region;
            }

            result.SBNamespace        = result.NamePrefix + "-ns";
            result.StorageAccountName = result.NamePrefix.ToLowerInvariant( ) + "storage";

            return(true);
        }
示例#3
0
        //--//

        public bool GetInputs(out CloudWebDeployInputs result)
        {
            result = new CloudWebDeployInputs( );

            result.Credentials = AzureConsoleHelper.GetUserSubscriptionCredentials( );
            if (result.Credentials == null)
            {
                result = null;
                return(false);
            }

            ServiceBusNamespace selectedNamespace = AzureConsoleHelper.SelectNamespace(result.Credentials);

            if (selectedNamespace == null)
            {
                result = null;
                Console.WriteLine("Quiting...");
                return(false);
            }
            result.NamePrefix = selectedNamespace.Name;
            result.Location   = selectedNamespace.Region;

            result.SBNamespace        = result.NamePrefix + "-ns";
            result.StorageAccountName = result.NamePrefix.ToLowerInvariant( ) + "storage";

            result.EventHubNameDevices = "ehdevices";
            result.EventHubNameAlerts  = "ehalerts";

            return(true);
        }
示例#4
0
        //--//

        public bool GetInputs(out CloudWebDeployInputs result)
        {
            result = new CloudWebDeployInputs( );

            result.Credentials = AzureConsoleHelper.GetUserSubscriptionCredentials( );
            if (result.Credentials == null)
            {
                result = null;
                return(false);
            }

            ServiceBusNamespace selectedNamespace = AzureConsoleHelper.SelectNamespace(result.Credentials);

            if (selectedNamespace == null)
            {
                result = null;
                Console.WriteLine("Quiting...");
                return(false);
            }
            result.NamePrefix = selectedNamespace.Name;
            result.Location   = selectedNamespace.Region;

/*
 *          Console.WriteLine( "Need to select or not Transform flag." );
 *          Console.WriteLine( "If selected, the input and output file name will be \"web.config\" placed in Web project location." );
 *          Console.WriteLine( "Otherwise, input file name will be \"web.PublishTemplate.config\" and output - \"" +
 *              String.Format("web.{0}.config", result.NamePrefix) + "\".");
 *
 *          for( ;; )
 *          {
 *              Console.WriteLine( "Do you want to use Transform flag? (y/n)" );
 *
 *              string answer = Console.ReadLine( );
 *              string request = "not use";
 *              result.Transform = false;
 *              if( !string.IsNullOrEmpty( answer ) && answer.ToLower( ).StartsWith( "y" ) )
 *              {
 *                  result.Transform = true;
 *                  request = "use";
 *              }
 *              if( ConsoleHelper.Confirm( "Are you sure you want to " + request + " Transform flag?" ) )
 *              {
 *                  break;
 *              }
 *          }
 */
            result.SBNamespace        = result.NamePrefix + "-ns";
            result.StorageAccountName = result.NamePrefix.ToLowerInvariant( ) + "storage";

            result.EventHubNameDevices = "ehdevices";
            result.EventHubNameAlerts  = "ehalerts";

            //result.WebSiteDirectory = "..\\..\\..\\..\\WebSite\\ConnectTheDotsWebSite"; // Default for running the tool from the bin/debug or bin/release directory (i.e within VS)
            return(true);
        }