public void ExportLabelsToDisk(Site site) { if (!(_rawLabelProvider is LabelProvider)) { var fileLabelProvider = new LabelProvider(); fileLabelProvider.Flush(site); foreach (var item in _rawLabelProvider.All(site)) { fileLabelProvider.Add(item); } } }
private static void ConvertFromResx(ISiteProvider siteProvider) { var sites = siteProvider.AllSites(); var labelProvider = new LabelProvider(); foreach (var site in sites) { var elementProvider = new SiteLabelRepository(site); foreach (var item in elementProvider.Elements()) { labelProvider.Add(new Label(site, item.Category, item.Name, item.Value) { UtcCreationDate = DateTime.UtcNow }); } elementProvider.Clear(); } }