Event to handle the export of properties.
Namespace:
EPiServer.Enterprise
Examples
To add an export transformation for for a property you have to add a event handler for it:
CopyC#
CopyC#
ExportPropertyEvent += new EventHandler<TransformPropertyEventArgs>(MyProperty.ExportEventHandler);public static void ExportEventHandler(object sender, TransformPropertyEventArgs e) { IPageTransferContext transferContext = sender as IPageTransferContext; if (transferContext == null // The transfer context should not be null || e == null // The event args shuld exists || e.IsHandled // and not be handled by another handler || e.PropertySource == null // and the property type should be the correct type. || e.PropertySource.TypeName == null || e.PropertySource.TypeName.CompareTo("Development.MyProperty") != 0) { return; } //TODO: Write export transformation code for MyProperty e.IsHandled = true; // Signal that its handled to all other Export event handlers. }
Assembly: EPiServer.Enterprise (in EPiServer.Enterprise.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
public static event EventHandler<TransformPropertyEventArgs> ExportPropertyEvent |