public ComputerController() { const string connectionString = @"server=192.168.11.70\SQLEXPRESS,1433;database=abraham;uid=sa;password=toto;Application Name=Homer"; _repository = new ComputerRepository(connectionString); _service = new ComputerService(_repository); }
public RpcComputerRepository(IRepositoryFactory repositoryFactory, Persistence.Models.User user) { _repositoryFactory = repositoryFactory; _user = user; _computerRepository = _repositoryFactory.GetComputerRepository(); }
public TaskRepository(IDbConnection connection, IComputerRepository computerRepository, IScriptRepository scriptRepository, IUserRepository userRepository) { _connection = connection; _computerRepository = computerRepository; _scriptRepository = scriptRepository; _userRepository = userRepository; }
public ComputerService(IComputerRepository repository, IOptions <MongoConfig> config) { _repository = repository; _config = config.Value; _client = new MongoClient(_config.Client); _database = _client.GetDatabase(_config.Database); _collection = _database.GetCollection <Log>(_config.Collection); }
public BookingController(IComputerRepository computerRepository, IQueueRepository queueRepository, IHttpContextAccessor httpContextAccessor, UserManager <ApplicationUser> userManager) { _computerRepository = computerRepository; _queueRepository = queueRepository; _currentUserId = httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; _userManager = userManager; }
public AdminController(IComputerRepository computerRepository, IStateRepository stateRepository, ILoanRepository loanRepository, IUserRepository userRepository, IMapper mapper) { _computerRepository = computerRepository; _stateRepository = stateRepository; _loanRepository = loanRepository; _userRepository = userRepository; _mapper = mapper; }
public DataManager( IComputerRepository computerRepository, IManufacturerRepository manufacturerRepository, IUserRepository userRepository) { _computerRepository = computerRepository; _manufacturerRepository = manufacturerRepository; _userRepository = userRepository; }
public IComputerRepository GetComputerRepository() { if (_computerRepository == null) { _computerRepository = GetRepository(x => x.GetComputerRepository()); } return(_computerRepository); }
public AnnouncementController(IAnnouncementRepository repository, ISectionRepository sectionRepository, ICategoryRepository categoryRepository, IAnnouncementImageRepository announcementImageRepository, ISubsectionRepository subsectionRepository, ICityRepository cityRepository, ICurrencyRepository currencyRepository, IConfigRepository configRepository, IAnnouncementBookmarkRepository bookmarkRepository, IAnnouncementsPremiumsRefRepository announcementsPremiumsRefRepository, IProfileRepository profileRepository, IComputerRepository computerRepository, IComputerAnnouncementRefRepository computerAnnouncementRefRepository) { _repository = repository; _repository.Context = rc; _sectionRepository = sectionRepository; _sectionRepository.Context = rc; _categoryRepository = categoryRepository; _categoryRepository.Context = rc; _announcementImageRepository = announcementImageRepository; _announcementImageRepository.Context = rc; _subsectionRepository = subsectionRepository; _subsectionRepository.Context = rc; _cityRepository = cityRepository; _cityRepository.Context = rc; _currencyRepository = currencyRepository; _currencyRepository.Context = rc; _configRepository = configRepository; _configRepository.Context = rc; _bookmarkRepository = bookmarkRepository; _bookmarkRepository.Context = rc; _announcementsPremiumsRefRepository = announcementsPremiumsRefRepository; _announcementsPremiumsRefRepository.Context = rc; _profileRepository = profileRepository; _profileRepository.Context = rc; _computerRepository = computerRepository; _computerRepository.Context = rc; _computerAnnouncementRefRepository = computerAnnouncementRefRepository; _computerAnnouncementRefRepository.Context = rc; ViewBag.Slogan = ProjectConfiguration.Get.AnnouncementConfig.Slogan; ViewBag.SelectedSiteCategory = CategorySearch.Announcement; }
public IComputerRepository GetComputerRepository() { if (_computerRepository == null) { var scriptRepository = GetRepository(x => x.GetScriptRepository()); var userRepository = GetRepository(x => x.GetUserRepository()); _computerRepository = new ComputerRepository(_connection, scriptRepository, userRepository); } return(_computerRepository); }
public WebHookSession ToRepositoryType(IRepositoryModelCache cache, IComputerRepository computerRepository) { var result = new WebHookSession( computer: ComputerModel.ToRepositoryType(cache, Computer_Id, computerRepository), id: Id, lastPing: LastPing, token: Token ); cache?.Set(result.Id, result); return(result); }
public Network ToRepositoryType(IRepositoryModelCache cache, IComputerRepository computerRepository, IUserRepository userRepository) { var result = new Network( address: Address, attatchedComputer: ComputerModel.ToRepositoryType(cache, AttatchedComputer_Id, computerRepository), devices: null, id: Id, lastPing: LastPing, name: Name, owner: UserModel.ToRepositoryType(cache, Owner_Id, userRepository) ); cache?.Set(result.Id, result); return(result); }
public static CleaningResult Clean(this IScriptRepository repository, ITaskRepository taskRepository, IComputerRepository computerRepository, ListFilter filter = null) { if (filter == null) { filter = new ListFilter { SortDirection = SortDirection.Ascending }; } var allScripts = repository.List(filter).Items; var unusedScripts = allScripts.Where(x => { var getOwnersFunctions = new Func<Script, object[]>[] { taskRepository.Get, computerRepository.Get }; foreach (var getOwnersFunction in getOwnersFunctions) { var owners = getOwnersFunction(x); if (owners.Any()) { return false; } } return true; }).ToArray(); foreach (var script in unusedScripts) { repository.Remove(script); } var result = new CleaningResult(filter, allScripts.Length, unusedScripts.Length); return result; }
public Task ToRepositoryType(IRepositoryModelCache cache, IComputerRepository computerRepository, IScriptRepository scriptRepository, IUserRepository userRepository) { var cachedValue = cache?.Get <Task>(Id); if (cachedValue != null) { return(cachedValue); } var result = new Task( expiration: Expiration, id: Id, origin: Origin, owner: UserModel.ToRepositoryType(cache, Owner_Id, userRepository), receivedTimestamp: ReceivedTimestamp, script: ScriptModel.ToRepositoryType(cache, Script_Id, scriptRepository), target: ComputerModel.ToRepositoryType(cache, Target_Id, computerRepository) ); cache?.Set(result.Id, result); return(result); }
public RealtyController(IRealtyRepository realtyRepository, ICityRepository cityRepository, IRealtyCategoryRepository categoryRepository, IRealtySectionRepository sectionRepository, ICurrencyRepository currencyRepository, IRealtyPhotoRepository photoRepository, IRealtyBookmarkRepository bookmarkRepository, IProfileRepository profileRepository, IComputerRepository computerRepository, IComputerRealtyRefRepository computerRealtyRefRepository) { _realtyRepository = realtyRepository; _realtyRepository.Context = rc; _cityRepository = cityRepository; _cityRepository.Context = rc; _categoryRepository = categoryRepository; _categoryRepository.Context = rc; _sectionRepository = sectionRepository; _sectionRepository.Context = rc; _currencyRepository = currencyRepository; _currencyRepository.Context = rc; _photoRepository = photoRepository; _photoRepository.Context = rc; _bookmarkRepository = bookmarkRepository; _bookmarkRepository.Context = rc; _profileRepository = profileRepository; _profileRepository.Context = rc; _computerRepository = computerRepository; _computerRepository.Context = rc; _computerRealtyRefRepository = computerRealtyRefRepository; _computerRealtyRefRepository.Context = rc; ViewBag.SelectedSiteCategory = CategorySearch.Realty; }
public static Computer ToRepositoryType(IRepositoryModelCache cache, int?id, IComputerRepository computerRepository) { if (id == null) { return(null); } var cachedValue = cache?.Get <Computer>(id); if (cachedValue != null) { return(cachedValue); } if (computerRepository == null) { return(new ComputerModel { Id = id.Value }.ToRepositoryType(cache, (IScriptRepository)null, (IUserRepository)null)); } return(computerRepository.Get(id.Value, cache)); }
public StatisticService(IComputerRepository computerRepository) { _computerRepository = computerRepository; }
public ComputersService(IComputerRepository computerRepository, IGraphicsCardRepository graphicsCardRepository, IMapper mapper) { _mapper = mapper; _computerRepository = computerRepository; _graphicsCardRepository = graphicsCardRepository; }
public ComputerBusiness(IComputerRepository repository, ComputerConverter converter) { _computerRepository = repository; _converter = converter; }
public ComputerService(IComputerRepository repository) { _repository = repository; }
public ComputerService(IComputerRepository computerRepository) => _computerRepository = computerRepository;
public ComputerController(IComputerRepository repository, ILogger <ComputerController> logger) { _repository = repository; _logger = logger; }
//[Inject] //private readonly IComputerAnnouncementRefRepository _computerAnnouncementRefRepository; public AnonymousUserService() { _computerRepository = DependencyResolver.Current.GetService <IComputerRepository>(); _computerRepository.Context = new ReklamaContext(); }
public PhonesController(IComputerRepository computerRepository) { _computerRepository = computerRepository; }
public ProductsManager(IComputerRepository computerRepository) { this._computerRepository = computerRepository; }
public HomeController(IComputerRepository computerRepository) { _computerRepository = computerRepository; }
public ComputerController(IComputerRepository computerRepo) { this.computerRepo = computerRepo; }
public NetworkRepository(IDbConnection connection, IComputerRepository computerRepository, IUserRepository userRepository) { _connection = connection; _computerRepository = computerRepository; _userRepository = userRepository; }
public HomeController(IComputerRepository computerRepository, IQueueRepository queueRepository) { _computerRepository = computerRepository; _queueRepository = queueRepository; }
public ComputerController(IComputerRepository repository, ApplicationDbContext context) { this.repository = repository; this.context = context; }
public SyncWholeNetwork(IComputerRepository computerRepository, IDeviceRepository deviceRepository, INetworkRepository networkRepository) { _computerRepository = computerRepository; _deviceRepository = deviceRepository; _networkRepository = networkRepository; }