Provider class
Version Info: This topic applies to Episerver.ConnectForMarketingAutomation 4.0.0 and lower. For later versions, see Sample Connector - IMarketingConnector.
This class is the main interface that the Marketing Automation Interface (MAI) plugin uses to load the connector. During the intitialize process of MAI the Service locator is used to load the connector.
Note: Only one connector can exist in the solution or be installed with the MAI framework.
- Inheritance hierarchy.
System.Object EPiServer.MarketingAutomationIntegration.Core.ProviderBase DemoConnector.Services.Provider
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public class Provider : ProviderBase
Constructor
Initializes a new instance of the Provider class.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public Provider()
Properties
Provider.Name property
The name of the connector.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public override string Name { get; }
- Property value. Type: String
- Implements. IProvider.Name
Provider.Settings property
The settings for the connector.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public override IProviderSettings Settings { get; }
- Property value. Type: IProviderSettings
- Implements. IProvider.Settings
- Remarks. Use an IDynamicData implementation to store configuration data required for the connector. This connector has no configuration data.
Methods
Provider.GetDashboardUrl method
You can attach an external URL, the URL of the configuration page, or another URL of a page of your choosing to the main connector button at the top of the configuration screen.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public override string GetDashboardUrl()
- Return value. Type: String
A URL. - Implements. IProvider.GetDashboardUrl()
- Remarks. This code demonstates how to re-direct the UI to the location of the configuration page for the connector.
Provider.Init method
This method is called by the MAI framework at startup, which you can use to add services to the default EPiServer IoC container.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public override void Init( ServiceConfigurationContext serviceConfigurationContext )
- Parameters.
- serviceConfigurationContext. Type: EPiServer.ServiceLocation.ServiceConfigurationContext
The service context
- serviceConfigurationContext. Type: EPiServer.ServiceLocation.ServiceConfigurationContext
- Implements. IProvider.Init(ServiceConfigurationContext)
Provider.IsReady method
Called periodically by the MAI framework to verify that the connector is ready to use.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public override bool IsReady()
- Return value. Type: Boolean
Result stating whether the framework is ready for use. - Implements. IProvider.IsReady()
Provider.ProcessXFormData method (Object, XFormDataEventArgs)
This function receives the connector data that is collected from the user. Read it in as XML and process it. This loops over the XML tags and parses out data for each one for processing. This code is executed when you click Submit on a form.
(Inherited from ProviderBase.)
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public virtual void ProcessXFormData( Object sender, XFormDataEventArgs e )
- Parameters.
- sender. Type: System. Object
Object - e. Type: XFormDataEventArgs
Form data is passed in through this. You can retrieve the data as innerHtml or Xml. You also can loop through the nodes to get the user data.
- sender. Type: System. Object
Last updated: Dec 10, 2015