コード例 #1
0
 public GenerateTypeOptionsResult GetGenerateTypeOptions(
     string className,
     GenerateTypeDialogOptions generateTypeDialogOptions,
     Document document,
     INotificationService notificationService,
     IProjectManagementService projectManagementService,
     ISyntaxFactsService syntaxFactsService)
 {
     // Storing the actual values
     ClassName = className;
     GenerateTypeDialogOptions = generateTypeDialogOptions;
     if (DefaultNamespace == null)
     {
         DefaultNamespace = projectManagementService.GetDefaultNamespace(Project, Project?.Solution.Workspace);
     }
     return new GenerateTypeOptionsResult(
         accessibility: Accessibility,
         typeKind: TypeKind,
         typeName: TypeName,
         project: Project,
         isNewFile: IsNewFile,
         newFileName: NewFileName,
         folders: Folders,
         fullFilePath: FullFilePath,
         existingDocument: ExistingDocument,
         areFoldersValidIdentifiers: AreFoldersValidIdentifiers,
         defaultNamespace: DefaultNamespace,
         isCancelled: IsCancelled);
 }
コード例 #2
0
 public CompanyController(IOfficeManagementService officeManagementService, IServiceManagement serviceManagement, IProductService productService, IProjectManagementService projectManagementService)
 {
     _officeManagementService  = officeManagementService;
     _serviceManagement        = serviceManagement;
     _productService           = productService;
     _projectManagementService = projectManagementService;
 }
コード例 #3
0
ファイル: PackageCommand.cs プロジェクト: akobr/texo.ui
 public PackageCommand(
     IPackageManagementService packages,
     IProjectManagementService projects)
 {
     this.packages = packages ?? throw new ArgumentNullException(nameof(packages));
     this.projects = projects ?? throw new ArgumentNullException(nameof(projects));
 }
コード例 #4
0
        internal GenerateTypeDialog(string className, GenerateTypeDialogOptions generateTypeDialogOptions, Document document, INotificationService notificationService, IProjectManagementService projectManagementService, ISyntaxFactsService syntaxFactsService)
        {
            this.generateTypeDialogOptions = generateTypeDialogOptions;
            this.projectManagementService  = projectManagementService;
            this.syntaxFactsService        = syntaxFactsService;
            this.document = document;
            Build();

            PopulateAccessibilty();
            PopulateTypeKinds();

            entryName.Text = className;
            FileName       = className + ".cs";

            PopulateProjectList();

            comboboxProject.SelectionChanged += delegate {
                PopulateDocumentList();
            };
            comboboxProject.SelectedIndex = 0;

            comboboxExistingFile.SelectionChanged += delegate {
                SelectedDocument = (Document)comboboxExistingFile.SelectedItem;
            };
            PopulateDocumentList();

            radiobuttonToExistingFile.Active = true;
        }
コード例 #5
0
 public GenerateTypeOptionsResult GetGenerateTypeOptions(
     string className,
     GenerateTypeDialogOptions generateTypeDialogOptions,
     Document document,
     INotificationService notificationService,
     IProjectManagementService projectManagementService,
     ISyntaxFactsService syntaxFactsService)
 {
     // Storing the actual values
     ClassName = className;
     GenerateTypeDialogOptions = generateTypeDialogOptions;
     if (DefaultNamespace == null)
     {
         DefaultNamespace = projectManagementService.GetDefaultNamespace(Project, Project?.Solution.Workspace);
     }
     return(new GenerateTypeOptionsResult(
                accessibility: Accessibility,
                typeKind: TypeKind,
                typeName: TypeName,
                project: Project,
                isNewFile: IsNewFile,
                newFileName: NewFileName,
                folders: Folders,
                fullFilePath: FullFilePath,
                existingDocument: ExistingDocument,
                areFoldersValidIdentifiers: AreFoldersValidIdentifiers,
                defaultNamespace: DefaultNamespace,
                isCancelled: IsCancelled));
 }
