public VanillaDataStorageReceiver(VanillaDataStorage dataStorage,
			string name, IEndianAwareReader reader,
			ISerializer serializer, RequestResponseMapper mapper)
        {
            Validate.Require(dataStorage != null, "You must supply a valid dataStorage");
            Validate.Require(name.Length > 0, "You must supply a valid name");
            Validate.Require(reader != null, "A reader object is required");
            Validate.Require(serializer != null, "A serializer object is required");
            Validate.Require(mapper != null, "A mapper object is required");

            this.dataStorage = dataStorage;
            this.Name = name;
            this.reader = reader;
            this.serializer = serializer;
            this.mapper = mapper;
        }
        internal VanillaDataStorageSender(VanillaDataStorage dataStorage,
			string name, IEndianAwareWriter writer,
			Option<ISnapshotManager> snapshotManager,
			ISerializer serializer, RequestResponseMapper mapper)
        {
            Validate.Require(dataStorage != null, "You must supply a valid dataStorage");
            Validate.Require(name.Length > 0, "You must supply a valid name");
            Validate.Require(writer != null, "A writer is required");
            Validate.Require(serializer != null, "A serializer object is required");
            Validate.Require(mapper != null, "A mapper object is required");

            this.dataStorage = dataStorage;
            this.Name = name;
            this.writer = writer;
            this.snapshotManager = snapshotManager;
            this.serializer = serializer;
            this.mapper = mapper;
        }
 public IDataStorage Create(AdapterConfiguration config, string name, Option<ISnapshotManager> snapshotManager)
 {
     var storage = new VanillaDataStorage(config, name, snapshotManager);
     storage.Connect();
     return storage;
 }