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