Microsoft.Azure.Commands.Network.RemoveAzurReouteConfigCommand.Execute C# (CSharp) Method

Execute() public method

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

            // Verify if the route exists in the RouteTable
            var route = this.RouteTable.Routes.SingleOrDefault(resource => string.Equals(resource.Name, this.Name, System.StringComparison.CurrentCultureIgnoreCase));

            if (route != null)
            {
                this.RouteTable.Routes.Remove(route);
            }

            WriteObject(this.RouteTable);
        }
    }
RemoveAzurReouteConfigCommand