예제 #1
0
        public ContentData ToCleaned()
        {
            var target = new ContentData();

            foreach (var fieldValue in ValidValues)
            {
                if (fieldValue.Value != null)
                {
                    var resultValue = new ContentFieldData();

                    foreach (var(key, value) in fieldValue.Value.Where(x => x.Value.Type != JsonValueType.Null))
                    {
                        resultValue[key] = value;
                    }

                    if (resultValue.Count > 0)
                    {
                        target[fieldValue.Key] = resultValue;
                    }
                }
            }

            return(target);
        }
예제 #2
0
 public ContentData MergeInto(ContentData target)
 {
     return(Merge(target, this));
 }
예제 #3
0
 public bool Equals(ContentData <T>?other)
 {
     return(other != null && (ReferenceEquals(this, other) || this.EqualsDictionary(other)));
 }
예제 #4
0
 public ContentData(ContentData source)
     : base(source, StringComparer.Ordinal)
 {
 }
예제 #5
0
 protected ContentData(ContentData <T> source, IEqualityComparer <T> comparer)
     : base(source, comparer)
 {
 }