Пример #1
0
 public static ErrorMessageLoader CreateLoader(string path, string language)
 {
     if (instance == null || instance.Language != language)
     {
         instance = new ErrorMessageLoader(path, language);
     }
     return(instance);
 }
Пример #2
0
 public MPExceptionFilterAttribute(
     IHostingEnvironment hostingEnvironment,
     IModelMetadataProvider modelMetadataProvider,
     ErrorMessageLoader messageLoader,
     ILogger <MPExceptionFilterAttribute> logger)
 {
     this.hostingEnvironment    = hostingEnvironment;
     this.modelMetadataProvider = modelMetadataProvider;
     this.messageLoader         = messageLoader;
     this.logger = logger;
 }