public ConnectionController(IConnectionRepository dbConnectionRepository, IProjectRepository dbProjectRepository, IConnectionProviderRepository dbConnectionProviderRepository) { _dbConnectionRepository = dbConnectionRepository; _dbProjectRepository = dbProjectRepository; _dbConnectionProviderRepository = dbConnectionProviderRepository; }
public ReceiveMessageNotificationHandlerLogger(IRoomMessageRepository roomMessageRepository, IConnectionRepository connectionRepository, IRoomRepository roomRepository) { _roomMessageRepository = roomMessageRepository; _connectionRepository = connectionRepository; _roomRepository = roomRepository; }
public void Should_Not_Save_When_Duplicate_Name() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); ConnectionModel connection1 = new ConnectionModel(); connection1.Name = "connection1"; connectionRepository.AddConnection(connection1); ConnectionModel connection2 = new ConnectionModel(); connection2.Name = "connection1"; connectionRepository.AddConnection(connection2); // act bool exceptionThrown = false; try { connectionRepository.Save(); } catch { exceptionThrown = true; } // assert Assert.IsTrue(exceptionThrown); }
public PointService(IPointRepository pointRepository, IConnectionRepository connectionRepository, IGraphRepository graphRepository) { _pointRepository = pointRepository; _connectionRepository = connectionRepository; _graphRepository = graphRepository; }
public UserService(IServiceProvider serviceProvider) { _userManager = serviceProvider.GetRequiredService <UserManager <User> >(); _connectionRepository = serviceProvider.GetRequiredService <IConnectionRepository>(); _imageService = serviceProvider.GetRequiredService <IImageService>(); _mapper = serviceProvider.GetRequiredService <IMapper>(); }
public RouteCommandHandler(IPointRepository pointRepository, IRouteRepository routeRepository, IConnectionRepository connectionRepository, IMediator mediator) { _pointRepository = pointRepository; _routeRepository = routeRepository; _connectionRepository = connectionRepository; _mediator = mediator; }
public SearchService(ISearchStrategyFactory searchStrategyFactory, IEventStoreSearchRepositopy eventStoreSearchRepositopy, IConnectionRepository connectionRepository) { _searchStrategyFactory = searchStrategyFactory; _eventStoreSearchRepositopy = eventStoreSearchRepositopy; _connectionRepository = connectionRepository; }
public ConnectionsController(IConnectionRepository connectionRepository, IAirportRepository airportRepository, IAircraftTypeRepository aircraftTypeRepository, IScheduleAircraftReplacementRepository scheduleAircraftReplacementRepository, IAirlineRepository airlineRepository) { this.connectionRepository = connectionRepository; this.airportRepository = airportRepository; this.aircraftTypeRepository = aircraftTypeRepository; this.scheduleAircraftReplacementRepository = scheduleAircraftReplacementRepository; this.airlineRepository = airlineRepository; }
public AccountDeleter(IMastodonAccountRepository mastodonAccountRepository, IMisskeyAccountRepository misskeyAccountRepository, IConnectionRepository connectionRepository) { _mastodonAccountRepository = mastodonAccountRepository; _misskeyAccountRepository = misskeyAccountRepository; _connectionRepository = connectionRepository; }
public ConnectionsEditDialog(IProviderFactory providerFactory, IConnectionRepository connectionRepository, INotificationView notificationView, Window owner) { InitializeComponent(); _providerFactory = providerFactory; _connectionRepository = connectionRepository; _notificationView = notificationView; Owner = owner; }
public PumpService(IControlRoomUnitOfWork unitOfWork) { this.unitOfWork = unitOfWork; pumpModelRepository = unitOfWork.PumpModelRepository; connectionRepository = unitOfWork.ConnectionRepository; locationRepository = unitOfWork.LocationRepository; pumpSpecItemRepository = unitOfWork.PumpSpecItemRepository; pumpRepository = unitOfWork.PumpRepository; }
public FlightsController(IUserRepository userRepository, IFlightRepository flightRepository, IRotationRepository rotationRepository, IConnectionRepository connectionRepository, IAircraftTypeRepository aircraftTypeRepository, IUserTypeRatingRepository userTypeRatingRepository) { this.userRepository = userRepository; this.flightRepository = flightRepository; this.rotationRepository = rotationRepository; this.connectionRepository = connectionRepository; this.aircraftTypeRepository = aircraftTypeRepository; this.userTypeRatingRepository = userTypeRatingRepository; }
public ConnectionController( IMapper mapper, ILoggerManager logger, IConnectionRepository connectionRepository) { _mapper = mapper; _logger = logger; _connectionRepository = connectionRepository; }
public PathSearchService(IStationRepository IStationRepository, IConnectionRepository IConnectionRepository, IRouteRepository IRouteRepository, INewConnectionRepository INewConnectionRepository, INewStationRepository INewStationRepository) { _IStationRepository = IStationRepository; _IConnectionRepository = IConnectionRepository; _IRouteRepository = IRouteRepository; _INewConnectionRepository = INewConnectionRepository; _INewStationRepository = INewStationRepository; }
public static Project IncludeConnections(this Project project, IConnectionRepository connectionRepository) { if (project.Connections != null) { return(project); } project.Connections = (ConnectionList)connectionRepository.GetDataByProjectId(project.ProjectId); return(project); }
public AccountConnectionSwitcher(IMastodonAccountRepository mastodonAccountRepository, IMisskeyAccountRepository misskeyAccountRepository, IConnectionRepository connectionRepository, IMakeMastodonConnection makeMastodonConnection, IMakeMisskeyConnection makeMisskeyConnection) { _mastodonAccountRepository = mastodonAccountRepository; _misskeyAccountRepository = misskeyAccountRepository; _connectionRepository = connectionRepository; _makeMastodonConnection = makeMastodonConnection; _makeMisskeyConnection = makeMisskeyConnection; }
public void Should_Allow_Add() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); // act connectionRepository.AddConnection(new ConnectionModel()); // assert Assert.IsTrue(connectionRepository.Count == 1); }
public void Should_Have_Count() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); // act int count = connectionRepository.Count; // assert Assert.IsTrue(count == 0); }
public void Should_Return_Null_For_Invalid_Id() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); // act ConnectionModel retrievedConnection = connectionRepository.GetConnection(1); // assert Assert.IsNull(retrievedConnection); }
public AccountExistenceChecker(IConnectionRepository connectionRepository, IStartRegisteringAccount startRegisteringAccount, IStartApp startApp, IMastodonAccountRepository mastodonAccountRepository, IMakeMastodonConnection makeMastodonConnection, IMisskeyAccountRepository misskeyAccountRepository, IMakeMisskeyConnection makeMisskeyConnection) { _connectionRepository = connectionRepository; _startRegisteringAccount = startRegisteringAccount; _startApp = startApp; _mastodonAccountRepository = mastodonAccountRepository; _makeMastodonConnection = makeMastodonConnection; _misskeyAccountRepository = misskeyAccountRepository; _makeMisskeyConnection = makeMisskeyConnection; }
public SenderWorker(IServiceScopeFactory serviceScopeFactory) { using (var scope = serviceScopeFactory.CreateScope()) { _messageRepository = scope.ServiceProvider.GetService <IMessageRepository>(); _connectionRepository = scope.ServiceProvider.GetService <IConnectionRepository>(); } _httpHandler = new HttpClientHandler { ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator }; }
public void Should_Return_Item_For_Valid_Id() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); ConnectionModel connection = new ConnectionModel(); connection.ConnectionId = 1; connectionRepository.AddConnection(connection); // act ConnectionModel retrievedConnection = connectionRepository.GetConnection(1); // assert Assert.IsTrue(retrievedConnection.ConnectionId == 1); }
public AddMisskeyAccount(IMisskeyAccountRepository accountRepository, IConnectionRepository connectionRepository, IRegisterClient registerClient, IGetAuthorizeUrl getAuthorizeUrl, IShowAuthUrl showAuthUrl, IWaitAuthorize waitAuthorize, IGetAccessToken getAccessToken, IMakeMisskeyConnection makeMisskeyConnection, IShowRegisterClientError showRegisterClientError, IShowAuthorizeError showAuthorizeError) { _accountRepository = accountRepository; _connectionRepository = connectionRepository; _registerClient = registerClient; _getAuthorizeUrl = getAuthorizeUrl; _showAuthUrl = showAuthUrl; _waitAuthorize = waitAuthorize; _getAccessToken = getAccessToken; _makeMisskeyConnection = makeMisskeyConnection; _showRegisterClientError = showRegisterClientError; _showAuthorizeError = showAuthorizeError; }
private void FormMain_Load(object sender, EventArgs e) { if (connectionRepository == null) { connectionRepository = new ConnectionRepository(); } if (entityRepository == null) { entityRepository = new EntityRepository(GetConnectionDetails()); } List <string> cons = connectionRepository.GetAllConnectionNames(); comboboxConnection.ComboBox.DataSource = cons; }
public void Should_Allow_Remoe() { // arrange IConnectionRepository connectionRepository = this.GetConnectionRepository(); ConnectionModel connection = new ConnectionModel(); connection.ConnectionId = 1; connectionRepository.AddConnection(connection); // act connectionRepository.RemoveConnection(connection); ConnectionModel retrievedConnection = connectionRepository.GetConnection(1); // assert Assert.IsNull(retrievedConnection); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { this.InitializeComponent(); // Quick hack... DbServerPluginRegistry.RegisterPlugin( MsSql2014.Identifier, new MsSql2014DbServerInfo(), new MsSql2014DatabaseServices(), new MsSql2014SnapshotServices()); this._connectionRepository = new ConnectionRepository(); this._databaseRepository = new DatabaseRepository(); this._snapshotRepository = new SnapshotRepository(); this.UpdateButtonStatus(); }
public ConnectionPresenter(IConnectionView connectionView, IConnectionRepository connectionRepository) { _view = connectionView; _connectionRepository = connectionRepository; _view.Initialize += View_Initialize; _view.New += View_New; _view.Delete += View_Delete; _view.ConnectionSelected += View_ConnectionSelected; _view.ConnectionChanged += View_ConnectionChanged; _view.Test += View_Test; _view.Connect += View_Connect; var mapperConfiguration = new MapperConfiguration(cfg => { cfg.CreateMap <Connection, ConnectionViewModel>(); }); _mapper = mapperConfiguration.CreateMapper(); }
public ConnectionService(IConnectionRepository connectionRepository, IUnitOfWork unitOfWork, IGroupRepository groupRepository) { if (connectionRepository == null) { throw new ArgumentException(nameof(connectionRepository)); } if (groupRepository == null) { throw new ArgumentException(nameof(groupRepository)); } if (unitOfWork == null) { throw new ArgumentException(nameof(unitOfWork)); } this._connectionRepository = connectionRepository; this._groupRepository = groupRepository; this._unitOfWork = unitOfWork; }
public AuthorizeMastodonAccount(IConnectionRepository connectionRepository, IMastodonClientRepository mastodonClientRepository, IMastodonAccountRepository mastodonAccountRepository, IAuthorizeMastodonAccountWithCode authorizeMastodonAccountWithCode, IShowMastodonAuthenticationError showMastodonAuthenticationError, IGetAccountInfo getAccountInfo, IShowGetMastodonAccountInfoError showGetMastodonAccountInfoError, IMakeMastodonConnection makeMastodonConnection, IFinishAuthorizeMastodonAccount finishAuthorizeMastodonAccount) { _connectionRepository = connectionRepository; _mastodonClientRepository = mastodonClientRepository; _mastodonAccountRepository = mastodonAccountRepository; _authorizeMastodonAccountWithCode = authorizeMastodonAccountWithCode; _showMastodonAuthenticationError = showMastodonAuthenticationError; _getAccountInfo = getAccountInfo; _showGetMastodonAccountInfoError = showGetMastodonAccountInfoError; _makeMastodonConnection = makeMastodonConnection; _finishAuthorizeMastodonAccount = finishAuthorizeMastodonAccount; }
public RegistrationService() { _sessionRepo = new SessionInstanceRepository(); _connRepo = new ConnectionRepository(); _passwordService = new PasswordHashService(); }
public ConnectionFactory(IConnectionRepository connectionRepository, IConnectionProviderRepository connectionProviderRepository) { _connectionRepository = connectionRepository; _connectionProviderRepository = connectionProviderRepository; }
public ConnectionService(IConnectionRepository repo, IUserRepository userRepo, IConnectionNotificationRepository notificationRepo) { _repo = repo; _userRepo = userRepo; _notificationRepo = notificationRepo; }
public ConnectionController(IConnectionRepository repository) { _connectionRepository = repository; }
public ConnectionService(IControlRoomUnitOfWork unitOfWork) { this.unitOfWork = unitOfWork; connectionRepository = unitOfWork.ConnectionRepository; }
public ChatHub() { _dataContext = new DataContext(); _connectionRepository = new ConnectionRepository(_dataContext); _messageRepository = new MessageRepository(_dataContext); }
public static Project IncludeConnections(this Project project, IConnectionRepository connectionRepository) { if (project.Connections != null) return project; project.Connections = (ConnectionList) connectionRepository.GetDataByProjectId(project.ProjectId); return project; }
public ConnectionApiController(IConnectionRepository dbRepository) { _dbRepository = dbRepository; }