コード例 #1
0
 public RoleController(
     RepoService <RoleEntity> roleService,
     RepoService <OrganizeCategoryEntity> catService)
 {
     this.repoService = roleService;
     this.catService  = catService;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public UserOrganizeController(RepoService <UserOrganizeEntity> repoService,
                               UserService userService,
                               RepoService <OrganizeEntity> organizeService)
 {
     this.repoService     = repoService;
     this.userService     = userService;
     this.organizeService = organizeService;
 }
コード例 #4
0
ファイル: Account.cs プロジェクト: ichoukou/BM
        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));
        }
コード例 #5
0
ファイル: TodoItemsViewModel.cs プロジェクト: btripp/todo
        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;
        }
コード例 #6
0
 public InfoInstanceController(
     RepoService <InfoInstanceEntity> repoService,
     RepoService <InfoClassEntity> infoClassService,
     UserService userService)
 {
     this.repoService      = repoService;
     this.infoClassService = infoClassService;
     this.userService      = userService;
 }
コード例 #7
0
ファイル: RepoServiceTest.cs プロジェクト: 7Nikita/Jija
        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);
        }
コード例 #8
0
ファイル: RepoServiceTest.cs プロジェクト: 7Nikita/Jija
        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);
        }
コード例 #9
0
 public HomeController(ILogger <HomeController> logger,
                       IHttpClientFactory httpClientFactory,
                       GitHubService gitHubService,
                       RepoService repoService)
 {
     _logger        = logger;
     _clientFactory = httpClientFactory;
     _gitHubService = gitHubService;
     _repoService   = repoService;
 }
コード例 #10
0
ファイル: RepoServiceTests.cs プロジェクト: Z3L1A/GeetHub
        public void FindNotExistingRepository()
        {
            // Arrange
            var repoService = new RepoService(new MockRepoRepository());

            // Act
            var result = repoService.Find(Guid.NewGuid());

            // Assert
            Assert.IsNull(result);
        }
コード例 #11
0
 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;
 }
コード例 #12
0
ファイル: RepoServiceTest.cs プロジェクト: 7Nikita/Jija
        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);
        }
コード例 #13
0
 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;
 }
コード例 #14
0
 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;
 }
コード例 #15
0
ファイル: RepoServiceTests.cs プロジェクト: Z3L1A/GeetHub
        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);
        }
コード例 #16
0
ファイル: RepoServiceTests.cs プロジェクト: Z3L1A/GeetHub
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
        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;
        }
コード例 #19
0
        /// <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();
                    }
                }
            }
        }
コード例 #20
0
 /// <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)
 {
 }
コード例 #21
0
ファイル: Mutation.cs プロジェクト: stubz151/RepoSettings
 public Mutation(RepoService repoService)
 {
     _repoService = repoService;
 }
コード例 #22
0
 public InfoClassController(RepoService <InfoClassEntity> repoService)
 {
     this.repoService = repoService;
 }
コード例 #23
0
        /***
         * 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;
        }
コード例 #24
0
 public LogService(RepoService <LogEntity> repoService, IHttpContextAccessor httpContextAccessor)
 {
     this.repoService         = repoService;
     this.httpContextAccessor = httpContextAccessor;
 }
コード例 #25
0
 public DbBackupService(RepoService <DbBackupEntity> repoService, IHostingEnvironment hostingEnvironment)
 {
     this.repoService        = repoService;
     this.hostingEnvironment = hostingEnvironment;
 }
コード例 #26
0
ファイル: Query.cs プロジェクト: stubz151/RepoSettings
 public Query(RepoService repoService)
 {
     _repoService = repoService;
 }
コード例 #27
0
 public ReposController(LogService logservice, RepoService service)
 {
     _service = service; _logService = logservice;
 }
コード例 #28
0
 public RepoController(RepoService repoService)
 {
     _repoService = repoService;
 }
コード例 #29
0
 public UserService(RepoService <UserEntity> service)
 {
     this.service = service;
 }
コード例 #30
0
        public IEnumerable <RepoModel> GetRepos(string githubId)
        {
            var repos = new RepoService(githubId);

            return(repos.ReposbyId());
        }
コード例 #31
0
 public TypedClientsModel(GitHubService gitHubService, RepoService repoService)
 {
     this.gitHubService = gitHubService;
     this.repoService   = repoService;
 }
コード例 #32
0
 /// <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)
 {
 }
コード例 #33
0
 public OrganizeCatController(RepoService <OrganizeCategoryEntity> repoService)
 {
     this.repoService = repoService;
 }