Ejemplo n.º 1
0
 public EmployeeController()
 {
     if (ProxyRepoStorage.Repo == null)
     {
         ProxyRepoStorage.Repo = new ProxyEmployeeRepository();
     }
     _mockRepo = ProxyRepoStorage.Repo;
 }
        public ProxyManager(IProxyRepo proxyRepo, IProxyMultiplierRepo proxyMultiplierRepo,
                            ISearchEngineRepo searchEngineRepo, ISearchStringRepo searchStringRepo)
        {
            _proxyRepo           = proxyRepo ?? throw new ArgumentNullException(nameof(proxyRepo));
            _proxyMultiplierRepo = proxyMultiplierRepo ?? throw new ArgumentNullException(nameof(proxyMultiplierRepo));
            _searchEngineRepo    = searchEngineRepo ?? throw new ArgumentNullException(nameof(searchEngineRepo));
            _searchStringRepo    = searchStringRepo ?? throw new ArgumentNullException(nameof(searchStringRepo));

            _proxyStatuses = new Dictionary <Tuple <short, short>, Dictionary <int, ProxyStatus> >();
        }
Ejemplo n.º 3
0
        public PayslipController()
        {
            if (taxedPayslipGenerator == null)
            {
                taxedPayslipGenerator = new TaxedPayslipGenerator();
            }

            if (ProxyRepoStorage.Repo == null)
            {
                ProxyRepoStorage.Repo = new ProxyEmployeeRepository();
            }
            _mockRepo = ProxyRepoStorage.Repo;
        }
 public ProxySyncTask(IDataStore dataStore, IProxyRepo proxyRepo)
 {
     _dataStore = dataStore ?? throw new ArgumentNullException(nameof(dataStore));
     _proxyRepo = proxyRepo ?? throw new ArgumentNullException(nameof(proxyRepo));
 }
Ejemplo n.º 5
0
 public EmployeeController(IProxyRepo <ITaxableEmployee> repoToInject) : this()
 {
     _mockRepo             = repoToInject;
     ProxyRepoStorage.Repo = _mockRepo;
 }
Ejemplo n.º 6
0
 public ProxyRepoDecorator(IProxyRepo proxyRepo)
 {
     _proxyRepo = proxyRepo ?? throw new ArgumentNullException(nameof(proxyRepo));
 }
 public CachedProxyRepo(IProxyRepo proxyRepo)
     : base(proxyRepo)
 {
     _cache = new Dictionary <int, Proxy>();
 }