Table of Contents

Class DataItemProvider

Namespace
Dynamicweb.Deployment
Assembly
Dynamicweb.Deployment.dll
Represents a provider of data items. This is the base class that all data item providers must inherit from.
public abstract class DataItemProvider : ConfigurableAddIn
Inheritance
DataItemProvider
Inherited Members

Examples

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);
        }
    }
}

Properties

DataItemType

Gets the type of the data item.
public DataItemType DataItemType { get; }

Property Value

DataItemType
The type of the data item.
See Also

Methods

CreateInstance(DataItemType)

Creates an instance of a data item provider for a specific data item type.
public static DataItemProvider CreateInstance(DataItemType itemType)

Parameters

itemType DataItemType
The data item type.

Returns

DataItemProvider
See Also

CreateReader()

Creates the data item reader.
public abstract DataItemReader CreateReader()

Returns

DataItemReader
An instance of DataItemReader.
See Also

CreateWriter()

Creates the data item writer.
public abstract DataItemWriter CreateWriter()

Returns

DataItemWriter
An instance of DataItemWriter.
See Also

GetDataProviderTypes()

Gets the data provider types.
public static IEnumerable<Type> GetDataProviderTypes()

Returns

IEnumerable<Type>
See Also

GetParametersToDictionary()

Gets the parameters as a dictionary.
public IDictionary<string, string> GetParametersToDictionary()

Returns

IDictionary<string, string>
A dictionary of parameter keys and values
See Also

LoadParametersFromDictionary(IDictionary<string, string>)

Loads the parameters from dictionary.
public void LoadParametersFromDictionary(IDictionary<string, string> parameters)

Parameters

parameters IDictionary<string, string>
The parameters.
See Also

See Also

To top