public void Get_All_Available_RepositoryTypes_Success() { List<BaseRepository> lstModel = new List<BaseRepository>() { new BaseRepository(){ Name="Merritt", BaseRepositoryId=1}, new BaseRepository(){ Name="Sky", BaseRepositoryId=2} }; this.repositoryService = new Microsoft.Research.DataOnboarding.RepositoriesService.Interface.Fakes.StubIRepositoryService() { RetrieveRepositoryTypes = () => { return lstModel; } }; RepositoryTypesController repositoryTypeController = CreateRequest(HttpMethod.Get); // Perform var response = repositoryTypeController.Get(); // Assert Assert.AreEqual(response.StatusCode, HttpStatusCode.OK, "Status Code is not as Expected"); var result = response.Content.ReadAsAsync<List<BaseRepository>>().Result; Assert.IsTrue(result.Count >= 1, "There is no Repository type in the List"); Assert.AreEqual(result.Count, lstModel.Count, "Expected and Actula Repository Counts are not equal"); Assert.AreEqual(result[0].BaseRepositoryId, 1); Assert.AreEqual(result[0].Name, "Merritt"); Assert.AreEqual(result[1].BaseRepositoryId, 2); Assert.AreEqual(result[1].Name, "Sky"); }
public CachedRepositoryService(TimeSpan cacheDelay, IRepositoryService repository) { _repository = repository; _existsCache = new CachedValue<string, bool>(id => _repository.Exists(id), cacheDelay); _queryCache = new CachedValue<CIQueryParameters, ConfigurationItemId[]>(p => _repository.Query(p), cacheDelay); _getCache = new CachedValue<string, XElement>(id => _repository.Get(id), cacheDelay); }
/// <summary> /// Initializes a new instance of the <see cref="PublishQueueService"/> class. /// </summary> /// <param name="fileServiceFactory">IFileServiceFactory instance.</param> /// <param name="repositoryService">IRepository instance.</param> /// <param name="queueRepository">QueueRepository instance.</param> public PublishQueueService(IFileServiceFactory fileServiceFactory, IRepositoryService repositoryService, IQueueRepository queueRepository) { this.fileServiceFactory = fileServiceFactory; this.RepositoryService = repositoryService; this.QueueRepository = queueRepository; this.Diagnostics = new DiagnosticsProvider(this.GetType()); }
/// <summary> /// Initializes a new instance of the <see cref="RepositoryController" /> class. /// </summary> /// <param name="repositoryService">Repository service object.</param> /// <param name="userService">User service object.</param> public RepositoryController(IRepositoryService repositoryService, IUserService userService) { this.repositoryService = repositoryService; this.diagnostics = new DiagnosticsProvider(this.GetType()); this.userService = userService; this.user = IdentityHelper.GetCurrentUser(this.userService, this.User as ClaimsPrincipal); }
public void TestInit() { repo = new EFRepositoryService<Entities>(); repo.DeleteAll<EFTestData>(); testData = Builder<EFTestData>.CreateNew().With(a => a.Id = Guid.Empty).Build(); repo.Save(ref testData); }
/// <summary> /// Initializes a new instance of the <see cref="VerifyFileQueueService"/> class. /// </summary> /// <param name="fileServiceFactory">IFileServiceFactory instance.</param> /// <param name="repositoryService">IRepositoryService instance.</param> /// <param name="queueRepository">IQueueRepository instance.</param> /// <param name="blobDataRepository">IBlobRepository instance.</param> public VerifyFileQueueService(IFileServiceFactory fileServiceFactory, IRepositoryService repositoryService, IQueueRepository queueRepository, IBlobDataRepository blobDataRepository) { this.fileServiceFactory = fileServiceFactory; this.RepositoryService = repositoryService; this.QueueRepository = queueRepository; this.blobDataRepository = blobDataRepository; this.Diagnostics = new DiagnosticsProvider(this.GetType()); }
public LocationModuleTabItemUserControlViewModel(IRepositoryService repositoryService, IEventAggregator eventAggregator, IUnityContainer unityContainer) { RepositoryService = repositoryService; EventAggregator = eventAggregator; UnityContainer = unityContainer; EventAggregator.GetEvent<RefreshViewsEvent>().Subscribe(Refresh); }
/// <summary> /// Initializes a new instance of the <see cref="MessageHandlerFactory"/> class. /// </summary> /// <param name="fileServiceFactory">IFileServiceFactory to instantiate IFileService.</param> /// <param name="repositoryService">IRepositoryService instance.</param> /// <param name="queueRepository">IQueueRepository instance.</param> /// <param name="blobRepository">IBlobRepository instance.</param> public MessageHandlerFactory(IFileServiceFactory fileServiceFactory, IRepositoryService repositoryService, IQueueRepository queueRepository, IBlobDataRepository blobRepository) { this.fileServiceFactory = fileServiceFactory; this.repositoryService = repositoryService; this.queueRepository = queueRepository; this.blobRepository = blobRepository; diagnostics = new DiagnosticsProvider(this.GetType()); }
public RepositoryNavigatorService(IRepositoryNavigationFactory repositoryNavigationFactory, IRepositoryService repositoryService) { Argument.IsNotNull(() => repositoryNavigationFactory); Argument.IsNotNull(() => repositoryService); _repositoryNavigationFactory = repositoryNavigationFactory; _repositoryService = repositoryService; }
/// <summary> /// Initializes a new instance of the <see cref="FileServiceProvider"/> class. /// </summary> /// <param name="fileDataRepository">IFileRepository instance</param> /// <param name="blobDataRepository">IBlobDataRepository instance</param> /// <param name="unitOfWork">IUnitOfWork instance</param> /// <param name="repositoryDetails">IRepositoryDetails instance</param> /// <param name="repositoryService">IRepositoryService instance</param> /// <param name="repositoryAdapterFactory">IRepositoryAdapterFactory instance</param> public FileServiceProvider(IFileRepository fileDataRepository, IBlobDataRepository blobDataRepository, IUnitOfWork unitOfWork, IRepositoryDetails repositoryDetails, IRepositoryService repositoryService, IRepositoryAdapterFactory repositoryAdapterFactory) { this.UnitOfWork = unitOfWork; this.FileDataRepository = fileDataRepository; this.BlobDataRepository = blobDataRepository; this.RepositoryDetails = repositoryDetails; this.RepositoryService = repositoryService; this.RepositoryAdapterFactory = repositoryAdapterFactory; }
public PackagesUpdatesSearcherService(IRepositoryService repositoryService, IPackageCacheService packageCacheService, IRepositoryCacheService repositoryCacheService) { Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => repositoryCacheService); _repositoryService = repositoryService; _packageCacheService = packageCacheService; _repositoryCacheService = repositoryCacheService; }
/// <summary> /// creates the instance of FileServiceFactory /// </summary> /// <param name="fileDataRepository">fileDataRepository</param> /// <param name="blobDataRepository">IBlobDataRepository</param> /// <param name="unitOfWork">IUnitOfWork</param> /// <param name="repositoryDetails">IRepositoryDetails</param> /// <param name="repositoryService">IRepositoryService</param> /// <param name="userService">IUserService</param> /// <param name="repositoryAdapterFactory">IRepositoryAdapterFactory</param> public FileServiceFactory(IFileRepository fileDataRepository, IBlobDataRepository blobDataRepository, IUnitOfWork unitOfWork, IRepositoryDetails repositoryDetails, IRepositoryService repositoryService, IUserService userService, IRepositoryAdapterFactory repositoryAdapterFactory) { this.fileDataRepository = fileDataRepository; this.blobDataRepository = blobDataRepository; this.unitOfWork = unitOfWork; this.repositoryDetails = repositoryDetails; this.repositoryService = repositoryService; this.userService = userService; this.repositoryAdapterFactory = repositoryAdapterFactory; }
/// <summary> /// Instantiates the PublishController /// </summary> public PublishController(IPublishQueueService publishQueueService, IUserService userService, IRepositoryService repositoryService, IFileServiceFactory fileServiceFactory) : base() { diagnostics = new DiagnosticsProvider(this.GetType()); this.publishQueueService = publishQueueService; this.userService = userService; this.repositoryService = repositoryService; this.fileServiceFactory = fileServiceFactory; this.user = IdentityHelper.GetCurrentUser(this.userService, this.User as ClaimsPrincipal); }
public Worker() { this._scrapingService = DependencyContainer.Instance.Resolve<IScrapingService>(); this._repositoryService = DependencyContainer.Instance.Resolve<IRepositoryService>(); this._logger = DependencyContainer.Instance.Resolve<ILogger>(); this.step1Mutex = new Mutex(); this.step2Mutex = new Mutex(); this.step3Mutex = new Mutex(); }
public Github(IUserService userService, IRepositoryService repositoryService, INetworkService networkService, IIssueService issueService, IObjectService objectService, ICommitService commitService) { Users = userService; Repositories = repositoryService; Networks = networkService; Issues = issueService; Objects = objectService; Commits = commitService; }
public MainWindowViewModel(IIssueService issueService, IProjectService projectService, IRepositoryService repositoryService, IScriptService scriptService, IMailService mailService, IDocumentBuilder documentBuilder, ICustomFieldsService customFieldsService) { _issueService = issueService; _projectService = projectService; _repositoryService = repositoryService; _scriptService = scriptService; _mailService = mailService; _documentBuilder = documentBuilder; _customFieldsService = customFieldsService; }
public PackageManager(IRepositoryService repositoryService, INuGetConfigurationService nuGetConfigurationService, ILogger logger, IPackageCacheService packageCacheService, IRepositoryCacheService repositoryCacheService) : this(repositoryService.GetSourceAggregateRepository(), repositoryCacheService, nuGetConfigurationService.GetDestinationFolder()) { Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => nuGetConfigurationService); Argument.IsNotNull(() => logger); Argument.IsNotNull(() => packageCacheService); _packageCacheService = packageCacheService; Logger = logger; }
public PendingChangesViewModel( IRepositoryService repositoryService, IFileIconService iconService, GitWorkingTreeChangedEvent workingTreeChangedEvent ) { _repositoryService = repositoryService; _iconService = iconService; Changes = new ObservableCollection<StatusViewModel>(); workingTreeChangedEvent.Subscribe(Refresh, ThreadOption.UIThread); }
public PackagesUpdatesSearcherService(IRepositoryService repositoryService, IAuthenticationSilencerService authenticationSilencerService, IPackageCacheService packageCacheService, IRepositoryCacheService repositoryCacheService) { Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => authenticationSilencerService); Argument.IsNotNull(() => repositoryCacheService); _repositoryService = repositoryService; _authenticationSilencerService = authenticationSilencerService; _packageCacheService = packageCacheService; _repositoryCacheService = repositoryCacheService; }
public static IFileProcesser GetFileTypeInstance(string fileExtension, IBlobDataRepository blobDataRepository, IFileRepository fileDataRepository = null, IRepositoryService repositoryService = null) { switch (fileExtension) { case Constants.XLFileExtension: return new ExcelFileProcesser(blobDataRepository, fileDataRepository, repositoryService); case Constants.CSVFileExtension: return new CSVFileProcessor(blobDataRepository, fileDataRepository, repositoryService); default: return new DefaultFileProcessor(blobDataRepository, fileDataRepository, repositoryService); } }
public void Get_All_Available_Repository_types_When_Repository_Service_Is_Not_Available() { this.repositoryService = null; RepositoryTypesController repositoryTypeController = CreateRequest(HttpMethod.Get); // Perform var response = repositoryTypeController.Get(); // Assert Assert.AreEqual(response.StatusCode, HttpStatusCode.InternalServerError, "Expexted and actual status are not equal"); var result = response.Content.ReadAsAsync<HttpError>().Result; Assert.IsNotNull(result, "Result is null"); }
public static IMLearningService GetService() { if (repositoryService == null) { repositoryService = new WAMSRepositoryService(); } if (mlearningService == null) { mlearningService = new MLearningAzureService(repositoryService); } return mlearningService; }
public FamilyTreeServiceFactory(IUnitOfWork unitOfWork, ICacheProvider cache) { Requires.NotNull(unitOfWork); Requires.NotNull(cache); _citationService = new CitationService(unitOfWork); _familyService = new FamilyService(unitOfWork); _individualService = new IndividualService(unitOfWork); _factService = new FactService(unitOfWork); _multimediaService = new MultimediaLinkService(unitOfWork); _noteService = new NoteService(unitOfWork); _repositoryService = new RepositoryService(unitOfWork); _sourceService = new SourceService(unitOfWork); _treeService = new TreeService(unitOfWork); }
public PackageCommandService(IPleaseWaitService pleaseWaitService, IRepositoryService repositoryService, IPackageQueryService packageQueryService, IPackageOperationService packageOperationService, IPackageOperationContextService packageOperationContextService) { Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => packageQueryService); Argument.IsNotNull(() => packageOperationService); Argument.IsNotNull(() => packageOperationContextService); _pleaseWaitService = pleaseWaitService; _packageQueryService = packageQueryService; _packageOperationService = packageOperationService; _packageOperationContextService = packageOperationContextService; _localRepository = repositoryService.LocalRepository; }
public MainWindowViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._viewService = serviceFactory.ViewService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this.NewChargeCommand = new RelayCommand(() => this.NewCharge()); this.ShowChargesCommand = new RelayCommand(() => this.ShowChargesAsync()); this.NewReportCommand = new RelayCommand(async () => await this.NewReport()); this.ShowSavedReportsCommand = new RelayCommand(async () => await this.ShowSavedReportsAsync()); this.ShowSubmittedReportsCommand = new RelayCommand(async () => await this.ShowSubmittedReportsAsync()); this.ShowApprovedReportsCommand = new RelayCommand(async () => await this.ShowApprovedReportsAsync()); this.ResetDataCommand = new RelayCommand(async () => await this.ResetDataAsync()); }
public ChargesViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._navigationService = serviceFactory.NavigationService; this._viewService = serviceFactory.ViewService; this._repositoryService = serviceFactory.RepositoryService; this._currentIdentityService = serviceFactory.CurrentIdentityService; this.Charges = new ObservableCollection<ChargeViewModel>(); this.ViewChargeCommand = new RelayCommand<ChargeViewModel>( (charge) => { this.ViewCharge(charge); }); }
public void Get_All_Available_Repository_Types_When_No_Repository_Type_Available() { this.repositoryService = new Microsoft.Research.DataOnboarding.RepositoriesService.Interface.Fakes.StubIRepositoryService() { RetrieveRepositoriesBoolean = (includeAdmin) => { return null; } }; RepositoryTypesController repositoryTypeController = CreateRequest(HttpMethod.Get); // Perform var response = repositoryTypeController.Get(); // Assert Assert.AreEqual(response.StatusCode, HttpStatusCode.OK); var result = response.Content.ReadAsAsync<List<Repository>>().Result; Assert.IsNull(result, "Result is not null"); }
public ExpenseReportsViewModel(IServiceFactory serviceFactory) { this._serviceFactory = serviceFactory; this._currentIdentityService = serviceFactory.CurrentIdentityService; this._navigationService = serviceFactory.NavigationService; this._repositoryService = serviceFactory.RepositoryService; this._viewService = serviceFactory.ViewService; this._expenseReports = new ObservableCollection<ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection<GroupInfoList<object>>(); this.ViewReportCommand = new RelayCommand<ExpenseReportViewModel>( (report) => { this.ViewReport(report); }); }
public PackageOperationService(IPackageOperationContextService packageOperationContextService, ILogger logger, IPackageManager packageManager, IRepositoryService repositoryService, IRepositoryCacheService repositoryCacheService) { Argument.IsNotNull(() => packageOperationContextService); Argument.IsNotNull(() => logger); Argument.IsNotNull(() => packageManager); Argument.IsNotNull(() => repositoryService); Argument.IsNotNull(() => repositoryCacheService); _packageOperationContextService = packageOperationContextService; _logger = logger; _packageManager = packageManager; _repositoryCacheService = repositoryCacheService; _localRepository = repositoryCacheService.GetNuGetRepository(repositoryService.LocalRepository); DependencyVersion = DependencyVersion.Lowest; }
public ChargeViewModel(Charge charge, IServiceFactory serviceFactory) { this._repositoryService = serviceFactory.RepositoryService; this._navigationService = serviceFactory.NavigationService; this._viewService = serviceFactory.ViewService; this._billedAmount = charge.BilledAmount; this._chargeId = charge.ChargeId; this._description = charge.Description; this._employeeId = charge.EmployeeId; this._expenseDate = charge.ExpenseDate; this._expenseReportId = charge.ExpenseReportId; this._location = charge.Location; this._merchant = charge.Merchant; this._notes = charge.Notes; this._transactionAmount = charge.TransactionAmount; this._modified = false; }
public ArtistService(IRepositoryService repoSvc) : base(repoSvc) { //repoSvc.GetData(); }
public AddressController(IRepositoryService <Address> addressService, IRepositoryService <Farm> farmService, IRepositoryService <State> stateService, IRepositoryService <LocalGovernment> localGovermentService) { AddressService = addressService; FarmService = farmService; StateService = stateService; LocalGovermentService = localGovermentService; }
public CoursesController(IRepositoryService <Course> repositoryService) { this.repositoryService = repositoryService; }
public StudentController(IRepositoryService <Student> studentService) { this.studentService = studentService; }
public RepositoryDetailsViewModel(IEventAggregator eventAggregator, IRepositoryService repositories) { this.repositories = repositories; eventAggregator.Subscribe(this); }
public GuidIdActiveRecordStateODataControllerBase(IDiagnosticsTracingService diagnosticsTracingService, IPrincipalService principalService, IRepositoryService repositoryService, IObjectMappingService objectMappingService, ISecureAPIMessageAttributeService secureApiMessageAttribute) : base(diagnosticsTracingService, principalService, repositoryService, objectMappingService, secureApiMessageAttribute) { // Base will invoke Initialize() to set base._dbContextIdentifier }
/// <summary> /// Create new resource handler /// </summary> public EncounterResourceHandler(IRepositoryService <PatientEncounter> repo, ILocalizationService localizationService) : base(repo, localizationService) { }
public ClientService(IRepositoryService <Client> repositoryService) { _repositoryService = repositoryService; }
public RepositoriesController(IRepositoryService repositoryService) { this.repositoryService = repositoryService; }
// private readonly IInstructorService instructorService; public DepartmentController(IRepositoryService <Department> departmentService, IRepositoryService <Instructor> instructorService) { this.departmentService = departmentService; this.instructorService = instructorService; }
public PinsController(IRepositoryService repositoryService) { _repositoryService = repositoryService; }
/// <summary> /// Security challenge child handler /// </summary> public SecurityUserChallengeChildHandler(IRepositoryService <SecurityUser> repositoryService, ISecurityChallengeService securityChallengeService) { this.m_challengeService = securityChallengeService; this.m_repositoryService = repositoryService; }
public TransactionService(IRepositoryService contextService) { _contextService = contextService; }
public ProductsController(IRepositoryService reposvc, IPricingService pricsvc) { _reposvc = reposvc; _pricsvc = pricsvc; }
/// <summary> /// Initializes a new instance of the <see cref="CitizenshipExtension"/> class. /// </summary> /// <param name="placeRepository">The place repository service.</param> public CitizenshipExtension(IRepositoryService <Place> placeRepository) { this.m_placeRepository = placeRepository; }
public EquipmentService(IRepositoryService repoService) { _repoService = repoService; }
public CazareController(DocumentGenerator documentGenerator, IRepositoryService repositoryService, IMappingService mappingService, ILoggingService loggingService) : base(repositoryService, mappingService, loggingService) { }
public GoodController(IRepositoryService <Good> repositoryService, IMapper mapper) { _repositoryService = repositoryService; _mapper = mapper; }
public HomeController(IRepositoryService repositoryService) { _repositoryService = repositoryService; }
public WebApiController(IRepositoryService repositoryService, IMappingService mappingService, ILoggingService loggingService) { Repository = repositoryService; Mapper = mappingService; Logger = loggingService.GetLogger(GetType()); }
public AntifraudService(IRepositoryService repositoryService) { _repositoryService = repositoryService; }
public SuburbService() { _repo = new RepositoryService <Suburb>(); }
public BaseService(IRepositoryService repoSvc) { _repoSvc = repoSvc; _dbConn = _repoSvc.GetConnetion(); }
public StudentServiceController(IRepositoryService repository) { this.repository = repository; }
/// <summary> /// Create new resource handler /// </summary> public LocationResourceHandler(IRepositoryService <Place> repo, ILocalizationService localizationService) : base(repo, localizationService) { }
public RepositoryServiceTests() { var mockDAL = new MockDAL(); this._RepositoryService = new RepositoryService(mockDAL.ApplicationContext.Object); }
public CropController(IRepositoryService <Crop> cropService) => CropService = cropService;
public StudentModelContainer(int id, IRepositoryService repository) { this.id = id; this.repository = repository; }
public ProjectRepositoryService(IRepository repository, IRepositoryService service) { this.repository = repository; this.service = service; List = new List <ProjectModel>(); }
public Login(IRepositoryService repositoryService) { _repositoryService = repositoryService; InitializeComponent(); }