Exemplo n.º 1
0
 public IssuesController(
     IIssuesService issuesService,
     IUsersService usersService)
 {
     this.issuesService = issuesService;
     this.usersService  = usersService;
 }
Exemplo n.º 2
0
        private bool TryLogon(IntPtr hParentWnd, string parameters, string commonRoot, out string message,
                              out IIssuesServiceConnection service)
        {
            IIssuesService connector = Connector;
            string         serviceUri, user, password;

            message = null;
            service = null;
            if (!TryParseParameters(hParentWnd, parameters, commonRoot, out serviceUri, out user, out password))
            {
                message = GetParamDesc();
                return(false);
            }

            try
            {
                if (!connector.Connect(serviceUri, user, password, GetAppSetting, out service))
                {
                    SaveSettings(user, serviceUri, null);
                    return(false);
                }
                return(true);
            }
            catch (Exception e)
            {
                Log.Error(e);
                message = e.Message;
                return(false);
            }
        }
Exemplo n.º 3
0
 public VotesController(
     IVotesService votesService,
     IIssuesService issuesService)
 {
     this.votesService  = votesService;
     this.issuesService = issuesService;
 }
        public Response Handle(Request request)
        {
            var            typedRequest  = (GetAllIssuesRequest)request;
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();
            var            issuesResult  = issuesService.GetAll(typedRequest.User, typedRequest.Repo, typedRequest.Page);

            return(new GetAllIssuesResponse(issuesResult));
        }
Exemplo n.º 5
0
        public Response Handle(Request request)
        {
            var            typedRequest  = (EditIssueRequest)request;
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();
            var            issueResult   = issuesService.Edit(typedRequest.User, typedRequest.Password, typedRequest.Repo, typedRequest.Id, typedRequest.EditIssue);

            return(new IssueResponse(issueResult));
        }
Exemplo n.º 6
0
 public VotesService(
     IRepository <Vote> votesRepo,
     ICitizensService citizensService,
     IIssuesService issuesService)
 {
     this.votesRepo       = votesRepo;
     this.citizensService = citizensService;
     this.issuesService   = issuesService;
 }
Exemplo n.º 7
0
 public IssuesController(UserManager <User> userManager, IProjectsService projects,
                         IIssuesService issues, IPrioritiesService priorities,
                         ILabelsService labels, ICommentsService comments)
     : base(userManager, projects)
 {
     this.issues     = issues;
     this.priorities = priorities;
     this.labels     = labels;
     this.comments   = comments;
 }
        public void InitializeController()
        {
            this.automapperConfig = new AutoMapperConfig();
            this.automapperConfig.Execute(typeof(HomeController).Assembly);

            this.packages = Services.GetPackagesService();
            this.issues = Services.GetIssuesService();
            this.users = Services.GetUsersService();

            this.controller = new HomeController(this.packages, this.issues, this.users);
        }
        public void CleanUpController()
        {
            this.automapperConfig = null;

            this.packages = null;
            this.issues = null;
            this.users = null;

            this.controller.Dispose();
            this.controller = null;
        }
Exemplo n.º 10
0
 public ReviewsController(
     IRequestsService requestsService,
     IIssuesService issuesService,
     IReviewsService reviewsService,
     ICitizensService citizensService,
     IInstitutionsService institutionsService)
 {
     this.requestsService     = requestsService;
     this.issuesService       = issuesService;
     this.reviewsService      = reviewsService;
     this.citizensService     = citizensService;
     this.institutionsService = institutionsService;
 }
Exemplo n.º 11
0
 public UsersController(
     IInstitutionsService institutionsService,
     ICitizensService citizensService,
     IDeletableEntityRepository <ApplicationUser> usersRepo,
     IIssuesService issuesService,
     ICommentsService commentsService)
 {
     this.institutionsService = institutionsService;
     this.citizensService     = citizensService;
     this.usersRepo           = usersRepo;
     this.issuesService       = issuesService;
     this.commentsService     = commentsService;
 }
Exemplo n.º 12
0
 public TeamsService(
     MarathonDbContext dbContext,
     IHubContext <UpdatesHub> hub,
     IInvitationsService invitationsService,
     IIssuesService issuesService,
     IIdentityService identityService)
 {
     this.dbContext          = dbContext;
     this.hub                = hub;
     this.invitationsService = invitationsService;
     this.issuesService      = issuesService;
     this.identityService    = identityService;
 }
Exemplo n.º 13
0
 public IssuesController(
     IIssuesService issuesService,
     ICategoriesService categoriesService,
     IAttachmentsService attService,
     IWebHostEnvironment environment,
     ICommentsService commentsService,
     IInstitutionsService institutionsService)
 {
     this.issuesService       = issuesService;
     this.categoriesService   = categoriesService;
     this.attService          = attService;
     this.environment         = environment;
     this.commentsService     = commentsService;
     this.institutionsService = institutionsService;
 }
Exemplo n.º 14
0
 public RequestsService(
     IDeletableEntityRepository <IssueRequest> requestsRepo,
     IAttachmentsService attService,
     IInstitutionsService institutionsService,
     ICitizensService citizensService,
     IIssuesService issuesService,
     IDeletableEntityRepository <Issue> issuesRepo,
     IRepository <IssueRequestAttachment> issueRequestAttsService,
     IDeletableEntityRepository <Attachment> attRepo)
 {
     this.requestsRepo            = requestsRepo;
     this.attService              = attService;
     this.institutionsService     = institutionsService;
     this.citizensService         = citizensService;
     this.issuesService           = issuesService;
     this.issuesRepo              = issuesRepo;
     this.issueRequestAttsService = issueRequestAttsService;
     this.attRepo = attRepo;
 }
