/// <summary> /// Initializes a new command with the default values. /// </summary> public Command() { this.CommandGuid = Guid.NewGuid(); this.Authentication = new CommandAuthenticationModel(); this.Scope = new CommandScopeModel(); }
/// <summary> /// Allows for essentially cloning a command, but then allows inline overrides of the /// attributes. /// </summary> /// <param name="command"></param> public Command(ICommand command) { this.CommandType = command.CommandType; this.Name = command.Name; this.Authentication = command.Authentication; this.Origin = command.Origin; this.Scope = command.Scope; this.Parameters = new List<ICommandParameter>(command.Parameters ?? new List<ICommandParameter>()); }
public ICommand SetAuthentication(CommandAuthenticationModel authentication) { this.Authentication = authentication; return this; }