public static ErrorMessageLoader CreateLoader(string path, string language) { if (instance == null || instance.Language != language) { instance = new ErrorMessageLoader(path, language); } return(instance); }
public MPExceptionFilterAttribute( IHostingEnvironment hostingEnvironment, IModelMetadataProvider modelMetadataProvider, ErrorMessageLoader messageLoader, ILogger <MPExceptionFilterAttribute> logger) { this.hostingEnvironment = hostingEnvironment; this.modelMetadataProvider = modelMetadataProvider; this.messageLoader = messageLoader; this.logger = logger; }