コード例 #6
0
 public async Task <ActionResult <ProjectCreated> > CreateProject(
     [FromBody] NewProject newProjectData,
     [FromServices] IProjectManagementService projectManagementService
     )
 {
     return(await ExecuteServiceAsync(() => projectManagementService.CreateProject(_userIdentifier, newProjectData)));
 }
コード例 #7
0
        /// <summary>
        /// this constructor is used for services Dependency Injection
        /// </summary>
        /// <param name="projectService">project service object</param>
        /// <param name="employeeService">project service object</param>

        public ProjectController(IProjectService projectService, IEmployeeService employeeService, IMapper mapper, IProjectManagementService projectManagementService, IProjectRequirementsService projectRequirementsService)
        {
            _projectService             = projectService;
            _employeeService            = employeeService;
            _mapper                     = mapper;
            _projectManagementService   = projectManagementService;
            _projectRequirementsService = projectRequirementsService;
        }
コード例 #8
0
 public ProjectManagementController(IProjectManagementService projectManagementService,
                                    IProjectsService projectsService,
                                    IProjectTemplatesService projectTemplatesService)
 {
     this.projectManagementService = projectManagementService;
     this.projectsService          = projectsService;
     this.projectTemplatesService  = projectTemplatesService;
 }
コード例 #9
0
            public GenerateTypeOptionsResult GetGenerateTypeOptions(
                string typeName,
                GenerateTypeDialogOptions generateTypeDialogOptions,
                Document document,
                INotificationService notificationService,
                IProjectManagementService projectManagementService,
                ISyntaxFactsService syntaxFactsService
                )
            {
                var viewModel = new GenerateTypeDialogViewModel(
                    document,
                    notificationService,
                    projectManagementService,
                    syntaxFactsService,
                    generateTypeDialogOptions,
                    typeName,
                    document.Project.Language == LanguageNames.CSharp ? ".cs" : ".vb",
                    _isNewFile,
                    _accessSelectString,
                    _typeKindSelectString
                    );

                var dialog = new GenerateTypeDialog(viewModel);
                var result = dialog.ShowModal();

                if (result.HasValue && result.Value)
                {
                    // Retain choice
                    _isNewFile            = viewModel.IsNewFile;
                    _accessSelectString   = viewModel.SelectedAccessibilityString;
                    _typeKindSelectString = viewModel.SelectedTypeKindString;

                    var defaultNamespace = projectManagementService.GetDefaultNamespace(
                        viewModel.SelectedProject,
                        viewModel.SelectedProject?.Solution.Workspace
                        );

                    return(new GenerateTypeOptionsResult(
                               accessibility: viewModel.SelectedAccessibility,
                               typeKind: viewModel.SelectedTypeKind,
                               typeName: viewModel.TypeName,
                               project: viewModel.SelectedProject,
                               isNewFile: viewModel.IsNewFile,
                               newFileName: viewModel.FileName.Trim(),
                               folders: viewModel.Folders,
                               fullFilePath: viewModel.FullFilePath,
                               existingDocument: viewModel.SelectedDocument,
                               defaultNamespace: defaultNamespace,
                               areFoldersValidIdentifiers: viewModel.AreFoldersValidIdentifiers
                               ));
                }
                else
                {
                    return(GenerateTypeOptionsResult.Cancelled);
                }
            }
コード例 #10
0
 public PATsController(IJobsService jobsService,
                       IProjectManagementService projectManagementService,
                       IProjectsService projectsService,
                       IAuthService authService)
 {
     this.jobsService = jobsService;
     this.projectManagementService = projectManagementService;
     this.projectsService          = projectsService;
     this.authService = authService;
 }
コード例 #11
0
 public ManagementService(
     IProjectManagementService projects,
     IPackageManagementService packages,
     IConfigManagementService configs,
     ISourceManagementService sources)
 {
     Projects = projects;
     Packages = packages;
     Configs  = configs;
     Sources  = sources;
 }
