public void RemoveAttribs(BlockAttribs attribs) { if (!_blockList.ContainsKey(attribs)) throw new InvalidOperationException("Attribs don't exist"); _blockList.Remove(attribs); }
public void Add(BlockAttribs attribs, RABlock block) { if (!_blockList.ContainsKey(attribs)) _blockList.Add(attribs, new List<RABlock>() { block }); else _blockList[attribs].Add(block); }
public void RemoveAttribs(BlockAttribs attribs) { if (!_blockList.ContainsKey(attribs)) { throw new InvalidOperationException("Attribs don't exist"); } _blockList.Remove(attribs); }
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); }
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); }
public void Add(BlockAttribs attribs, RABlock block) { if (!_blockList.ContainsKey(attribs)) { _blockList.Add(attribs, new List <RABlock>() { block }); } else { _blockList[attribs].Add(block); } }
public BlockAttribs SetPrevAttribs(BlockAttribs attribs) { _prevAttribs = attribs; return attribs; }
public BlockAttribs SetPrevAttribs(BlockAttribs attribs) { _prevAttribs = attribs; return(attribs); }
/// <summary> /// Dequeues the current block attribute set and returns it, queuing a new attribute set. /// </summary> /// <returns></returns> public BlockAttribs NextAttribs(RABlock block) { BlockAttribs attribs = _newAttribs; _blockManager.Add(attribs, block); _blockManager.SetPrevAttribs(attribs); switch (attribs.Persistence) { case AttribPersistence.Off: _newAttribs = new BlockAttribs(); break; case AttribPersistence.On: _newAttribs = new BlockAttribs(); break; case AttribPersistence.Once: _newAttribs = _blockManager.GetPrevious(1); break; } return attribs; }