예제 #1
0
 public LogWorkViewModel(INavigationService navigationService, IJiraService jiraService, IDialogService dialogService)
 {
     this.navigationService = navigationService;
     this.jiraService       = jiraService;
     this.dialogService     = dialogService;
     LogWorkCommand         = new RelayCommand(async() => await LogWork());
 }
예제 #2
0
 public ProjectController(IProjectService projectService, IJiraService jiraService, IWorkItemService workItemService)
 {
     Ensure.NotNull(projectService, workItemService);
     _projectService  = projectService;
     _jiraService     = jiraService;
     _workItemService = workItemService;
 }
예제 #3
0
 public UserController(IUserService userService, IJwtService jwtService, IJiraService jiraService)
 {
     Ensure.NotNull(userService, jwtService, jiraService);
     _userService = userService;
     _jwtService  = jwtService;
     _jiraService = jiraService;
 }
예제 #4
0
 public JiraController(IJiraService jiraService, IUserService userService, IProjectService projectService)
 {
     Ensure.NotNull(jiraService, userService, projectService);
     _jiraService    = jiraService;
     _userService    = userService;
     _projectService = projectService;
 }
예제 #5
0
 public CreateIssueViewModel(IJiraService jiraService, IDialogService dialogService, INavigationService navigationService)
 {
     this.jiraService       = jiraService;
     this.dialogService     = dialogService;
     this.navigationService = navigationService;
     CreateIssueCommand     = new RelayCommand(async() => await CreateIssue(), CanCreateIssue);
     CancelCommand          = new RelayCommand(NavigateToBack);
 }
예제 #6
0
        public LoginViewModel(INavigationService navigationService, IDialogService dialogService, IJiraService jiraService)
        {
            this.navigationService = navigationService;
            this.dialogService     = dialogService;
            this.jiraService       = jiraService;

            InitializeData();
        }
 public EditPreferencesPresenter(IChildPresenter <IJiraLoginView, IJiraLoginParent> childPresenter,
                                 IPreferencesService preferences, IJiraService jira, IErrorMessageService errors)
 {
     _childPresenter = childPresenter;
     _preferences    = preferences;
     _jira           = jira;
     _errors         = errors;
 }
예제 #8
0
        public void SetUp()
        {
            _jiraService = Substitute.For <IJiraService>();
            _errors      = TestHelper.LogErrors(Substitute.For <IErrorMessageService>());

            _view      = Substitute.For <IJiraLoginView>();
            _parent    = Substitute.For <IJiraLoginParent>();
            _presenter = new JiraLoginPresenter(_jiraService, _errors);
        }
예제 #9
0
        public ChangeStatusViewModel(INavigationService navigationService, IDialogService dialogService, IJiraService jiraService)
        {
            this.navigationService = navigationService;
            this.jiraService       = jiraService;
            this.dialogService     = dialogService;

            ChangeStatusCommand = new RelayCommand(async() => await ChangeStatus());
            CancelCommand       = new RelayCommand(GoBack);
        }
예제 #10
0
 public LazyGitLogic(IJiraService jiraService, IBitbucketService bitbucketService, IGitReader gitReader,
                     IGitManager gitManager, IEmailService emailService)
 {
     _jiraService      = jiraService;
     _bitbucketService = bitbucketService;
     _gitReader        = gitReader;
     _gitManager       = gitManager;
     _emailService     = emailService;
 }
        public IssueViewModel(IHub messageHub, ISettings settings, IDialogService dialogService, IJiraService service)
            : base(messageHub)
        {
            _dialogService = dialogService;
            _settings = (ApplicationSettings)settings;
            _service = service;

            LoadIssueComments();
        }
예제 #12
0
 public AddCommentViewModel(IJiraService jiraService, IDialogService dialogService, INavigationService navigationService)
 {
     this.jiraService       = jiraService;
     this.dialogService     = dialogService;
     this.navigationService = navigationService;
     User          = App.User;
     SendCommand   = new RelayCommand(SendComment);
     CancelCommand = new RelayCommand(CancelComment);
 }
예제 #13
0
        public IssueDetailViewModel(IJiraService jiraService, INavigationService navigationService)
        {
            this.navigationService = navigationService;
            this.jiraService       = jiraService;

            AddCommentCommand         = new RelayCommand(AddComment);
            ChangeStatusCommand       = new RelayCommand(NavigateToChangeStatusView, CanChangeStatus);
            LogWorkCommand            = new RelayCommand(NavigateToLogWorkView);
            DownloadAttachmentCommand = new RelayCommand <Attachment>(async t => await DownloadAttachment(t));
        }
