protected virtual object ReadSerializableTypeByHash(Type type, string hash) { IpcMessage msg = IpcMessage.Get(hash, type, RootDirectory); SubscribeToIpcMessageEvents(msg); return(msg.Read <object>()); }
private static object ReadPropertyVersion(PropertyInfo prop, string hash, DirectoryInfo propRoot, int version) { string readFromRootDir = Path.Combine(propRoot.FullName, hash); IpcMessage msg = IpcMessage.Get(version.ToString(), prop.PropertyType, readFromRootDir); return(msg.Read <object>()); }
private void WriteProperty(Type type, PropertyInfo prop, object propValue, string hash) { DirectoryInfo propRoot = GetPropertyDirectory(type, prop); int version = GetNextVersionNumber(propRoot, prop, hash); string writeToRootDir = Path.Combine(propRoot.FullName, hash); IpcMessage msg = IpcMessage.Get(version.ToString(), prop.PropertyType, writeToRootDir); msg.Write(propValue); }
public void ReadMessages() { IpcMessage msg = IpcMessage.Get <TestMessage>(messageName); Timer timer = new Timer((o) => { OutLineFormat("Reading:\r\n {0}", ConsoleColor.Blue, msg.Read <TestMessage>().PropertiesToString()); }, null, 0, 900); Pause(); }