Exemplo n.º 15
0
 public IssuesController(IIssuesService issuesService)
 {
     this.issuesService = issuesService;
 }
Exemplo n.º 16
0
        public Issue EditIssue(string user, string password, string repo, int id, IssueEdit editIssue)
        {
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();

            return(issuesService.Edit(user, password, repo, id, editIssue));
        }
Exemplo n.º 17
0
        public Issue CreateIssue(string user, string password, string repo, IssueCreate createIssue)
        {
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();

            return(issuesService.Create(user, password, repo, createIssue));
        }
Exemplo n.º 18
0
        public IList <Issue> GetAllIssues(string user, string repo, int page)
        {
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();

            return(issuesService.GetAll(user, repo, page));
        }
Exemplo n.º 19
0
        public Issue GetIssue(string user, string repo, int number)
        {
            IIssuesService issuesService = ObjectFactory.GetInstance <IIssuesService>();

            return(issuesService.Get(user, repo, number));
        }
 public HomeController(
     UserManager <User> userManager, IProjectsService projects, IIssuesService issues) :
     base(userManager, projects)
 {
     this.issues = issues;
 }
 public IssuesAppService(ILogger <IssuesAppService> logger, IMapper mapper, IIssuesService issuesService)
 {
     _logger        = logger;
     _mapper        = mapper;
     _issuesService = issuesService;
 }
Exemplo n.º 22
0
 public IssuesController(IIssuesService issueService, ICarsService carsService)
 {
     this.issueService = issueService;
     this.carsService  = carsService;
 }
Exemplo n.º 23
0
 public SprinstService(MarathonDbContext dbContext, IIssuesService issuesService, IHubContext <UpdatesHub> hub)
 {
     this.dbContext     = dbContext;
     this.issuesService = issuesService;
     this.hub           = hub;
 }
Exemplo n.º 24
0
 public ProjectsController(IProjectsService projectsService, IIssuesService issuesService)
 {
     this.projectsService = projectsService;
     this.issuesService   = issuesService;
 }
Exemplo n.º 25
0
 public ImagesController(IImagesService imagesService, IIssuesService issuesService)
 {
     this.imagesService = imagesService;
     this.issuesService = issuesService;
 }
Exemplo n.º 26
0
 private static Task SetTag(this IIssuesService issuesService, Issue issue, string tagForHotIssues)
 {
     return(issuesService.ApplyCommand(issue.Id, $"tag {tagForHotIssues}", disableNotifications: true));
 }
Exemplo n.º 27
0
        private static async Task RemoveTags(List <Issue> taggedIssues, List <Issue> list, IIssuesService issuesService)
        {
            Console.WriteLine($"Removing tags {ourConfig.TagForHotIssues} from {taggedIssues.Count} issues");
            foreach (var issue in taggedIssues.Where(issue1 => !list.Contains(issue1)))
            {
                Console.Write(".");
                try
                {
                    await issuesService.RemoveTag(issue, ourConfig.TagForHotIssues);
                }
                catch (YouTrackErrorException)
                {
                    Console.WriteLine($"Failed to remove tag silently ${ourConfig.TagForHotIssues} from ${issue.Id}");
                    await issuesService.RemoveTag(issue, ourConfig.TagForHotIssues, false);
                }
            }

            Console.WriteLine("Finished.");
        }
Exemplo n.º 28
0
 private static Task RemoveTag(this IIssuesService issuesService, Issue issue, string tagForHotIssues, bool disableNotifications = true)
 {
     return(issuesService.ApplyCommand(issue.Id, $"remove tag {tagForHotIssues}", disableNotifications: disableNotifications));
 }
Exemplo n.º 29
0
 public IssuesController(IIssuesService issuesService)
 {
     this.issuesService = issuesService;
 }
Exemplo n.º 30
0
 public HomeController(IPackagesService packages, IIssuesService issues, IUsersService users)
 {
     this.packages = packages;
     this.issues = issues;
     this.users = users;
 }
Exemplo n.º 31
0
        private static async Task RemoveTags(List <Issue> taggedIssues, List <Issue> list, IIssuesService issuesService)
        {
            Console.WriteLine($"Removing tags {ourConfig.TagForHotIssues} from {taggedIssues.Count} issues");
            foreach (var issue in taggedIssues.Where(issue1 => !list.Contains(issue1)))
            {
                Console.Write(".");
                await issuesService.RemoveTag(issue, ourConfig.TagForHotIssues);
            }

            Console.WriteLine("Finished.");
        }
Exemplo n.º 32
0
 public IssuesController(ILogger <IssuesController> logger, IIssuesService issuesService)
     : base(logger)
 {
     _issuesService = issuesService;
 }
Exemplo n.º 33
0
 public IssuesController(IIssuesService issues, ISanitizer sanitizer)
 {
     this.issues = issues;
     this.sanitizer = sanitizer;
 }
Exemplo n.º 34
0
        public IssuesListViewModel(IEventAggregator eventAggregator, IIssuesService issues)
        {
            this.issues = issues;

            eventAggregator.Subscribe(this);
        }