示例#1
0
        public void RemoveAttribs(BlockAttribs attribs)
        {
            if (!_blockList.ContainsKey(attribs))
            {
                throw new InvalidOperationException("Attribs don't exist");
            }

            _blockList.Remove(attribs);
        }
示例#2
0
        public void RemoveBlock(BlockAttribs attribs, RABlock block)
        {
            if (!_blockList.ContainsKey(attribs))
            {
                throw new InvalidOperationException("Attribs don't exist");
            }

            if (!_blockList[attribs].Contains(block))
            {
                throw new InvalidOperationException("Block doesn't exist");
            }

            _blockList[attribs].Remove(block);
        }
示例#3
0
 public void Add(BlockAttribs attribs, RABlock block)
 {
     if (!_blockList.ContainsKey(attribs))
     {
         _blockList.Add(attribs, new List <RABlock>()
         {
             block
         });
     }
     else
     {
         _blockList[attribs].Add(block);
     }
 }
示例#4
0
 public BlockAttribs SetPrevAttribs(BlockAttribs attribs)
 {
     _prevAttribs = attribs;
     return(attribs);
 }