現在、次のようなイベント クラスを作成しています。
public class SharePointOnErrorEventsArgs : EventArgs
{
public SharePointOnErrorEventsArgs(string message, bool showException, Exception exception)
{
Message = message;
Exception = exception;
ShowException = showException;
}
/// <summary>
/// Property to allow the storage of a more verbose and explainable error message
/// </summary>
public string Message { get; private set; }
/// <summary>
/// Object to store full exception information within
/// </summary>
public Exception Exception { get; private set; }
/// <summary>
/// Boolean value allows for verbose messages to be sent up the stack without
/// the need for displaying a full exception object, or stack trace.
/// </summary>
public bool ShowException { get; private set; }
}
true
ここで、 orfalse
を送信する代わりに、3 つの値のshowException
うちの 1 つを送信したいと思いますor - どうすればこのようなことに取り組むことができますか? 文字列を常にこれらの 3 つの値のいずれかに制限したいので、実際には文字列を使用したくありませんが、プロパティを使用するときにこれにアプローチする方法がわかりません。Debug
Info
Error