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

ExecuteCmdlet() public method

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

            if (!string.IsNullOrEmpty(this.Name))
            {
                var frontendPort =
                    this.ApplicationGateway.FrontendPorts.First(
                        resource =>
                            string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase));

                WriteObject(frontendPort);
            }
            else
            {
                var frontendPorts = this.ApplicationGateway.FrontendPorts;
                WriteObject(frontendPorts, true);
            }

        }
    }
GetAzureApplicationGatewayFrontendPortCommand