如何找到listexceptionhandler的引用? [英] How do I find the reference of listexceptionhandler ?

查看:63
本文介绍了如何找到listexceptionhandler的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用特定的异常处理程序



public override void ItemAdding(SPItemEventProperties properties)

{

尝试

{

incidentManagementRepository.WriteToHistory(

string.Format(CultureInfo.CurrentCulture,TaskCreatedMessage,

properties.AfterProperties [TitleField]));

}

catch(Exception ex)

{

ListExceptionHandler handler = new ListExceptionHandler();

handler.HandleListItemEventException(例如,属性,

Resources.HandleListItemEventExceptionValue);

}

}



但它会引发错误

无法找到类型或命名空间名称'ListExceptionHandler'(你是否错过使用指令或汇编参考?)

并且有n o参考将其添加到我的代码中。



我尝试过的事情:



https://msdn.microsoft.com/en-us/library/ff647598.aspx

I tried to use a specific Exception handler

public override void ItemAdding(SPItemEventProperties properties)
{
try
{
incidentManagementRepository.WriteToHistory(
string.Format(CultureInfo.CurrentCulture, TaskCreatedMessage,
properties.AfterProperties[TitleField]));
}
catch (Exception ex)
{
ListExceptionHandler handler = new ListExceptionHandler();
handler.HandleListItemEventException(ex, properties,
Resources.HandleListItemEventExceptionValue);
}
}

but it raise the error
The type or namespace name 'ListExceptionHandler' could not be found (are you missing a using directive or an assembly reference?)
and there is no reference to add it to my code.

What I have tried:

https://msdn.microsoft.com/en-us/library/ff647598.aspx

推荐答案

ListExceptionHandler在.NET Framework中的任何位置都不存在或者SharePoint。



尝试阅读您链接的文章:

ListExceptionHandler doesn't exist anywhere in the .NET Framework or SharePoint.

Try reading the article you linked to:
Quote:

ListExceptionHandler 是在Partner Portal应用程序的Contoso.Common项目中声明的辅助类

ListExceptionHandler is a helper class declared in the Partner Portal application's Contoso.Common project.


这篇关于如何找到listexceptionhandler的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