<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><language>en</language><title>Blog posts by Yauheni Butsko</title> <link>https://world.optimizely.com/blogs/yauheni-butsko/</link><description></description><ttl>60</ttl><generator>Optimizely World</generator><item> <title>How to export/import DDS items</title>            <link>https://world.optimizely.com/blogs/yauheni-butsko/dates/2017/1/how-to-exportimport-dds/</link>            <description>&lt;p&gt;Episerver has functionality for export/import DDS items and use it for export/import property settings.&lt;/p&gt;
&lt;p&gt;This code shows how to export custom DDS types. You don&#39;t need to do anything for import.&lt;/p&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;using System;
using System.Linq;
using EPiServer.Core.Transfer;
using EPiServer.Data;
using EPiServer.Data.Dynamic;
using EPiServer.Enterprise;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;

namespace DDSExport
{
    [InitializableModule]
    [ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
    public class DDSExportInitialization : IInitializableModule
    {
        private readonly Type[] _typesToExport =
        {
            typeof(StoreType1), typeof(StoreType2)
        };

        public void Initialize(InitializationEngine context)
        {
            context.Locate.Advanced.GetInstance&amp;lt;IDataExportEvents&amp;gt;().ContentExporting += OnExporting;
        }

        public void Uninitialize(InitializationEngine context)
        {
            context.Locate.Advanced.GetInstance&amp;lt;IDataExportEvents&amp;gt;().ContentExporting -= OnExporting;
        }

        private void OnExporting(object sender, EventArgs e)
        {
            var exporter = (DataExporter) sender;
            if (exporter.TransferType == TypeOfTransfer.Exporting)
            {
                var ddsHandler = exporter.TransferHandlers.OfType&amp;lt;DynamicDataTransferHandler&amp;gt;().Single();

                foreach (var type in _typesToExport)
                {
                    var store = type.GetStore();
                    if (store == null)
                        continue;

                    foreach (var item in store.Items())
                        ddsHandler.AddToExport(item.GetIdentity().ExternalId, store.Name);
                }
            }
        }
    }
}&lt;/code&gt;&lt;/pre&gt;</description>            <guid>https://world.optimizely.com/blogs/yauheni-butsko/dates/2017/1/how-to-exportimport-dds/</guid>            <pubDate>Fri, 06 Jan 2017 12:19:23 GMT</pubDate>           <category>Blog post</category></item></channel>
</rss>