Esempio n. 1
0
 protected override void SaveSerializableBytes(string typeName, string id, string propName, object value)
 {
     using (var stream = new MemoryStream()) {
         var formatter = new BinaryFormatter();
         formatter.Serialize(stream, value);
         if (_memoAccessor.IsSerializablePropertyExists(typeName, id, propName))
         {
             _memoAccessor.UpdateSerializableProperty(typeName, id, propName, stream.GetBuffer());
         }
         else
         {
             _memoAccessor.InsertSerializableProperty(typeName, id, propName, stream.GetBuffer());
         }
     }
 }