sitecore 确保项目处于编辑模式

示例

检查所传递的内容Item是否处于“编辑”模式。如果不是,则抛出EditingNotAllowedException。

Assert.IsEditing(Sitecore.Context.Item);