本文整理匯總了C#中Castle.ResolveAll方法的典型用法代碼示例。如果您正苦於以下問題:C# Castle.ResolveAll方法的具體用法?C# Castle.ResolveAll怎麽用?C# Castle.ResolveAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Castle
的用法示例。
在下文中一共展示了Castle.ResolveAll方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Install
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
{
container.Register(
Component.For<IPolicyViolationHandler>()
.LifeStyle.Transient);
container.ResolveAll<IPolicyViolationHandler>();
}
示例2: Install
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
{
container.Register(
Classes.FromThisAssembly()
.Where(t => typeof(IFilter).IsAssignableFrom(t))
.WithServices(typeof(IFilter))
);
var check = container.ResolveAll<IFilter>();
}
示例3: Install
public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
{
container.AddFacility<AutoTxFacility>();
container.Register(Component.For<INHibernateInstaller>().ImplementedBy<NHibernateInstaller>());//.LifeStyle.Singleton);
var ni = container.Resolve<INHibernateInstaller>();
var t = container.ResolveAll<IInterceptor>();
//container.AddFacility<NHibernateFacility>();
container.AddFacility<NHibernateFacility>(f => f.DefaultLifeStyle = DefaultSessionLifeStyleOption.SessionPerWebRequest);
container.Install(FromAssembly.Containing<PersonRepository>());
}