public void InitializeServicesWithAuthenticationType(AuthenticationType type)
 {
     if (type == AuthenticationType.Basic)
     {
         this._userService       = new UserService(AuthenticationType.Basic);
         this._issueService      = new IssueService(AuthenticationType.Basic);
         this._transitionService = new TransitionService(AuthenticationType.Basic);
         this._priorityService   = new PriorityService(AuthenticationType.Basic);
         this._attachmentService = new AttachmentService(AuthenticationType.Basic);
         this._boardService      = new BoardService(AuthenticationType.Basic);
         this._sprintService     = new SprintService(AuthenticationType.Basic);
         this._projectService    = new ProjectService(AuthenticationType.Basic);
     }
     else if (type == AuthenticationType.OAuth)
     {
         this._userService       = new UserService(AuthenticationType.OAuth);
         this._issueService      = new IssueService(AuthenticationType.OAuth);
         this._transitionService = new TransitionService(AuthenticationType.OAuth);
         this._priorityService   = new PriorityService(AuthenticationType.OAuth);
         this._attachmentService = new AttachmentService(AuthenticationType.OAuth);
         this._boardService      = new BoardService(AuthenticationType.OAuth);
         this._sprintService     = new SprintService(AuthenticationType.OAuth);
         this._projectService    = new ProjectService(AuthenticationType.OAuth);
     }
 }
예제 #2
0
 public Form1()
 {
     _taskService     = InstanceFactory.GetInstance <ITaskService>();
     _priorityService = InstanceFactory.GetInstance <IPriorityService>();
     _statusService   = InstanceFactory.GetInstance <IStatusService>();
     InitializeComponent();
 }
예제 #3
0
 public IncidentController(IIncidentService modelService, IDepartmentService departmentService, ICategoryService categoryService, IPriorityService priorityService)
 {
     _priorityService   = priorityService;
     _categoryService   = categoryService;
     _departmentService = departmentService;
     _modelService      = modelService;
 }
예제 #4
0
        private void SetupPriority(IPriorityService piorityService, IOperationFactory operationFactory)
        {
            piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Multiplication));
            piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Division));

            piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Add));
            piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Subtract));
        }
예제 #5
0
 public ManageRule()
 {
     InitializeComponent();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
     _ruleService = new RuleService();
 }
예제 #6
0
 public PriorityType(IPriorityService priorityService)
 {
     Field(m => m.Id);
     Field(m => m.Name);
     Field(m => m.Description);
     Field(m => m.SortOrder);
     Field(m => m.IsDeleted);
 }
예제 #7
0
        public AdvancedSearchView(IJiraToolWindowNavigatorViewModel parent, IPriorityService priorityService,
                                  IIssueService issueService, IProjectService projectService, ISprintService sprintService, IBoardService boardService)
        {
            InitializeComponent();

            this._viewModel = new AdvancedSearchViewModel(parent, priorityService, issueService, projectService,
                                                          sprintService, boardService);
            this.DataContext = this._viewModel;
        }
 public MessageRoutingSystemErrorService()
 {
     _ruleService = new RuleService();
     _poolService = new PoolService();
     _messagePoolService = new MessagePoolService();
     _messageService = new MessageService();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
 }
예제 #9
0
        public IssueDetailView(JiraToolWindowNavigatorViewModel parent, Issue issue, Project project,
                               IIssueService issueService, IPriorityService priorityService, ITransitionService transitionService,
                               IAttachmentService attachmentService, IUserService userService, IBoardService boardService, IProjectService projectService)
        {
            InitializeComponent();

            this._viewModel = new IssueDetailViewModel(parent, issue, project,
                                                       issueService, priorityService, transitionService,
                                                       attachmentService, userService, boardService, projectService);
            this.DataContext = this._viewModel;
        }
예제 #10
0
        public void Setup()
        {
            _piorityService = new PriorityService();
            var operationFactory = new OperationFactory();

            _piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Multiplication));
            _piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Division));

            _piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Add));
            _piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Subtract));

            _calculationService = new CalculationService();
        }
