Example #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;
        }
Example #2
0
 public void MarkProjectListed(Project project, bool commitChanges = true) {
     throw new NotImplementedException();
 }
Example #3
0
 public void PublishProject(Project project, bool commitChanges = true) {
     throw new NotImplementedException();
 }
Example #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;
        }
Example #5
0
 public void SetLicenseReportVisibility(Project project, bool visible, bool commitChanges = true) {
     throw new NotImplementedException();
 }