Class for handling simple plugin settings as a DataSet

Namespace:  EPiServer.PlugIn
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
public class PlugInSettings

Remarks

Use this class if you wish to store simple relational data and web.config or database is not an option.

Examples

The TestSettings method below demonstrates how a plug-in could load and save some internal settings.
CopyC#
public void TestSettings()
{
    DataSet ds = Load();

    DataRow row = ds.Tables[0].NewRow();
    row["String"] = "The value";
    ds.Tables[0].Rows.Add(row);

    Save(ds);
}

private void Save(DataSet ds)
{
    PlugInSettings.Save(GetType(), ds);
}

private DataSet Load()
{
    DataSet ds = new DataSet();
    ds.Tables.Add(new DataTable());
    ds.Tables[0].Columns.Add(new DataColumn("String", typeof(string)));

    PlugInSettings.Populate(GetType(), ds);

    return ds;
}

Inheritance Hierarchy

System..::.Object
  EPiServer.PlugIn..::.PlugInSettings

See Also