标签:typeof mode .com oid model str class bsp blog
public class RequireLoggerProperties : IContributeComponentModelConstruction { public void ProcessModel(IKernel kernel, ComponentModel model) { model.Properties .Where(p => p.Dependency.TargetType == typeof(ILogger)) .All(p => p.Dependency.IsOptional = false); } }
container.Kernel.ComponentModelBuilder.AddContributor(new RequireLoggerProperties());
castle windsor学习----ComponentModel construction contributors
标签:typeof mode .com oid model str class bsp blog
原文地址:http://www.cnblogs.com/lanpingwang/p/6537208.html