Exemple #1
0
 public static MetaEntry Combine(MetaEntry meta1, MetaEntry meta2, string contentSeparator)
 {
     var newMeta = new MetaEntry();
     Merge(newMeta._builder.Attributes, meta1._builder.Attributes, meta2._builder.Attributes);
     if (!String.IsNullOrEmpty(meta1.Content) && !String.IsNullOrEmpty(meta2.Content)) {
         newMeta.Content = meta1.Content + contentSeparator + meta2.Content;
     }
     return newMeta;
 }
 public void SetMeta(MetaEntry meta)
 {
     if (meta == null || String.IsNullOrEmpty(meta.Name))
     {
         return;
     }
     _metas[meta.Name] = meta;
 }
 public void AppendMeta(MetaEntry meta, string contentSeparator)
 {
     if (meta == null || String.IsNullOrEmpty(meta.Name))
     {
         return;
     }
     MetaEntry existingMeta;
     if (_metas.TryGetValue(meta.Name, out existingMeta))
     {
         meta = MetaEntry.Combine(existingMeta, meta, contentSeparator);
     }
     _metas[meta.Name] = meta;
 }