需要使用Windsor容器设置静态属性依赖关系的配置?
@H_301_10@static class StuffDooer { static ILogger Logger { get; set; } static StuffDooer() { Logger = NullLogger.Instance; } }
这是我的配置,虽然这个工具似乎自动查找实例属性没有问题,静态版本没有被设置.
<facility id="logging" type="Castle.Facilities.Logging.LoggingFacility,Castle.Facilities.Logging" loggingApi="nlog" customLoggerFactory="Castle.Services.Logging.NLogIntegration.NLogFactory" configFile="Configuration/nlog.config" />