0

autofac を使用してIServiceManagerプロパティをこのクラスに挿入するにはどうすればよいですか? これは、リソース文字列を取得するために を呼び出すときに呼び出されるカスタム リソース プロバイダー ファクトリ クラスですHttpContext.GetGlobalResourceObject("", "MyResource")

public class SqlResourceProviderFactory : ResourceProviderFactory
{
    // needs autofac property injection
    public IServiceManager ServiceManager { get; set; }

    public override IResourceProvider CreateGlobalResourceProvider(string classKey)
    {
        ...
    }

    public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
    {
        ...
    }

    public static string GetAppRelativePath(string logicalPath)
    {
        ...
    }
}
4

1 に答える 1