Implementing the IPipe interface

To implement the IPipe interface, perform the following procedure:

  1. Open the FacebookEventsOutboundPipe.cs file.

  2. Add the following properties:

    public virtual PipeSettings PipeSettings
    {
        get
        {
            return this.pipeSettings;
        }
        set
        {
            this.pipeSettings = value;
        }
    }
     
    public string Name
    {
        get
        {
            return FacebookEventsOutboundPipe.PipeName;
        }
    }
     
    public Telerik.Sitefinity.Publishing.Model.IDefinitionField[] Definition
    {
        get
        {
            if ( this.definition == null )
            {
                this.definition = PublishingSystemFactory.GetPipeDefinitions( this.Name );
            }
            return this.definition;
        }
    }
     
    public Type PipeSettingsType
    {
        get
        {
            return typeof( PipeSettings );
        }
    }

  3. Add the following methods:

    public IEnumerable<WrapperObject> GetConvertedItemsForMapping( params object[] items )
    {
        foreach ( var item in items )
        {
            yield return new WrapperObject( this.PipeSettings, ( ( PublishingSystemEventInfo )item ).Item, ( ( PublishingSystemEventInfo )item ).Language );
        }
    }
     
    public void Initialize( Telerik.Sitefinity.Publishing.Model.PipeSettings pipeSettings )
    {
        this.pipeSettings = pipeSettings;
    }
     
    public bool CanProcessItem( object item )
    {
        return true;
    }
     
    public Telerik.Sitefinity.Publishing.Model.PipeSettings GetDefaultSettings()
    {
        return PublishingSystemFactory.CreatePipeSettings( this.Name, PublishingManager.GetManager() );
    }
     
    public string GetPipeSettingsShortDescription( Telerik.Sitefinity.Publishing.Model.PipeSettings initSettings )
    {
        return "Sitefinity Facebook events outbound pipe.";
    }
     
    public void CleanUp( string transactionName )
    {
    }

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK