コード例 #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;
            }
        }
コード例 #4
0
 public ContentItem Deserialize(string xml)
 {
     return(ContentVersion.Deserialize(importer, parser, xml));
 }