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

            _blockList.Remove(attribs);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 4
0
 public BlockAttribs SetPrevAttribs(BlockAttribs attribs)
 {
     _prevAttribs = attribs;
     return(attribs);
 }