Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand.BeginProcessing C# (CSharp) Method

BeginProcessing() protected method

protected BeginProcessing ( ) : void
return void
        protected override void BeginProcessing()
        {
            base.BeginProcessing();
#pragma warning disable 0618
            if (Environment == null && EnvironmentName == null)
            {
                Environment = AzureEnvironment.PublicEnvironments[Common.Authentication.Models.EnvironmentName.AzureCloud];
            }
            else if (Environment == null && EnvironmentName != null)
            {
                if (AzureRmProfileProvider.Instance.Profile.Environments.ContainsKey(EnvironmentName))
                {
                    Environment = AzureRmProfileProvider.Instance.Profile.Environments[EnvironmentName];
                }
                else
                {
                    throw new PSInvalidOperationException(
                        string.Format(Resources.UnknownEnvironment, EnvironmentName));
                }
            }
#pragma warning restore 0618
        }