コード例 #1
0
        public override int AddressForId(int id)
        {
            IdSlotTree node = (IdSlotTree)_idsToSlots.Find(id);

            if (node == null)
            {
                throw new InvalidOperationException();
            }
            return(node.Slot().Address());
        }
コード例 #2
0
        public override void MapId(int id, Slot slot)
        {
            IdSlotTree idSlotMapping = new IdSlotTree(id, slot);

            _idsToSlots = ((IdSlotTree)Tree.Add(_idsToSlots, idSlotMapping));
        }