public SyncBlockComFlags GetComFlags(ulong obj) { int index = ComOnlySyncBlocks.Search(obj, (x, y) => x.Object.CompareTo(y)); if (index != -1) { return(ComOnlySyncBlocks[index].ComFlags); } index = FullSyncBlocks.Search(obj, (x, y) => x.Object.CompareTo(y)); if (index != -1) { return(FullSyncBlocks[index].ComFlags); } return(SyncBlockComFlags.None); }
public SyncBlock?GetSyncBlock(ulong obj) { if (EmptySyncBlocks.Contains(obj)) { return(new SyncBlock(obj)); } int index = ComOnlySyncBlocks.Search(obj, (x, y) => x.Object.CompareTo(y)); if (index != -1) { return(ComOnlySyncBlocks[index]); } index = FullSyncBlocks.Search(obj, (x, y) => x.Object.CompareTo(y)); if (index != -1) { return(FullSyncBlocks[index]); } return(null); }