DataStore Class

Members  Example 

This is an abstract class that cannot be instaniated directly. Instead it should be inherited when creating data store providers, such as StandardDataStore that is included in the core.


Public MustInherit Class DataStore 
public abstract class DataStore 


The main two methods that should be overridden are Get(string objectName) and Store(string objectName, object instance) as well as the three different constructors.
namespace SampleProject {
    using System;
    using Core;
    using Serialization;

    public class MySampleDataStore : DataStore {
        public MySampleDataStore(CmsPage page)
            : base(page) {

        public MySampleDataStore(Guid id)
            : base(id) {

        public MySampleDataStore(string id)
            : base(id) {

        public override T Get<T>(string objectName) {
            // Add code here to return the deserialized object requested

        public override void Store(string objectName, object instance) {
            // Add code here to store away the object using the given objectName

Inheritance Hierarchy



Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

This documentation was created using Document! X from Innovasys