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);
 }
示例#7
0
 internal virtual void AfterSave(DataRootElement data)
 {
 }
示例#8
0
 internal virtual void BeforeSave(DataRootElement data)
 {
 }
示例#9
0
 internal virtual void AfterLoad(DataRootElement data)
 {
 }
示例#10
0
 internal virtual void BeforeLoad(DataRootElement data)
 {
 }
示例#11
0
 internal virtual void SaveData(DataRootElement data)
 {
 }