예제 #11
0
        public AdvancedSearchViewModel(IJiraToolWindowNavigatorViewModel parent, IPriorityService priorityService,
                                       IIssueService issueService, IProjectService projectService, ISprintService sprintService, IBoardService boardService)
        {
            this._parent = parent;

            this._parent.SetRefreshCommand(RefreshAdvancedSearch);

            this._priorityService = priorityService;
            this._issueService    = issueService;
            this._projectService  = projectService;
            this._sprintService   = sprintService;
            this._boardService    = boardService;

            this.PriorityList = new ObservableCollection <Priority>();
            this.StatusList   = new ObservableCollection <Status>();
            this.ProjectList  = new ObservableCollection <Project>();
            this.IssueList    = new ObservableCollection <Issue>();
            this._boardList   = new List <BoardProject>();
            this.SprintList   = new ObservableCollection <Sprint>();

            this.CheckedPriorityCommand = new DelegateCommand(CheckedPriority);
            this.CheckedStatusCommand   = new DelegateCommand(CheckedStatus);
            this.CheckedProjectCommand  = new DelegateCommand(CheckedProject);
            this.CheckedSprintCommand   = new DelegateCommand(CheckedSprint);

            this.EditProjectsCommand       = new DelegateCommand(EditProjects);
            this.CancelEditProjectsCommand = new DelegateCommand(CancelEditProjects);

            this.EditSprintsCommand       = new DelegateCommand(EditSprints);
            this.CancelEditSprintsCommand = new DelegateCommand(CancelEditSprints);

            this.EditPrioritiesCommand       = new DelegateCommand(EditPriorities);
            this.CancelEditPrioritiesCommand = new DelegateCommand(CancelEditPriorities);

            this.EditStatusesCommand       = new DelegateCommand(EditStatuses);
            this.CancelEditStatusesCommand = new DelegateCommand(CancelEditStatuses);

            this.ClearFiltersCommand = new DelegateCommand(ClearFilters);

            GetIssuesAsync();
            GetPrioritiesAsync();
            GetStatusesAsync();
            GetProjectsAsync();
            GetBoardsAsync();
        }
예제 #12
0
 public JobType(IJobService jobService, ICategoryService categoryService, IPriorityService priorityService, IRoleService roleService, IFrequencyService frequencyService)
 {
     Field(m => m.Id);
     Field <CategoryType, CategoryDto>().Name("Category")
     .ResolveAsync(ctx => { return(categoryService.GetCategoryIdAsync(ctx.Source.CategoryId)); });
     Field <PriorityType, PriorityDto>().Name("Image")
     .ResolveAsync(ctx => { return(priorityService.GetPriorityByIdAsync(ctx.Source.PriorityId)); });
     Field <RoleType, RoleDto>().Name("Role")
     .ResolveAsync(ctx => { return(roleService.GetRoleByIdAsync(ctx.Source.RoleId)); });
     Field(m => m.Name);
     Field(m => m.Duration);
     Field(m => m.IsDeleted);
     Field <FrequencyType, FrequencyDto>().Name("Frequency")
     .ResolveAsync(ctx => { return(frequencyService.GetFrequencyIdAsync(ctx.Source.FrequencyId)); });
     Field(m => m.IsActive);
     Field(m => m.StartDate);
     Field(m => m.EndDate);
     Field(m => m.RecurringEvery);
     Field(m => m.Occurrences);
     Field(m => m.TimesHappened);
 }
        public void Initialize()
        {
            MockUow = new Mock<IMessageRoutingSystemUow>();
            MockUow.Setup(x => x.Rules).Returns(MockRepoRule.Object);
            MockUow.Setup(x => x.Pools).Returns(MockRepoPool.Object);
            MockUow.Setup(x => x.Applications).Returns(MockRepoApplication.Object);
            MockUow.Setup(x => x.ApplicationGroups).Returns(MockRepoApplicationGroup.Object);
            MockUow.Setup(x => x.ApplicationGroupMaps).Returns(MockRepoApplicationGroupMap.Object);
            MockUow.Setup(x => x.Machines).Returns(MockRepoMachine.Object);
            MockUow.Setup(x => x.MachineGroups).Returns(MockRepoMachineGroup.Object);
            MockUow.Setup(x => x.MachineGroupMaps).Returns(MockRepoMachineGroupMap.Object);
            MockUow.Setup(x => x.MessagePools).Returns(MockRepoMessagePool.Object);
            MockUow.Setup(x => x.Messages).Returns(MockRepoMessage.Object);
            MockUow.Setup(x => x.Priorities).Returns(MockRepoPriority.Object);

            RuleService = new RuleService(MockUow.Object);
            PoolService = new PoolService(MockUow.Object);
            ApplicationService = new ApplicationService(MockUow.Object);
            MachineService = new MachineService(MockUow.Object);
            MessagePoolService = new MessagePoolService(MockUow.Object);
            MessageService = new MessageService(MockUow.Object);
            PriorityService = new PriorityService(MockUow.Object);
        }
예제 #14
0
        public List <string> Calculate(List <string> evaluationInput, IPriorityService priority)
        {
            var priorities = priority.GetPiorityList();

            var operationGroupedByPriorities = priorities.GroupBy(p => p.Key).OrderBy(p => p.Key);

            foreach (var group in operationGroupedByPriorities)
            {
                for (int charPosition = 0; charPosition < evaluationInput.Count(); charPosition++)
                {
                    string currentChar = evaluationInput.ElementAt(charPosition);

                    if (group.Any(g => g.Value.GetOperationSymbol() == currentChar))
                    {
                        var concretPriority = GetOperationPriorityGroup(currentChar, group, charPosition);

                        if (concretPriority.Equals(new KeyValuePair <int, IOperation>()))
                        {
                            throw new Exception("no operation");
                        }

                        var operation = concretPriority.Value;

                        var result = operation.Calculate(evaluationInput, charPosition);

                        var transformationStrategy = operation.GetTransformation();

                        transformationStrategy.TransformOrginalExpresion(result, evaluationInput, charPosition);

                        charPosition = 0;
                    }
                }
            }

            return(evaluationInput);
        }
