public AgeBand(IRegistrationPermissions permissions, IEnumerable <ILegalDocument> legalDocuments, IEnumerable <string> legalDocumentsTypeOrder, IEnumerable <IMarketingItem> marketing, AgeBandType type, string countryCode) { Permissions = permissions; LegalDocuments = legalDocuments; LegalDocumentsTypeOrder = legalDocumentsTypeOrder; Marketing = marketing; AgeBandType = type; CountryCode = countryCode; }
private static IAgeBand CreateAgeBand(SiteConfigurationData siteConfig, ConfigurationAgeBand configurationAgeBand, string configurationAgeBandKey, bool registration, IList <RegistrationText> legalTexts) { IRegistrationPermissions permissions = CreateRegistrationPermissions(registration ? configurationAgeBand.CREATE : configurationAgeBand.UPDATE); IEnumerable <ILegalDocument> legalDocuments = BuildLegalDocs(siteConfig.legal, configurationAgeBandKey, registration, legalTexts); IEnumerable <string> legalDocumentsTypeOrder = GetLegalDocumentsTypeOrder(siteConfig.legal, configurationAgeBandKey); IEnumerable <IMarketingItem> marketing = BuildMarketingItems(siteConfig, configurationAgeBandKey, registration, legalTexts); AgeBandType type = AgeBandTypeConverter.Convert(configurationAgeBandKey); string country = configurationAgeBand.country; return(new AgeBand(permissions, legalDocuments, legalDocumentsTypeOrder, marketing, type, country)); }