Esempio n. 1
0
 private IScalar LoadFromCache(string document, IServerProcess process)
 {
     byte[] data;
     using (Stream stream = Cache.Reference(document))
     {
         int length = StreamUtility.ReadInteger(stream);
         data = new byte[length];
         stream.Read(data, 0, length);
     }
     using (DAE.Runtime.Data.IRow row = ((DAE.Runtime.Data.IRow)DataValue.FromPhysical(process.GetServerProcess().ValueManager, GetCacheRowType(process), data, 0)))             // Uses GetServerProcess() as an optimization because this row is to remain local
     {
         return((IScalar)row.GetValue("Value").Copy());
     }
 }