public LockingController(ILogger <LockingController> logger, IUserAccessService userAccessService,
                          ILockingService lockingService, IAuditLogService auditLogService)
 {
     _logger            = logger;
     _auditLogService   = auditLogService;
     _lockingService    = lockingService;
     _userAccessService = userAccessService;
 }
 public GivenTheFilenameIsValid()
 {
     fakeFile = "aFakeFile.txt";
     fakeUser = "******";
     _fakeLockingService = new FakeLockingService();
     lockingController = new LockingController(_fakeLockingService);
     result = lockingController.Lock(fakeUser, fakeFile);
     content = Assert.IsType<OkNegotiatedContentResult<string>>(result);
 }
 public CommandLoop(Configuration configuration)
 {
     var adapter = new LowLevelToAbstractConsoleAdapter(configuration.Console);
     Console = adapter;
     _commandFactory = configuration.CommandFactory;
     _lockingService = configuration.LockingService;
     _history = configuration.ConsoleHistory;
     InitializeHistory(adapter);
 }
Exemple #4
0
 public GivenTheFilenameIsValid()
 {
     fakeFile            = "aFakeFile.txt";
     fakeUser            = "******";
     _fakeLockingService = new FakeLockingService();
     lockingController   = new LockingController(_fakeLockingService);
     result  = lockingController.Lock(fakeUser, fakeFile);
     content = Assert.IsType <OkNegotiatedContentResult <string> >(result);
 }
 public CommandLoop(ILowLevelConsole console, ICommandFactory commandFactory, ILockingService lockingService, IConsoleHistory consoleHistory):
     this(
     new Configuration()
     .UseConsole(console)
     .UseCommandFactory(commandFactory)
     .UseLockingService(lockingService)
     .UseConsoleHistory(consoleHistory)
     )
 {
 }
Exemple #6
0
 public LockController(IUnitOfWork unitOfWork, ILockingService lockingService, ILogger <ExportController> logger)
 {
     _unitOfWork     = unitOfWork;
     _lockingService = lockingService;
     _logger         = logger;
 }
 public Configuration UseLockingService(ILockingService lockingService)
 {
     RaiseExceptionOnNull(lockingService, "lockingService");
     LockingService = lockingService;
     return this;
 }
 public LockingController(ILockingService lockingService)
 {
     _lockingService = lockingService;
 }
 public CommandLoop(ILowLevelConsole console, ICommandFactory commandFactory, ILockingService lockingService):this(console, commandFactory, lockingService, new FileBasedHistory())
 {
 }
Exemple #10
0
 public LockingController(ILockingService lockingService)
 {
     _lockingService = lockingService;
 }