/// <summary> /// Save permentently the storage. /// </summary> public void Save() { IIOService ioService = ServiceFinder.Resolve <IIOService> (); ILogService logger = ServiceFinder.Resolve <ILogService> (); Monitor.Enter(this); try { ioService.WriteFile(this.PersistPath, FHSyncUtils.SerializeObject(memoryStore)); } catch (Exception ex) { logger.e("FHSyncClient.InMemoryDataStore", "Failed to save file " + this.PersistPath, ex); throw; } finally { Monitor.Exit(this); } }
public override string ToString() { return(FHSyncUtils.SerializeObject(this)); }