private long RouteToChildCell(string fieldName) { //string np = CellGroupUtil.Normalize(fieldName); ushort ct = CellGroupUtil.GetTypeCode(fieldName); return(CellGroupUtil.GetCellID(CellId, ct)); }
private IEnumerable <long> ChildrenIDs() { using (var cell = Global.LocalStorage.Usetype_object(CellId)) { foreach (var type in cell.types) { yield return(CellGroupUtil.GetCellID(CellId, type)); } } }
public bool isOfType(string cell_type_name) { ushort cell_type = (ushort)StorageSchema.GetCellType(cell_type_name); long cid = CellGroupUtil.GetCellID(cell_id, cell_type); var generic_child = Global.LocalStorage.UseGenericCell(cid, CellAccessOptions.ReturnNullOnCellNotFound); if (generic_child == null) { return(false); } generic_child.Dispose(); return(true); }
public T Cast <T>() where T : ICellAccessor { ushort cell_type; string cell_type_name = typeof(T).Name; cell_type_name = cell_type_name.Substring(0, cell_type_name.Length - 9); cell_type = (ushort)StorageSchema.GetCellType(cell_type_name); long cid = CellGroupUtil.GetCellID(cell_id, cell_type); var generic_child = Global.LocalStorage.UseGenericCell(cid, CellAccessOptions.ReturnNullOnCellNotFound); if (generic_child == null) { return(default(T)); } return((T)generic_child); }