コード例 #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;
 }