Add() public method

public Add ( Kooboo.CMS.Sites.Models.Label item ) : void
item Kooboo.CMS.Sites.Models.Label
return void
Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
        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);
                }
            }
        }
Ejemplo n.º 4
0
 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();
     }
 }