Click or drag to resize
DataItemProvider Class
Represents a provider of data items. This is the base class that all data item providers must inherit from.
Inheritance Hierarchy
SystemObject
  ConfigurableAddIn
    Dynamicweb.DeploymentDataItemProvider

Namespace: Dynamicweb.Deployment
Assembly: Dynamicweb.Deployment (in Dynamicweb.Deployment.dll) Version: 1.0.7
Syntax
public abstract class DataItemProvider : ConfigurableAddIn

The DataItemProvider type exposes the following members.

Constructors
  NameDescription
Protected methodDataItemProvider
Initializes a new instance of the DataItemProvider class
Top
Properties
  NameDescription
Public propertyDataItemType
Gets the type of the data item.
Top
Methods
  NameDescription
Public methodStatic memberCreateInstance
Creates an instance of a data item provider for a specific data item type.
Public methodCreateReader
Creates the data item reader.
Public methodCreateWriter
Creates the data item writer.
Public methodStatic memberGetDataProviderTypes
Gets the data provider types.
Public methodGetIdSuitableString (Inherited from ConfigurableAddIn.)
Public methodGetParametersToDictionary
Gets the parameters as a dictionary.
Public methodGetParametersToXml (Inherited from ConfigurableAddIn.)
Public methodGetParametersToXml(Boolean) (Inherited from ConfigurableAddIn.)
Public methodLoadParametersFromDictionary
Loads the parameters from dictionary.
Public methodLoadParametersFromXml (Inherited from ConfigurableAddIn.)
Public methodRenderAdditionalContent (Inherited from ConfigurableAddIn.)
Public methodSetValue (Inherited from ConfigurableAddIn.)
Public methodUpdateFromPost (Inherited from ConfigurableAddIn.)
Top
Examples
Implementing a data item provider
using Dynamicweb.Extensibility.AddIns;

namespace Dynamicweb.Deployment.Examples
{
    /// <summary>
    /// This is an example of how to implement a custom data item provider. 
    /// Data item providers inherit from <see cref="ConfigurableAddIn"/> which means that you can add additional parameters for use when reading or writing data items.
    /// </summary>
    public class CustomDataItemProvider : DataItemProvider
    {
        /// <summary>
        /// Gets or sets my property.
        /// </summary>
        [AddInParameter("MyProperty")]
        public string MyProperty { get; set; }

        public override DataItemReader CreateReader()
        {
            return new CustomDataItemReader(this);
        }

        public override DataItemWriter CreateWriter()
        {
            return new CustomDataItemWriter(this);
        }
    }
}
See Also

Reference

ConfigurableAddIn