예제 #14
0
        public ProjectDetailViewModel(INavigationService navigationService, IJiraService jiraService)
        {
            this.navigationService = navigationService;
            this.jiraService       = jiraService;

            ShowIssueDetailCommand  = new RelayCommand <Issue>(NavigateToIssueDetailView, issue => issue != null);
            CreateIssueCommand      = new RelayCommand(NavigateToCreateIssueView);
            RefreshCommand          = new RelayCommand(RefreshIssues);
            PinToStartScreenCommand = new RelayCommand(PinToStartScreen);
        }
 internal static bool EstimatesAttachmentIsAbsent(IJiraService jira, Issue issue)
 {
     return
         (!jira
          .GetIssueAttachments(issue.Key)
          .Any(
              a =>
              new Regex("Согласование оценки (CR|BR)-\\d+\\.msg", RegexOptions.IgnoreCase).IsMatch(a.Filename))
         );
 }
        public IssuesViewModel(IJiraService jiraService, IHub messageHub, ApplicationSettings settings, INavigationService navigationService)
            : base(messageHub)
        {
            NavigateToIssueCommand = new DelegateCommand(NavigateToIssue, () => SelectedIssue != null);
            SettingsCommand = new DelegateCommand(OpenSettings);

            _applicationSettings = settings;
            _navigationService = navigationService;
            _jiraService = jiraService;

            _applicationSettings.SelectedIssue = null;
        }
        public void SetUp()
        {
            _view           = Substitute.For <IEditPreferencesView>();
            _childPresenter = Substitute.For <IChildPresenter <IJiraLoginView, IJiraLoginParent> >();
            _childView      = Substitute.For <IJiraLoginView>();
            _preferences    = Substitute.For <IPreferencesService>();
            _jira           = Substitute.For <IJiraService>();
            _errors         = TestHelper.LogErrors(Substitute.For <IErrorMessageService>());

            _presenter = new EditPreferencesPresenter(_childPresenter, _preferences, _jira, _errors);

            _view.CreateJiraLoginView().Returns(_childView);
        }
 public ReleasesController(IGitService gitService,
                           IJiraService jiraService,
                           ILogger <ReleasesController> logger,
                           IManifestService manifestService,
                           IProductionMonitorService productionMonitorService,
                           IUserRepository userRepository)
 {
     _gitService               = gitService;
     _jiraService              = jiraService;
     _logger                   = logger;
     _manifestService          = manifestService;
     _productionMonitorService = productionMonitorService;
     _userRepository           = userRepository;
 }
        /// <summary>
        /// Initializes a new instance of the ProjectsViewModel class.
        /// </summary>
        public ProjectsViewModel(IHub messageHub, ApplicationSettings applicationSettings, IJiraService jiraService, INavigationService navigateService)
            : base(messageHub)
        {
            NavigateToProjectCommand = new DelegateCommand(NavigateToProject, () => SelectedItem != null);

            ReloadProjectsCommand = new DelegateCommand(LoadProjects);

            _applicationSettings = applicationSettings;
            _navigateService = navigateService;

            _jiraService = jiraService;

            LoadProjects();
        }
예제 #20
0
        private void InitializeService()
        {
            try
            {
                _service = new JiraService(ServerUrl, Username, _getPasswordDelegate?.Invoke());
            }
            catch (Exception ex)
            {
                MessageBox.Show($"JIRA service initialization failed. \r\n\r\n{ex.Message}");
                return;
            }

            GetProjectsAsync();
        }
예제 #21
0
        public ProjectListViewModel(INavigationService navigationService, IDialogService dialogService, IJiraService jiraService, ICacheService cacheDataService)
        {
            this.navigationService = navigationService;
            cacheService           = cacheDataService;
            this.dialogService     = dialogService;
            this.jiraService       = jiraService;

            ProjectDetailCommand          = new RelayCommand <Project>(NavigateToProjectDetail, project => project != null);
            ShowUserInformationCommand    = new RelayCommand(NavigateToUserProfile);
            ShowAssignedIssuesCommand     = new RelayCommand(NavigateToAssignedIssues);
            ShowIssuesReportedByMeCommand = new RelayCommand(NavigateToIssuesReportedByMe);
            ShowSettingsCommand           = new RelayCommand(NavigateToSettingsView);
            ShowAboutViewCommand          = new RelayCommand(NavigateToAboutView);
            SearchCommand              = new RelayCommand <string>(NavigateToSearchResults);
            RefreshCommand             = new RelayCommand(async() => await Refresh());
            LogoutCommand              = new RelayCommand(Logout);
            SearchWithFavouriteCommand = new RelayCommand <Favourite>(NavigateToSearchResults, favourite => favourite != null);

            MessengerInstance.Register <bool>(this, isEnabled =>
            {
                IsGroupingEnabled = isEnabled;
            });
        }
