Exemple #1
0
            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);
            }
Exemple #2
0
            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);
            }