コード例 #12
0
        /// <summary>
        /// this is the default constructor for the Skill servicew
        /// </summary>
        /// <param name="projectRepository">projectRepository interface object for dependency injection</param>
        /// <param name="employeeRepository">employeeRepository interface object for dependency injection</param>
        /// <param name="departmentDesignationService">employeeRepository interface object for dependency injection</param>

        public ProjectService(IProjectRepository projectRepository, IEmployeeRepository employeeRepository, IDepartmentDesignationService departmentDesignationService, IProjectManagementRepository projectManagementRepository, IMapper mapper,
                              IProjectManagementService projectManagementService)
        {
            _projectRepository            = projectRepository;
            _employeeRepository           = employeeRepository;
            _departmentDesignationService = departmentDesignationService;
            _projectManagementRepository  = projectManagementRepository;
            _mapper = mapper;
            _projectManagementService = projectManagementService;
            totalRecords      = 0;
            returnedRecords   = 0;
            currentPageNumber = 0;
        }
コード例 #13
0
            public GenerateTypeOptionsResult GetGenerateTypeOptions(
                string typeName,
                GenerateTypeDialogOptions generateTypeDialogOptions,
                Document document,
                INotificationService notificationService,
                IProjectManagementService projectManagementService,
                ISyntaxFactsService syntaxFactsService)
            {
                var viewModel = new GenerateTypeDialogViewModel(
                    document,
                    notificationService,
                    projectManagementService,
                    syntaxFactsService,
                    _generatedCodeService,
                    generateTypeDialogOptions,
                    typeName,
                    document.Project.Language == LanguageNames.CSharp ? ".cs" : ".vb",
                    _isNewFile,
                    _accessSelectString,
                    _typeKindSelectString);

                var dialog = new GenerateTypeDialog(viewModel);
                var result = dialog.ShowModal();

                if (result.HasValue && result.Value)
                {
                    // Retain choice
                    _isNewFile = viewModel.IsNewFile;
                    _accessSelectString = viewModel.SelectedAccessibilityString;
                    _typeKindSelectString = viewModel.SelectedTypeKindString;

                    var defaultNamespace = projectManagementService.GetDefaultNamespace(viewModel.SelectedProject, viewModel.SelectedProject?.Solution.Workspace);

                    return new GenerateTypeOptionsResult(
                        accessibility: viewModel.SelectedAccessibility,
                        typeKind: viewModel.SelectedTypeKind,
                        typeName: viewModel.TypeName,
                        project: viewModel.SelectedProject,
                        isNewFile: viewModel.IsNewFile,
                        newFileName: viewModel.FileName.Trim(),
                        folders: viewModel.Folders,
                        fullFilePath: viewModel.FullFilePath,
                        existingDocument: viewModel.SelectedDocument,
                        defaultNamespace: defaultNamespace,
                        areFoldersValidIdentifiers: viewModel.AreFoldersValidIdentifiers);
                }
                else
                {
                    return GenerateTypeOptionsResult.Cancelled;
                }
            }
コード例 #14
0
ファイル: RequestSvc.cs プロジェクト: sephiroh/FinalProject
 /// <summary>
 ///
 /// </summary>
 /// <param name="container"></param>
 /// <param name="mapper"></param>
 /// <param name="emailSettings"></param>
 /// <param name="taggbleApplicantsReposity"></param>
 public RequestSvc(IServiceProvider container, IMapper mapper, IOptions <EmailSettings> emailSettings) : base(container, mapper)
 {
     _requestCtxRepository        = container.GetService <IRequestContextRepository>();
     _referenceNumberRepository   = container.GetService <IReferenceNumberRepository>();
     _requestTechnologyRepository = container.GetService <IRequestTechnologyRepository>();
     _emailService               = container.GetService <IEmailService>();
     _userService                = container.GetService <IUserService>();
     _projectService             = container.GetService <IProjectManagementService>();
     _roleService                = container.GetService <IRoleService>();
     _statusRepository           = container.GetService <IStatusRepository>();
     _applicantLevelRepository   = container.GetService <IApplicantLevelRepository>();
     _emailSettings              = emailSettings.Value;
     _taggableApplicantsReposity = container.GetService <ITaggableRepository>();;
     _taggedApplicantRepository  = container.GetService <ITaggedApplicantRepository>();;
 }