예제 #22
0
        /// <summary>
        /// Create a client that connects with a JIRA server with specified dependencies.
        /// </summary>
        public Jira(IJqlExpressionVisitor translator,
                    IJiraSoapClient jiraService,
                    IFileSystem fileSystem,
                    JiraCredentials credentials = null,
                    string accessToken          = null,
                    JiraCache cache             = null)
        {
            _provider    = new JiraQueryProvider(translator, this);
            _jiraService = jiraService;
            _fileSystem  = fileSystem;
            _token       = accessToken;
            _credentials = credentials;
            _restClient  = jiraService as IJiraRestClient;
            _cache       = cache ?? new JiraCache();

            this.MaxIssuesPerRequest = DEFAULT_MAX_ISSUES_PER_REQUEST;
            this.Debug = false;

            if (_restClient == null && !String.IsNullOrEmpty(jiraService.Url))
            {
                var options = new JiraRestClient.Options()
                {
                    Url = jiraService.Url,
                    RestClientSettings = new JiraRestClientSettings(),
                    GetCurrentJiraFunc = () => this
                };

                if (this._credentials != null)
                {
                    options.Username = _credentials.UserName;
                    options.Password = _credentials.Password;
                }

                this._restClient = new JiraRestClient(options);
            }
        }
예제 #23
0
 protected IssueSupplier(IJiraService jiraService, IEnumerable <TRule> rules)
 {
     Rules       = rules;
     JiraService = jiraService;
 }
예제 #24
0
 public SearchResultViewModel(IJiraService jiraService, INavigationService navigationService)
 {
     this.jiraService       = jiraService;
     this.navigationService = navigationService;
     ShowIssueDetailCommand = new RelayCommand <Issue>(NavigateToIssueDetailView, issue => issue != null);
 }
예제 #25
0
 public JiraController(IJiraService jiraService)
 {
     _jiraService = jiraService;
 }
예제 #26
0
 public TSHoursRecordController(IEmployeeService employeeService, ITSHoursRecordService tsHoursRecordService,
                                IProjectService projectService,
                                IProjectMembershipService projectMembershipService,
                                IUserService userService,
                                ITSAutoHoursRecordService autoHoursRecordService,
                                IVacationRecordService vacationRecordService,
                                IReportingPeriodService reportingPeriodService,
                                IDepartmentService departmentService,
                                IProductionCalendarService productionCalendarService,
                                IEmployeeCategoryService employeeCategoryService, IJiraService jiraService, IOptions <JiraConfig> jiraOptions, IApplicationUserService applicationUserService) : base(employeeService,
                                                                                                                                                                                                      tsHoursRecordService, projectService, projectMembershipService, userService,
                                                                                                                                                                                                      autoHoursRecordService, vacationRecordService, reportingPeriodService, departmentService, productionCalendarService, employeeCategoryService, jiraService, jiraOptions, applicationUserService)
 {
     _jiraConfig = jiraOptions.Value;
 }
예제 #27
0
 public BatchProcessService(IJiraService jiraService)
 {
     _jiraService = jiraService;
 }
예제 #28
0
 public IssuesInMultipleStructuresSupplier(IJiraService jiraService, IEnumerable <IssueInclusionToStructRule> rules)
     : base(jiraService, rules)
 {
 }
예제 #29
0
 public Time(IJiraService service)
 {
     _service = service;
 }
 public StoriesController(IJiraService jiraService, ILogger <StoriesController> logger, IUserRepository userRepository)
 {
     _jiraService    = jiraService;
     _logger         = logger;
     _userRepository = userRepository;
 }
 public JiraLoginPresenter(IJiraService jiraService, IErrorMessageService errors)
 {
     _jiraService = jiraService;
     _errors      = errors;
 }
예제 #32
0
 public JiraIntegrationService(IJiraService jiraService)
 {
     this.jiraService = jiraService;
 }
예제 #33
0
 public BuildSupplier(IJiraService jiraService, IEnumerable <BuildRule> rules)
 {
     JiraService = jiraService;
     Rules       = rules;
 }