internal override void AfterSave(DataRootElement data)
 {
     // Reload Images from FS
     foreach (var auction in data.Auctions)
     {
         auction.Image = this.LoadBinary(string.Format(CultureInfo.InvariantCulture, "auction-{0}-image1.jpg", auction.Id));
     }
 }
        internal override void BeforeSave(DataRootElement data)
        {
            // Ensure existence of directory
            Directory.CreateDirectory(this.binaryDataDirectory);

            // Remove byte values from images and save individually
            foreach (var auction in data.Auctions)
            {
                this.SaveBinary(string.Format(CultureInfo.InvariantCulture, "auction-{0}-image1.jpg", auction.Id), auction.Image);
                auction.Image = null;
            }
        }
 internal override void SaveData(DataRootElement data)
 {
     var content = JsonConvert.SerializeObject(data, this.jsonSerializerSettings);
     File.WriteAllText(this.fullPath, content);
 }
 internal override void BeforeLoad(DataRootElement data)
 {
     // Ensure existence of directory
     Directory.CreateDirectory(this.binaryDataDirectory);
 }
        internal override void SaveData(DataRootElement data)
        {
            var content = JsonConvert.SerializeObject(data, this.jsonSerializerSettings);

            File.WriteAllText(this.fullPath, content);
        }
 internal override void BeforeLoad(DataRootElement data)
 {
     // Ensure existence of directory
     Directory.CreateDirectory(this.binaryDataDirectory);
 }
Esempio n. 7
0
 internal virtual void AfterSave(DataRootElement data)
 {
 }
Esempio n. 8
0
 internal virtual void BeforeSave(DataRootElement data)
 {
 }
Esempio n. 9
0
 internal virtual void AfterLoad(DataRootElement data)
 {
 }
Esempio n. 10
0
 internal virtual void BeforeLoad(DataRootElement data)
 {
 }
Esempio n. 11
0
 internal virtual void SaveData(DataRootElement data)
 {
 }