Import events from Facebook: Implement the IPushPipe interface for the inbound pipe
To implement the IPushPipe interface, you must implement the PushData method.
To implement the PushData method, add the following method in file FacebookEventsInboundPipe.cs:
public virtual void PushData( IList<PublishingSystemEventInfo> items )
{
var wrapperObjects = items.Select( i =>
{
var item = i.Item;
return ( item is WrapperObject ) ? ( WrapperObject )item : new WrapperObject( item )
{
MappingSettings = this.PipeSettings.Mappings,
Language = i.Language
};
} ).ToList();
this.publishingPoint.RemoveItems( wrapperObjects );
this.publishingPoint.AddItems( wrapperObjects );
}
First, you wrap all objects. Then, you push the data to the publishing point.