Beispiel #1
0
 public unsafe static SSSPCell LoadSSSPCell(this Trinity.Storage.LocalMemoryStorage storage, long CellID)
 {
     using (var cell = new SSSPCell_Accessor(CellID, ActionOnCellNotFound.ThrowException))
     {
         SSSPCell ret = cell;
         ret.CellID = CellID;
         return(ret);
     }
 }
Beispiel #2
0
 public unsafe static SSSPCell LoadSSSPCell(this Trinity.Storage.MemoryCloud storage, long CellID)
 {
     byte[] content = Global.CloudStorage.LoadCell(CellID);
     fixed(byte *ptr = content)
     {
         using (var cell = new SSSPCell_Accessor(ptr))
         {
             SSSPCell ret = cell;
             ret.CellID = CellID;
             return(ret);
         }
     }
 }
Beispiel #3
0
 public unsafe static bool SaveSSSPCell(this Trinity.Storage.LocalMemoryStorage storage, SSSPCell CellContent)
 {
     return(SaveSSSPCell(storage, CellContent.CellID, CellContent.distance, CellContent.parent, CellContent.neighbors));
 }