確保專案處於編輯模式

檢查傳遞的 Item 是否處於編輯模式。如果沒有,它會丟擲一個 EditingNotAllowedException。

Assert.IsEditing(Sitecore.Context.Item);