Sitecore 8.2显示错误尝试访问方法'Sitecore.Context + PageMode.get_IsPageEditor()'失败

Nam*_*Roy 1 sitecore sitecore8.1 sitecore8.2

我已从Sitecore 8.1升级到Sitecore 8.2.我有一个方法,我正在使用:

Sitecore.Context.PageMode.IsPageEditor 
Run Code Online (Sandbox Code Playgroud)

为此,它给出了错误:

attempt by method METHOD_NAME to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed.
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

Jan*_*ink 6

Sitecore.Context.PageMode.IsPageEditor

自Sitecore 8.0 Update-6以来,Sitecore.Kernel中已弃用,请参阅发行说明:

已弃用和已删除的功能

来自Sitecore命名空间的类Context.PageMode中的属性IsPageEditor,IsPageEditorDesigning和IsPageEditorEditing已被弃用,以支持新引入的属性IsExperienceEditor和IsExperienceEditorEditing.旧属性将在未来的主要版本之一中删除.(438475)

在Sitecore 8.2 update 1中,Sitecore.Context.PageMode.IsPageEditor被删除使用

Sitecore.Context.PageMode.IsExperienceEditor

同样的:

IsPageEditor, Obsolete Use IsExperienceEditor instead
IsPageEditorClassic, Deprecated always false
IsPageEditorDesigning, Obsolete Use IsExperienceEditorEditing instead
IsPageEditorEditing, Obsolete Use IsExperienceEditorEditing instead 
IsPageEditorNavigating, Deprecated always false
Run Code Online (Sandbox Code Playgroud)