Esempio n. 1
0
 public void AddProjectOwner(ProjectRegistration package, User user) {
     throw new NotImplementedException();
 }
Esempio n. 2
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;
        }