Пример #1
0
        public virtual ContentItem DeserializeVersion(ContentVersion version)
        {
            var item = ContentVersion.Deserialize(importer, parser, version.VersionDataXml);

            if (version.FuturePublish.HasValue)
            {
                item["FuturePublishDate"] = version.FuturePublish;
            }
            item.Updated = version.Saved;
            return(item);
        }
Пример #2
0
        public ContentItem Deserialize(string xml)
        {
            var previousIgnoreMissingTypes = importer.Reader.IgnoreMissingTypes;

            try
            {
                importer.Reader.IgnoreMissingTypes = true;
                return(ContentVersion.Deserialize(importer, parser, xml));
            }
            finally
            {
                importer.Reader.IgnoreMissingTypes = previousIgnoreMissingTypes;
            }
        }
Пример #3
0
        public virtual ContentItem DeserializeVersion(ContentVersion version)
        {
            var initialIgnoreMissingTypes = importer.Reader.IgnoreMissingTypes;

            importer.Reader.IgnoreMissingTypes = true;
            try
            {
                var item = ContentVersion.Deserialize(importer, parser, version.VersionDataXml);
                if (version.FuturePublish.HasValue)
                {
                    item["FuturePublishDate"] = version.FuturePublish;
                }
                item.Updated = version.Saved;
                return(item);
            }
            finally
            {
                importer.Reader.IgnoreMissingTypes = initialIgnoreMissingTypes;
            }
        }
 public ContentItem Deserialize(string xml)
 {
     return(ContentVersion.Deserialize(importer, parser, xml));
 }