Try our conversational search powered by Generative AI!

TransferModule, DDS and Episerver 10


I'm working on upgrading one of our modules (Geta.Tags) to support Episerver 10. I'm however a little stuck with this class: Since DataExporter is obsolete we need to use IDataExportEvents instead, but I wasn't able to figure out how line 39 would look:

var ddsHandler = (sender as DataExporter).TransferHandlers.Single(p => p.GetType() == typeof(DynamicDataTransferHandler)) as DynamicDataTransferHandler;

Thanks for any pointers!


Nov 11, 2016 21:58

I believe that you should be able to cast the sender object to a ITransferHandlerContext instead and access the TransferHandlers from there in the same way that you are currently doing it.

Let us know how you get on!


Disclaimer: This suggestion was cooked up without actually trying anything out and it therefore possible that it might fail miserably.

Nov 13, 2016 10:21

mm .. good point I'm stuck with similar issue. I got to the point to hook up to "IDataExportEvents.Starting" event of using:

    public class DataExporterContextEventArgs : EventArgs
        public DataExporterContextEventArgs(IDataExporter dataExporter, ITransferHandlerContext context);

        public IDataExporter DataExporter { get; }
        public ITransferHandlerContext TransferHandlerContext { get; }

I used "DataExporter" as before. Works for me but haven't try with Tags!


Nov 14, 2016 1:37

As Henrik is suggesting you should be able to get the DDS trnafer handler from context. Something like:

var ddsHandler = transferHandlerContext.TransferHandlers.OfType<IDynamicDataTransfer>().FirstOrDefault();
Nov 15, 2016 17:20
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.