} // constructor public ServiceLogoMappings(string domainMappingsXmlFilename, string serviceMappingsXmlFile) { var domainMappings = LogosCommon.ParseDomainMappingsXml(domainMappingsXmlFilename); var serviceMappings = LogosCommon.ParseServiceMappingsXml(serviceMappingsXmlFile); Init(domainMappings, serviceMappings); } // constructor
} // VerifyLogosFiles private IEnumerable <Domain> GetReferencedFiles() { IDictionary <string, Domain> result; var serviceMappings = LogosCommon.ParseServiceMappingsXml(AppUiConfiguration.Current.Folders.Logos.FileServiceMappings); var domains = from package in serviceMappings.Packages from domain in package.Domains select domain; result = new Dictionary <string, Domain>(domains.Count()); foreach (var domain in domains) { var domainName = domain.RedirectDomainName ?? domain.DomainName; result[domainName] = new Domain(domainName); } // foreach domain foreach (var domain in domains) { var domainName = domain.RedirectDomainName ?? domain.DomainName; var list = result[domainName]; foreach (var mapping in domain.Mappings) { list.Add(mapping); } // foreach mapping } // foreach domain return(result.Values); } // GetReferencedFiles
} // Run private IEnumerable <Domain> GetMappings() { var serviceMappings = LogosCommon.ParseServiceMappingsXml(AppUiConfiguration.Current.Folders.Logos.FileServiceMappings); var result = from package in serviceMappings.Packages from domain in package.Domains select new Domain(domain.RedirectDomainName ?? domain.DomainName, domain.Mappings); return(result); } // GetMappings
} // GetDomainMappings protected IDictionary <string, MappedService> GetMappedServices() { var serviceMappings = LogosCommon.ParseServiceMappingsXml(AppUiConfiguration.Current.Folders.Logos.FileServiceMappings); var q = from package in serviceMappings.Packages where package.PackageName != "<default>" from domain in package.Domains from mapping in domain.Mappings select new MappedService() { Domain = domain.DomainName, Mapping = mapping }; var result = new Dictionary <string, MappedService>(); foreach (var item in q) { result.Add(item.GetKey(), item); } // foreach return(result); } // GetMappedServices
} // GetBroadcastList protected IDictionary <string, ServiceLogoMappings.ReplacementDomain> GetDomainMappings() { var xmlMappings = LogosCommon.ParseDomainMappingsXml(AppUiConfiguration.Current.Folders.Logos.FileServiceDomainMappings); return(ServiceLogoMappings.BuildMapping(xmlMappings)); } // GetDomainMappings
} // constructor public ProviderLogoMappings(string providerMappingsXmlFilename) { var providerMappings = LogosCommon.ParseProviderMappingsXml(providerMappingsXmlFilename); Init(providerMappings); } // constructor