예제 #15
0
 public PriorityController(IPriorityService priorityService)
 {
     _priorityService = priorityService;
 }
 public PrioritiesController()
 {
     this.priorityService = new PriorityService();
 }
 public BatteryAdvancedOptionsSaveService(ICategoryService categoryService, IPriorityService priorityService, IStatusService statusService)
 {
     _categoryService = categoryService;
     _priorityService = priorityService;
     _statusService   = statusService;
 }
예제 #18
0
 public TaskController(ITaskService taskService, IPriorityService priorityService, IMapper mapper)
 {
     _taskService     = taskService;
     _priorityService = priorityService;
     _mapper          = mapper;
 }
 public PriorityController(IPriorityService modelService)
 {
     _modelService = modelService;
 }
 public PriorityController(IPriorityService service)
 {
     _service = service;
 }
예제 #21
0
 public PriorityController(IPriorityService PriorityService)
 {
     _PriorityService = PriorityService;
 }
 public InitializeChargeChildToParent(ICategoryService categoryService, IPriorityService priorityService, IStatusService statusService)
 {
     _categoryService = categoryService;
     _priorityService = priorityService;
     _statusService   = statusService;
 }
예제 #23
0
 public ChargeLifecycle(ICategoryService categoryService, IPriorityService priorityService, IStatusService statusService)
 {
     _categoryService = categoryService;
     _priorityService = priorityService;
     _statusService   = statusService;
 }
 public PriorityServiceTests()
 {
     _priorityService = new PriorityService();
     _uow = new MessageRoutingSystemUow();
 }
예제 #25
0
 public PriorityController(IPriorityService priorityService, IMapper mapper)
 {
     _priorityService = priorityService;
     _mapper          = mapper;
 }
