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

Execute() public method

public Execute ( ) : void
return void
        public override void Execute()
        {           
          base.Execute();
            WriteWarning("The output object type of this cmdlet will be modified in a future release.");
            var present = this.IsNetworkInterfacePresent(this.ResourceGroupName, this.Name);
            ConfirmAction(
                Force.IsPresent,
                string.Format(Properties.Resources.OverwritingResource, Name),
                Properties.Resources.CreatingResourceMessage,
                Name,
                () =>
                {
                    var networkInterface = CreateNetworkInterface();
                    if (present)
                    {
                        networkInterface = this.GetNetworkInterface(this.ResourceGroupName, this.Name);
                    }

                    WriteObject(networkInterface);
                },
                () => present);
        }
NewAzureNetworkInterfaceCommand