public void addBlock(ContentBlock block) { if (_blocks.ContainsKey(block.Name)) { throw new TemplateException("请勿重复绑定(getBlock)区块。区块名=" + block.Name + ",模板文件=" + block.getTemplatePath()); } _blocks.Add(block.Name, block); }
public void addBlock( ContentBlock block ) { if (_blocks.ContainsKey( block.Name )) throw new TemplateException( "请勿重复绑定(getBlock)区块。区块名=" + block.Name + ",模板文件=" + block.getTemplatePath() ); _blocks.Add( block.Name, block ); }