예제 #26
0
        public CheckmateQuery(IUsersService users, IRoleService roles, IUserRoleService userRoles, IImageService images, IJobService jobs,
                              INotificationService notifications, IPriorityService priorities,
                              INotificationUserService notificationUsers, IScheduleService schedules, ITaskService tasks, ITaskResultService taskResults, IConfirmationService confirmations,
                              IEntityTypeService entityTypes,
                              ICategoryService categories,
                              IFrequencyService frequencies)
        {
            Field <ListGraphType <UserType> >(
                Name        = "Users",
                Description = "Get the list of Users",
                resolve: context => users.GetUsersAsync());

            Field <UserType>(
                Name        = "User",
                Description = "Get a particular User with a given UserId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name = "id", Description = "Id of the user"
            }),
                resolve: context => users.GetUserByIdAsync(context.GetArgument <string>("id")));

            Field <ListGraphType <RoleType> >("Roles", resolve: context => roles.GetRolesAsync());

            Field <RoleType>(
                Name        = "Role",
                Description = "Get a particular Role with a given RoleId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the role"
            }),
                resolve: context => roles.GetRoleById(context.GetArgument <string>("id")));

            Field <ListGraphType <UserRoleType>, IEnumerable <UserRole> >().Name("UserRoles").Description("Get the list of UserRoles")
            .ResolveAsync(ctx => userRoles.GetUserRolesAsync());

            Field <ListGraphType <ImageType> >(
                Name        = "Images",
                Description = "Get the list of Images",
                resolve: context => images.GetImagesAsync());

            Field <ImageType>(
                Name        = "Image",
                Description = "Get a particular Image with a given ImageId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the image"
            }),
                resolve: context => images.GetImageByIdAsync(context.GetArgument <int>("id")));

            Field <ListGraphType <JobType> >(
                Name        = "Jobs",
                Description = "Get the list of Jobs",
                resolve: context => jobs.GetJobsAsync());

            Field <JobType>(
                Name        = "Job",
                Description = "Get a particular Job with a given JobId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the job"
            }),
                resolve: context => jobs.GetJobByIdAsync(context.GetArgument <long>("id")));

            Field <ListGraphType <NotificationType> >(
                Name        = "Notifications",
                Description = "Get the list of Notifications",
                resolve: context => notifications.GetNotificationsAsync());

            Field <NotificationType>(
                Name        = "Notification",
                Description = "Get a particular Notification with a given NotificationId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the notification"
            }),
                resolve: context => notifications.GetNotificationByIdAsync(context.GetArgument <long>("id")));

            Field <ListGraphType <PriorityType> >(
                Name        = "Priorities",
                Description = "Gets the list of Priorities",
                resolve: context => priorities.GetPrioritiesAsync());

            Field <PriorityType>(
                Name        = "Priority",
                Description = "Get a particular Priority with a given PriorityId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the priority"
            }),
                resolve: context => priorities.GetPriorityByIdAsync(context.GetArgument <short>("id")));

            Field <ListGraphType <NotificationUserType>, IEnumerable <NotificationUser> >().Name("NotificationUsers")
            .ResolveAsync(ctx => notificationUsers.GetNotificationUsersAsync());

            Field <ListGraphType <ScheduleType> >(
                Name        = "Schedules",
                Description = "Gets the list of Schedules",
                resolve: context => schedules.GetSchedulesAsync());

            Field <ConfirmationType>(
                Name        = "Schedule",
                Description = "Get a particular Schedule with a given ScheduleId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the schedule"
            }),
                resolve: context => schedules.GetScheduleByIdAsync(context.GetArgument <long>("id")));

            Field <ListGraphType <TaskResultType> >(
                Name        = "TaskResults",
                Description = "Gets the list of TaskResults",
                resolve: context => taskResults.GetTaskResultsAsync());

            Field <TaskResultType>(
                Name        = "TaskResult",
                Description = "Get a particular TaskResult with a given TaskResultId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the task"
            }),
                resolve: context => taskResults.GetTaskResultByIdAsync(context.GetArgument <long>("id")));

            Field <ListGraphType <TaskType> >(
                Name        = "Tasks",
                Description = "Gets the list of Tasks",
                resolve: context => tasks.GetTasksAsync());

            Field <TaskType>(
                Name        = "Task",
                Description = "Get a particular Task with a given TaskId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the task"
            }),
                resolve: context => tasks.GetTaskByIdAsync(context.GetArgument <long>("id")));


            Field <ListGraphType <FrequencyType> >(
                Name        = "Frequencies",
                Description = "Gets the list of Frequencies",
                resolve: context => frequencies.GetFrequenciesAsync());

            Field <FrequencyType>(
                Name        = "Frequency",
                Description = "Get a particular Frequency with a given FrequencyId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the frequency"
            }),
                resolve: context => frequencies.GetFrequencyIdAsync(context.GetArgument <int>("id")));

            Field <ListGraphType <EntityTypeType> >(
                Name        = "EntityTypes",
                Description = "Gets the list of EntityTypes",
                resolve: context => entityTypes.GetEntityTypesAsync());

            Field <EntityTypeType>(
                Name        = "EntityType",
                Description = "Get a particular EntityType with a given EntityTypeId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the entity type"
            }),
                resolve: context => entityTypes.GetEntityTypeIdAsync(context.GetArgument <int>("id")));

            Field <ListGraphType <CategoryType> >(
                Name        = "Categories",
                Description = "Gets the list of Categories",
                resolve: context => categories.GetCategoriesAsync());

            Field <CategoryType>(
                Name        = "Category",
                Description = "Get a particular Category with a given CategoryId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the category"
            }),
                resolve: context => categories.GetCategoryIdAsync(context.GetArgument <int>("id")));

            Field <ListGraphType <ConfirmationType> >(
                Name        = "Confirmations",
                Description = "Gets the list of Confirmations",
                resolve: context => confirmations.GetConfirmationsAsync());

            Field <ConfirmationType>(
                Name        = "Confirmation",
                Description = "Get a particular Confirmation with a given ConfirmationId",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> >
            {
                Name        = "id",
                Description = "Id of the confirmation"
            }),
                resolve: context => confirmations.GetConfirmationByIdAsync(context.GetArgument <short>("id")));
        }
예제 #27
0
 public TaskController(ITaskService taskService, IPriorityService priorityService)
 {
     _taskService     = taskService;
     _priorityService = priorityService;
 }
예제 #28
0
 public WorkController(IWorkService workService, IPriorityService priorityService, IMapper mapper)
 {
     _workService     = workService;
     _priorityService = priorityService;
     _mapper          = mapper;
 }
예제 #29
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="priorityService"></param>
 /// <param name="cardTypeService"></param>
 public SelectListController(IPriorityService priorityService, ICardTypeService cardTypeService)
 {
     _priorityService = priorityService;
     _cardTypeService = cardTypeService;
 }
예제 #30
0
 public PriorityController(IPriorityService priorityData)
 {
     this._priorityData = priorityData;
 }
예제 #31
0
 public PrioritiesController(ILogger <PrioritiesController> logger,
                             IPriorityService priorityService)
 {
     this.logger          = logger;
     this.priorityService = priorityService;
 }
 public PrioritiesController(PriorityService priorityService)
 {
     _priorityService = priorityService;
 }