コード例 #15
0
 public ProjectsController(IProjectManagementService projectManagementService,
                           IProjectsService projectsService,
                           IPurchaseOrdersService purchaseOrdersService,
                           IProjectTemplatesService projectTemplatesService,
                           ISitesService sitesService,
                           IPOsService pOsService,
                           IInvoicesService invoicesService,
                           IJobsService jobsService)
 {
     this.projectManagementService = projectManagementService;
     this.projectsService          = projectsService;
     this.purchaseOrdersService    = purchaseOrdersService;
     this.projectTemplatesService  = projectTemplatesService;
     this.sitesService             = sitesService;
     this.pOsService      = pOsService;
     this.invoicesService = invoicesService;
     this.jobsService     = jobsService;
 }
コード例 #16
0
        internal GenerateTypeDialogViewModel(
            Document document,
            INotificationService notificationService,
            IProjectManagementService projectManagementService,
            ISyntaxFactsService syntaxFactsService,
            IGeneratedCodeRecognitionService generatedCodeService,
            GenerateTypeDialogOptions generateTypeDialogOptions,
            string typeName,
            string fileExtension,
            bool isNewFile,
            string accessSelectString,
            string typeKindSelectString)
        {
            _generateTypeDialogOptions = generateTypeDialogOptions;

            InitialSetup(document.Project.Language);
            var dependencyGraph = document.Project.Solution.GetProjectDependencyGraph();

            // Initialize the dependencies
            var projectListing = new List<ProjectSelectItem>();

            // Populate the project list
            // Add the current project
            projectListing.Add(new ProjectSelectItem(document.Project));

            // Add the rest of the projects
            // Adding dependency graph to avoid cyclic dependency
            projectListing.AddRange(document.Project.Solution.Projects
                                    .Where(p => p != document.Project && !dependencyGraph.GetProjectsThatThisProjectTransitivelyDependsOn(p.Id).Contains(document.Project.Id))
                                    .Select(p => new ProjectSelectItem(p)));

            this.ProjectList = projectListing;

            const string attributeSuffix = "Attribute";
            _typeName = generateTypeDialogOptions.IsAttribute && !typeName.EndsWith(attributeSuffix, StringComparison.Ordinal) ? typeName + attributeSuffix : typeName;
            this.FileName = typeName + fileExtension;

            _document = document;
            this.SelectedProject = document.Project;
            this.SelectedDocument = document;
            _notificationService = notificationService;
            _generatedCodeService = generatedCodeService;

            this.AccessList = document.Project.Language == LanguageNames.CSharp ?
                                _csharpAccessList :
                                _visualBasicAccessList;
            this.AccessSelectIndex = this.AccessList.Contains(accessSelectString) ?
                                        this.AccessList.IndexOf(accessSelectString) : 0;
            this.IsAccessListEnabled = true;

            this.KindList = document.Project.Language == LanguageNames.CSharp ?
                                _csharpTypeKindList :
                                _visualBasicTypeKindList;
            this.KindSelectIndex = this.KindList.Contains(typeKindSelectString) ?
                                    this.KindList.IndexOf(typeKindSelectString) : 0;

            this.ProjectSelectIndex = 0;
            this.DocumentSelectIndex = 0;

            _isNewFile = isNewFile;

            _syntaxFactsService = syntaxFactsService;

            _projectManagementService = projectManagementService;
            if (projectManagementService != null)
            {
                this.ProjectFolders = _projectManagementService.GetFolders(this.SelectedProject.Id, this.SelectedProject.Solution.Workspace);
            }
            else
            {
                this.ProjectFolders = SpecializedCollections.EmptyList<string>();
            }
        }
