⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callmethodexception.cs

📁 C# 版本的一个三层商业架构
💻 CS
字号:
using System;

namespace CSLA.Server
{
  /// <summary>
  /// This exception is returned from the 
  /// CallMethod method in the server-side DataPortal
  /// and contains the exception thrown by the
  /// underlying business object method that was
  /// being invoked.
  /// </summary>
  [Serializable()]
  public class CallMethodException : Exception
	{
    string _innerStackTrace;

    public override string StackTrace
    {
      get
      {
        return String.Format("{0}\n{1}", _innerStackTrace, base.StackTrace);
      }
    }

    public CallMethodException(string message, Exception ex) : base(message, ex)
    {
      _innerStackTrace = ex.StackTrace;
    }

    protected CallMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
    {
      _innerStackTrace = info.GetString("_innerStackTrace");
    }

    public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
    {
      base.GetObjectData(info, context);
      info.AddValue("_innerStackTrace", _innerStackTrace);
    }
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -