コード例 #1
0
        private ContentItemFields GetContentItemFields(ContentItemData entry, ContentType contentType)
        {
            var fields = new ContentItemFields();

            contentType.Fields
            .ToList()
            .ForEach(x => fields.Add(x.Id, AdaptField(entry, x)));
            return(fields);
        }
コード例 #2
0
 private dynamic GetFieldValue(ContentItemData currentItem, ContentItemFields entry, Field field)
 {
     return(_fieldAdapters.ResolveAdapter(field.Type).WriteField(currentItem.GetField(field.Id), field, entry.GetField(field.Id)));
 }
コード例 #3
0
 public ContentItemData TransformContentItemData(ContentItemData originalItem, ContentItemFields newValues, ContentType contentType)
 {
     contentType.Fields
     .ToList()
     .ForEach(x => SetField(originalItem, x.Id, GetFieldValue(originalItem, newValues, x)));
     return(originalItem);
 }