public RoleController( RepoService <RoleEntity> roleService, RepoService <OrganizeCategoryEntity> catService) { this.repoService = roleService; this.catService = catService; }
public SettingsViewModel( Settings settings, OpmlRepository opmlRepository, ChapterRepository chapterRepository, RepoService repoService, ViewService viewService, IEventAggregator eventAggregator, DialogService dialogService ) { this.opmlRepository = opmlRepository; this.chapterRepository = chapterRepository; this.repoService = repoService; this.viewService = viewService; this.dialogService = dialogService; this.Settings = settings; AddChapterCommand = new DelegateCommand(AddChapter); DeleteChapterCommand = new DelegateCommand(DeleteChapter); ExportOpmlCommand = new DelegateCommand(ExportOpml); ImportOpmlCommand = new DelegateCommand(ImportOpml); MoveLeftCommand = new DelegateCommand(MoveLeft); MoveRightCommand = new DelegateCommand(MoveRight); eventAggregator.GetEvent <WindowClosingEvent>().Subscribe(SaveChapterName); }
public UserOrganizeController(RepoService <UserOrganizeEntity> repoService, UserService userService, RepoService <OrganizeEntity> organizeService) { this.repoService = repoService; this.userService = userService; this.organizeService = organizeService; }
public string GetRoleNames() { var roles = new RepoService <Role>("").GetAll(); var roleNames = RoleRefs.Select(m => roles.FirstOrDefault(n => n.No.Equals(m.RoleNo))) .Where(m => m != null).Select(m => m.Name).Distinct().ToList(); return(string.Join(",", roleNames)); }
public override void ItemTapped(object sender, ItemTappedEventArgs e) { var viewModel = e.Item as TodoCellViewModel; viewModel.Model.Complete = !viewModel.Model.Complete; RepoService.Update(viewModel.Model); viewModel.Complete = !viewModel.Complete; }
public InfoInstanceController( RepoService <InfoInstanceEntity> repoService, RepoService <InfoClassEntity> infoClassService, UserService userService) { this.repoService = repoService; this.infoClassService = infoClassService; this.userService = userService; }
public void FindRepoTest() { var service = new RepoService(_dbContext, _projectService.Object); var repo = service.FindRepo(1); Assert.AreEqual(1, repo.Result.Id); Assert.AreEqual("MarioKart", repo.Result.Name); }
public void DeleteRepoTest() { var service = new RepoService(_dbContext, _projectService.Object); var fakeUser = _dbContext.Users.FirstOrDefault(user => user.UserName == "Mario"); service.CreateRepo(fakeUser, 998, "RepoToDelete", "Test repo", "http://dev.to"); var res = service.DeleteRepo(_dbContext.Repositories.FirstOrDefault(repo => repo.Id == 998)); Assert.AreEqual(true, res.Result); }
public HomeController(ILogger <HomeController> logger, IHttpClientFactory httpClientFactory, GitHubService gitHubService, RepoService repoService) { _logger = logger; _clientFactory = httpClientFactory; _gitHubService = gitHubService; _repoService = repoService; }
public void FindNotExistingRepository() { // Arrange var repoService = new RepoService(new MockRepoRepository()); // Act var result = repoService.Find(Guid.NewGuid()); // Assert Assert.IsNull(result); }
public ApprovalTableController(RepoService <ApprovalTableEntity> repoService, RepoService <OrganizeEntity> organizeService, RepoService <InfoClassEntity> infoClassService, RepoService <ApprovalTableOrganizeEntity> tableOrganizeService, RepoService <ApprovalTableInfoClassEntity> tableInfoClassService) { this.repoService = repoService; this.organizeService = organizeService; this.infoClassService = infoClassService; this.tableOrganizeService = tableOrganizeService; this.tableInfoClassService = tableInfoClassService; }
public void CreateRepoTest() { var service = new RepoService(_dbContext, _projectService.Object); var fakeUser = _dbContext.Users.FirstOrDefault(user => user.UserName == "Mario"); service.CreateRepo(fakeUser, 999, "RepoFromHell", "Test repo", "http://2ip.ru"); var repo = service.FindRepo(999); Assert.AreEqual("RepoFromHell", repo.Result.Name); Assert.AreEqual("Test repo", repo.Result.Description); }
public ApprovalInstanceController(RepoService <ApprovalInstanceEntity> repoService, RepoService <ApprovalTableEntity> tableRepoService, RepoService <InfoClassEntity> infoClassService, RepoService <InfoInstanceEntity> infoInstanceService, UserService userService) { this.repoService = repoService; this.tableRepoService = tableRepoService; this.infoClassService = infoClassService; this.infoInstanceService = infoInstanceService; this.userService = userService; }
public LoginController(VerifyCodeService verifyCodeService, LogService logger, UserService userApp, RepoService <UserOrganizeEntity> userOrganizeService, RepoService <RoleEntity> roleService) { this.verifyCodeService = verifyCodeService; this.logger = logger; this.userService = userApp; this.userOrganizeService = userOrganizeService; this.roleService = roleService; }
public void CreateAndDeleteRepository() { // Arrange var repoService = new RepoService(new MockRepoRepository()); // Act var createdRepoId = repoService.Create("repo"); var deletionResult = repoService.Delete(createdRepoId); // Assert Assert.IsTrue(deletionResult); }
public void CreateAndFindRepository() { // Arrange var repoName = "TestRepo"; var repoService = new RepoService(new MockRepoRepository()); // Act var createdRepoId = repoService.Create(repoName); var actualRepo = repoService.Find(createdRepoId); // Assert Assert.AreEqual(repoName, actualRepo.Name); }
public ChapterViewModel( OreService oreService, RepoService repoService, ViewService viewService, Settings settings, IEventAggregator eventAggregator ) : base(eventAggregator, settings) { OreService = oreService; this.repoService = repoService; this.viewService = viewService; eventAggregator.GetEvent <LinkMovedEvent>().Subscribe(LinkMoved); }
public InitController(IWebHostEnvironment webHostEnvironment, RepoService <OrganizeCategoryEntity> organizeCatService, RepoService <OrganizeEntity> organizeService, RepoService <UserEntity> userService, RepoService <UserOrganizeEntity> userOrganizeService, UserService userService2) { if (!webHostEnvironment.IsDevelopment()) { HttpContext.Response.StatusCode = 404; throw new Exception("Unknown page"); } this.webHostEnvironment = webHostEnvironment; this.organizeCatService = organizeCatService; this.organizeService = organizeService; this.userService = userService; this.userOrganizeService = userOrganizeService; this.userService2 = userService2; }
/// <summary> /// Installs the service instances on servers in the farm (does not start them). /// </summary> /// <param name="service">The service associated with these instances.</param> internal static void CreateServiceInstances(RepoService service) { if (service == null) { throw new ArgumentNullException("service"); } foreach (SPServer server in SPFarm.Local.Servers) { if (server.Role == SPServerRole.Application || server.Role == SPServerRole.SingleServer || server.Role == SPServerRole.WebFrontEnd) { RepoServiceInstance instance = server.ServiceInstances.GetValue<RepoServiceInstance>(); if (instance == null) { instance = new RepoServiceInstance(server, service); instance.Update(); } } } }
/// <summary> /// Initializes a new instance of the <see cref="RepoServiceApplication"/> class. Use this constructor when creating a new Service Application (e.g. from code in your Create page) /// </summary> /// <param name="name">The name of the service application.</param> /// <param name="service">The <see cref="Navertica.SharePoint.RepoService.Service" />.</param> /// <param name="applicationPool">The application pool.</param> internal RepoServiceApplication(string name, RepoService service, SPIisWebServiceApplicationPool applicationPool) : base(name, service, applicationPool) { }
public Mutation(RepoService repoService) { _repoService = repoService; }
public InfoClassController(RepoService <InfoClassEntity> repoService) { this.repoService = repoService; }
/*** * Constructor * TODO: Inject a RepoService object in the Constructor parameter * Set the instance variable's initial value using the parameter */ public SpinnerController(RepoService repo) { random = new Random(); // Notice "random" is not injected, just created here repository = repo; }
public LogService(RepoService <LogEntity> repoService, IHttpContextAccessor httpContextAccessor) { this.repoService = repoService; this.httpContextAccessor = httpContextAccessor; }
public DbBackupService(RepoService <DbBackupEntity> repoService, IHostingEnvironment hostingEnvironment) { this.repoService = repoService; this.hostingEnvironment = hostingEnvironment; }
public Query(RepoService repoService) { _repoService = repoService; }
public ReposController(LogService logservice, RepoService service) { _service = service; _logService = logservice; }
public RepoController(RepoService repoService) { _repoService = repoService; }
public UserService(RepoService <UserEntity> service) { this.service = service; }
public IEnumerable <RepoModel> GetRepos(string githubId) { var repos = new RepoService(githubId); return(repos.ReposbyId()); }
public TypedClientsModel(GitHubService gitHubService, RepoService repoService) { this.gitHubService = gitHubService; this.repoService = repoService; }
/// <summary> /// Initializes a new instance of the <see cref="RepoServiceInstance"/> class. Use this constructor to install the service instance on servers in the farm. /// </summary> /// <param name="server">The SPServer to install the instance to.</param> /// <param name="service">The service to associate the service instance with.</param> internal RepoServiceInstance(SPServer server, RepoService service) : base(server, service) { }
public OrganizeCatController(RepoService <OrganizeCategoryEntity> repoService) { this.repoService = repoService; }