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); }
public CompanyController(IOfficeManagementService officeManagementService, IServiceManagement serviceManagement, IProductService productService, IProjectManagementService projectManagementService) { _officeManagementService = officeManagementService; _serviceManagement = serviceManagement; _productService = productService; _projectManagementService = projectManagementService; }
public PackageCommand( IPackageManagementService packages, IProjectManagementService projects) { this.packages = packages ?? throw new ArgumentNullException(nameof(packages)); this.projects = projects ?? throw new ArgumentNullException(nameof(projects)); }
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; }
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)); }
public async Task <ActionResult <ProjectCreated> > CreateProject( [FromBody] NewProject newProjectData, [FromServices] IProjectManagementService projectManagementService ) { return(await ExecuteServiceAsync(() => projectManagementService.CreateProject(_userIdentifier, newProjectData))); }
/// <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; }
public ProjectManagementController(IProjectManagementService projectManagementService, IProjectsService projectsService, IProjectTemplatesService projectTemplatesService) { this.projectManagementService = projectManagementService; this.projectsService = projectsService; this.projectTemplatesService = projectTemplatesService; }
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); } }
public PATsController(IJobsService jobsService, IProjectManagementService projectManagementService, IProjectsService projectsService, IAuthService authService) { this.jobsService = jobsService; this.projectManagementService = projectManagementService; this.projectsService = projectsService; this.authService = authService; }
public ManagementService( IProjectManagementService projects, IPackageManagementService packages, IConfigManagementService configs, ISourceManagementService sources) { Projects = projects; Packages = packages; Configs = configs; Sources = sources; }
/// <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; }
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; } }
/// <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>();; }
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; }
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>(); } }
public async Task <ActionResult <ProjectManagerItem> > GetUserProjects([FromServices] IProjectManagementService projectManagementService) { return(await ExecuteServiceAsync(() => projectManagementService.GetUserProjects(_userIdentifier))); }
public ProjectUpdateModel(IProjectManagementService projectManagementService, IOfficeManagementService officeManagementService) { _projectManagementService = projectManagementService; _officeManagementService = officeManagementService; }
public ProjectUpdateModel() { _projectManagementService = Startup.AutoFacContainer.Resolve <IProjectManagementService>(); _officeManagementService = Startup.AutoFacContainer.Resolve <IOfficeManagementService>(); }
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(); } } }
public ProjectCommand(IProjectManagementService projects) { this.projects = projects ?? throw new ArgumentNullException(nameof(projects)); }
/// <summary> /// this constructor is used for services Dependency Injection /// </summary> /// <param name="projectManagementService">projectManagement service object</param> public ProjectManagementController(IProjectManagementService projectManagementService) { _projectManagementService = projectManagementService; }
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(); } }
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>(); } }
/// <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>(); }