コード例 #17
0
 public async Task <ActionResult <ProjectManagerItem> > GetUserProjects([FromServices] IProjectManagementService projectManagementService)
 {
     return(await ExecuteServiceAsync(() => projectManagementService.GetUserProjects(_userIdentifier)));
 }
コード例 #18
0
 public ProjectUpdateModel(IProjectManagementService projectManagementService, IOfficeManagementService officeManagementService)
 {
     _projectManagementService = projectManagementService;
     _officeManagementService  = officeManagementService;
 }
コード例 #19
0
 public ProjectUpdateModel()
 {
     _projectManagementService = Startup.AutoFacContainer.Resolve <IProjectManagementService>();
     _officeManagementService  = Startup.AutoFacContainer.Resolve <IOfficeManagementService>();
 }
コード例 #20
0
ファイル: Program.cs プロジェクト: Darova93/PoC-.NET
        static void Main(string[] args)
        {
            IKernel kernel = FactoryDependency.GetKernel();

            IUserManagementService    userservice    = kernel.Get <IUserManagementService>();
            IProjectManagementService projectservice = kernel.Get <IProjectManagementService>();

            UserManagementServiceClient    clientUser    = null;
            ProjectManagementServiceClient clientProject = null;

            try
            {
                clientUser    = new UserManagementServiceClient("BasicHttpBinding_IUserManagementService");
                clientProject = new ProjectManagementServiceClient("BasicHttpBinding_IProjectManagementService");

                UserWorkflow    workflow        = new UserWorkflow(clientUser);
                ProjectWorkflow projectWorkflow = new ProjectWorkflow(clientProject);

                bool exit = false;

                do
                {
                    System.Console.Clear();
                    System.Console.WriteLine("[1] Create user");
                    System.Console.WriteLine("[2] Read user");
                    System.Console.WriteLine("[3] Update user");
                    System.Console.WriteLine("[4] Delete user");
                    System.Console.WriteLine("[5] Create project");
                    System.Console.WriteLine("[6] Get All projects");
                    System.Console.WriteLine("[0] Exit");
                    System.Console.Write("What do you want to do?:");

                    string opt = System.Console.ReadLine();

                    switch (opt)
                    {
                    case "0":
                        exit = true;
                        break;

                    case "1":
                        //client.Open();
                        workflow.CreateUser();
                        //client.Close();
                        break;

                    case "2":
                        //client.Open();
                        workflow.ReadUser();
                        //client.Close();
                        break;

                    case "3":
                        //client.Open();
                        workflow.UpdateUser();
                        //client.Close();
                        break;

                    case "4":
                        //client.Open();
                        workflow.Delete();
                        //client.Close();
                        break;

                    case "5":
                        projectWorkflow.Create();
                        break;

                    case "6":
                        projectWorkflow.GetAll();
                        break;
                    }

                    System.Console.Write("Continue...");
                    System.Console.ReadKey();
                } while (!exit);
            }
            finally
            {
                if (clientUser != null && clientUser.State == CommunicationState.Opened)
                {
                    clientUser.Close();
                }

                if (clientProject != null && clientProject.State == CommunicationState.Opened)
                {
                    clientProject.Close();
                }
            }
        }
コード例 #21
0
ファイル: ProjectCommand.cs プロジェクト: akobr/texo.ui
 public ProjectCommand(IProjectManagementService projects)
 {
     this.projects = projects ?? throw new ArgumentNullException(nameof(projects));
 }
コード例 #22
0
 /// <summary>
 /// this constructor is used for services Dependency Injection
 /// </summary>
 /// <param name="projectManagementService">projectManagement service object</param>
 public ProjectManagementController(IProjectManagementService projectManagementService)
 {
     _projectManagementService = projectManagementService;
 }
