Esempio n. 1
0
        public void AddCloudProviderService(Guid organizationId, string name,
                                            CloudProviderService type,
                                            string accessId,
                                            string accessName,
                                            string accessSecret,
                                            string accessAppId,
                                            string accessAppSecret,
                                            string accessDirectory,
                                            string accessRegion)
        {
            Organization organization = FindOrganizationById(organizationId);

            if (organization == null)
            {
                throw new ApplicationException($"The organization with id {organizationId} does not exists");
            }

            var newOrganizationCPS = OrganizationCPS.Factory.Create(name, type, accessId, accessName, accessSecret, accessAppId, accessAppSecret, accessDirectory, accessRegion, this.Id);

            organization.AddCloudProviderService(newOrganizationCPS);
        }