/// <summary> /// 构造函数 /// </summary> static Oops() { ErrorMethods = new ConcurrentDictionary <MethodBase, MethodIfException>(); _friendlyExceptionSettings = App.GetService <IOptions <FriendlyExceptionSettingsOptions> >().Value; ErrorCodeTypes = GetErrorCodeTypes(); ErrorCodeMessages = GetErrorCodeMessages(); }
/// <summary> /// 构造函数 /// </summary> static Oops() { ErrorMethods = new ConcurrentDictionary <MethodBase, MethodIfException>(); _friendlyExceptionSettings = App.GetConfig <FriendlyExceptionSettingsOptions>("FriendlyExceptionSettings", true); ErrorCodeTypes = GetErrorCodeTypes(); ErrorCodeMessages = GetErrorCodeMessages(); }