public void ProcessModel(IKernel kernel, Castle.Model.ComponentModel model) { if (model.Implementation == typeof(PrevalenceEngine)) { model.CustomComponentActivator = typeof(PrevalenceEngineComponentActivator); } else { object value = model.ExtendedProperties[PrevalenceFacility.EngineIdPropertyKey]; if (value != null) { model.CustomComponentActivator = typeof(PrevalenceSystemComponentActivator); } } }
/// <summary> /// 通过内核中的配置仓储查询组件关联的配置信息 /// </summary> /// <param name="kernel"></param> /// <param name="model"></param> public virtual void ProcessModel(IKernel kernel, Castle.Model.ComponentModel model) { model.Configuration = kernel.ConfigurationStore.GetComponentConfiguration(model.Name); }
public void Apply(Castle.Model.ComponentModel model, object component) { ((IDisposable)component).Dispose(); }