ClrPlus.Powershell.Core.Service.RestService.AddCommand C# (CSharp) Method

AddCommand() static private method

static private AddCommand ( ClrPlus.Powershell.Core.Service.RestCommand restCommand ) : void
restCommand ClrPlus.Powershell.Core.Service.RestCommand
return void
        internal static void AddCommand(RestCommand restCommand)
        {
            for (int i = _commands.Count - 1; i >= 0; i--) {
                if (_commands[i].PublishAs == restCommand.PublishAs) {
                    _commands.RemoveAt(i);
                }
            }
            _commands.Add(restCommand);
        }