Microsoft.Azure.Commands.Network.AddAzureApplicationGatewayFrontendIPConfigCommand.ExecuteCmdlet C# (CSharp) Method

ExecuteCmdlet() public method

public ExecuteCmdlet ( ) : void
return void
        public override void ExecuteCmdlet()
        {
            base.ExecuteCmdlet();

            var frontendIPConfig = this.ApplicationGateway.FrontendIPConfigurations.SingleOrDefault
                (resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase));

            if (frontendIPConfig != null)
            {
                throw new ArgumentException("FrontendIPConfiguration with the specified name already exists");
            }

            frontendIPConfig = base.NewObject();

            this.ApplicationGateway.FrontendIPConfigurations.Add(frontendIPConfig);

            WriteObject(this.ApplicationGateway);
        }
    }
AddAzureApplicationGatewayFrontendIPConfigCommand