Exemplo n.º 1
0
        public Project CreateProject(Project project, User user, bool commitChanges = true) 
        {
            var packageRegistration = CreateOrGetProjectRegistration(user, project);
            packageRegistration.Projects.Add(project);

            if (!commitChanges) return project;

            _packageRegistrationRepository.CommitChanges();

            return project;
        }
Exemplo n.º 2
0
 public void MarkProjectListed(Project project, bool commitChanges = true) {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 public void PublishProject(Project project, bool commitChanges = true) {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
        private ProjectRegistration CreateOrGetProjectRegistration(User currentUser, Project project)
        {
            var projectRegistration = FindProjectRegistrationById(project.Key);

            if (projectRegistration != null && !projectRegistration.Owners.Contains(currentUser))
            {
                throw new EntityException("Project ID not available", project.Key);
            }

            if (projectRegistration != null) return projectRegistration;

            projectRegistration = new ProjectRegistration
            {
                Id = project.Key
            };

            projectRegistration.Owners.Add(currentUser);

            _packageRegistrationRepository.InsertOnCommit(projectRegistration);

            return projectRegistration;
        }
Exemplo n.º 5
0
 public void SetLicenseReportVisibility(Project project, bool visible, bool commitChanges = true) {
     throw new NotImplementedException();
 }