Exemplo n.º 1
0
        public ICommand CreateCommand <T>(ICommandStateRepository commandRepository, ICommandableEntity entity) where T : ICommand, new()
        {
            var createdCommand = new T()
            {
                CommandRepository = commandRepository
            };

            return(createdCommand);
        }
Exemplo n.º 2
0
 public RenameProjectCommand(RenameProjectCommandDto dto, ICommandStateRepository repo)
 {
     this.CommandRepository = repo;
     this.CreatedOn         = dto.CreatedOn;
     this.EntityGuid        = dto.EntityGuid;
     this.CommandTypeId     = dto.Name + dto.Entity + "Command";
     this.Name         = "new";
     this.OriginalName = "old";
     this.ReceivedOn   = DateTime.Now;
 }
 private void CopyCommandDtoIntoCommand(CommandDto command, ICommandStateRepository commandRepository, ICommandProcessor processor, ICommand typedCommand, ICommandState state)
 {
     ((CommandBase)typedCommand).State = state;
     typedCommand.CommandRepository    = commandRepository;
     typedCommand.CreatedOn            = command.CreatedOn;
     typedCommand.ReceivedOn           = _dateTimeProvider.GetSessionUtcDateTime();
     typedCommand.EntityGuid           = command.EntityGuid;
     typedCommand.Guid             = command.Guid;
     typedCommand.ParametersJson   = command.ParametersJson;
     typedCommand.CommandProcessor = processor;
 }
 public EmploymentCommand(ICommandStateRepository repo) : base(repo)
 {
 }
Exemplo n.º 5
0
 public DesignerController(IRoleRepository roleRepository, IEmployeeRepository employeeRepository, ICommandStateRepository commandStateRepository)
 {
     _roleRepository         = roleRepository;
     _employeeRepository     = employeeRepository;
     _commandStateRepository = commandStateRepository;
 }
Exemplo n.º 6
0
 public ContactCommand(ICommandStateRepository repo) : base(repo)
 {
 }
Exemplo n.º 7
0
 public CompanyCommand(ICommandStateRepository repo) : base(repo)
 {
 }
Exemplo n.º 8
0
 public Commands(ICommandStateRepository commandRepository)
 {
     _commandRepository = commandRepository;
     PostedCommands     = new ObservableCollection <ICommand>();
 }
Exemplo n.º 9
0
 public CommandBase(ICommandStateRepository repo, ICommandState state) : this(repo)
 {
     this._state = state;
 }
Exemplo n.º 10
0
 public CommandBase(ICommandStateRepository repo) : this()
 {
     _repository = repo;
     InitState();
 }
 public CreateProductCommand(ICommandStateRepository repo) : base(repo)
 {
 }
 public ProjectCommand(ICommandStateRepository repo) : base(repo)
 {
 }
 public CommandManager(ICommandStateRepository repo, IDateTimeProvider dateTimeProvider)
 {
     _repo             = repo;
     _dateTimeProvider = dateTimeProvider;
 }