Example #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;
 }
Example #2
0
 public void SetMeta(MetaEntry meta)
 {
     if (meta == null || String.IsNullOrEmpty(meta.Name))
     {
         return;
     }
     _metas[meta.Name] = meta;
 }
Example #3
0
 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;
 }