コード例 #23
0
        GenerateTypeOptionsResult IGenerateTypeOptionsService.GetGenerateTypeOptions(string className, GenerateTypeDialogOptions generateTypeDialogOptions, Document document, INotificationService notificationService, IProjectManagementService projectManagementService, ISyntaxFactsService syntaxFactsService)
        {
            var dialog = new GenerateTypeDialog(className, generateTypeDialogOptions, document, notificationService, projectManagementService, syntaxFactsService);

            try {
                bool performChange = dialog.Run() == Xwt.Command.Ok;
                if (!performChange)
                {
                    return(GenerateTypeOptionsResult.Cancelled);
                }

                return(dialog.GenerateTypeOptionsResult);
            } catch (Exception ex) {
                LoggingService.LogError("Error while signature changing.", ex);
                return(GenerateTypeOptionsResult.Cancelled);
            } finally {
                dialog.Dispose();
            }
        }
コード例 #24
0
        internal GenerateTypeDialogViewModel(
            Document document,
            INotificationService notificationService,
            IProjectManagementService projectManagementService,
            ISyntaxFactsService syntaxFactsService,
            IGeneratedCodeRecognitionService generatedCodeService,
            GenerateTypeDialogOptions generateTypeDialogOptions,
            string typeName,
            string fileExtension,
            bool isNewFile,
            string accessSelectString,
            string typeKindSelectString)
        {
            _generateTypeDialogOptions = generateTypeDialogOptions;

            InitialSetup(document.Project.Language);
            var dependencyGraph = document.Project.Solution.GetProjectDependencyGraph();

            // Initialize the dependencies
            var projectListing = new List <ProjectSelectItem>();

            // Populate the project list
            // Add the current project
            projectListing.Add(new ProjectSelectItem(document.Project));

            // Add the rest of the projects
            // Adding dependency graph to avoid cyclic dependency
            projectListing.AddRange(document.Project.Solution.Projects
                                    .Where(p => p != document.Project && !dependencyGraph.GetProjectsThatThisProjectTransitivelyDependsOn(p.Id).Contains(document.Project.Id))
                                    .Select(p => new ProjectSelectItem(p)));

            this.ProjectList = projectListing;

            const string attributeSuffix = "Attribute";

            _typeName     = generateTypeDialogOptions.IsAttribute && !typeName.EndsWith(attributeSuffix, StringComparison.Ordinal) ? typeName + attributeSuffix : typeName;
            this.FileName = typeName + fileExtension;

            _document             = document;
            this.SelectedProject  = document.Project;
            this.SelectedDocument = document;
            _notificationService  = notificationService;
            _generatedCodeService = generatedCodeService;

            this.AccessList = document.Project.Language == LanguageNames.CSharp ?
                              _csharpAccessList :
                              _visualBasicAccessList;
            this.AccessSelectIndex = this.AccessList.Contains(accessSelectString) ?
                                     this.AccessList.IndexOf(accessSelectString) : 0;
            this.IsAccessListEnabled = true;

            this.KindList = document.Project.Language == LanguageNames.CSharp ?
                            _csharpTypeKindList :
                            _visualBasicTypeKindList;
            this.KindSelectIndex = this.KindList.Contains(typeKindSelectString) ?
                                   this.KindList.IndexOf(typeKindSelectString) : 0;

            this.ProjectSelectIndex  = 0;
            this.DocumentSelectIndex = 0;

            _isNewFile = isNewFile;

            _syntaxFactsService = syntaxFactsService;

            _projectManagementService = projectManagementService;
            if (projectManagementService != null)
            {
                this.ProjectFolders = _projectManagementService.GetFolders(this.SelectedProject.Id, this.SelectedProject.Solution.Workspace);
            }
            else
            {
                this.ProjectFolders = SpecializedCollections.EmptyList <string>();
            }
        }
コード例 #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectManagementController"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 public ProjectManagementController(IServiceProvider container) : base(container)
 {
     _projectManagementService = _container.GetService <IProjectManagementService>();
 }