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)
 {
 }