当前位置: 首页>>代码示例>>C#>>正文


C# Burden.SetRootInstance方法代码示例

本文整理汇总了C#中Burden.SetRootInstance方法的典型用法代码示例。如果您正苦于以下问题:C# Burden.SetRootInstance方法的具体用法?C# Burden.SetRootInstance怎么用?C# Burden.SetRootInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Burden的用法示例。


在下文中一共展示了Burden.SetRootInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

		public virtual object Create(CreationContext context, Burden burden)
		{
			var instance = InternalCreate(context);
			burden.SetRootInstance(instance);

			onCreation(model, instance);

			return instance;
		}
开发者ID:KRLacey,项目名称:Windsor,代码行数:9,代码来源:AbstractComponentActivator.cs

示例2: Create

 /// <summary>
 /// Creates the <see cref="ISessionFactory"/> from the configuration
 /// </summary>
 /// <param name="context"></param>
 /// <param name="burden"></param>
 /// <returns></returns>
 public override object Create(CreationContext context, Burden burden)
 {
     //HACK:bugfix SessionFactoryActivator override Create with burden
     RaiseCreatingSessionFactory();
     var configuration = Model.ExtendedProperties[Constants.SessionFactoryConfiguration]
                         as Configuration;
     var f= configuration.BuildSessionFactory();
     burden.SetRootInstance(f);
     //onCreation(model, instance);
     return f;
 }
开发者ID:gongzunpan,项目名称:infrastructure,代码行数:17,代码来源:SessionFactoryActivator.cs

示例3: Create

		/// <summary>
		/// Creates the <see cref="ISessionFactory"/> from the configuration
		/// </summary>
		/// <param name="context"></param>
		/// <param name="burden"> </param>
		/// <returns></returns>
		public override object Create(CreationContext context, Burden burden)
		{
			RaiseCreatingSessionFactory();
			var configuration = Model.ExtendedProperties[Constants.SessionFactoryConfiguration]
			                    as Configuration;

			var factory = configuration.BuildSessionFactory();

			burden.SetRootInstance(factory);
			
			return factory;
		}
开发者ID:hconceicao,项目名称:Castle.Facilities.NHibernateIntegration3,代码行数:18,代码来源:SessionFactoryActivator.cs

示例4: CreateInstance

		protected override object CreateInstance(CreationContext context, Burden burden)
		{
			if (pool == null)
			{
				lock (ComponentActivator)
				{
					if (pool == null)
					{
						pool = CreatePool(initialSize, maxSize);
					}
				}
			}

			var instance = pool.Request(context);
			burden.SetRootInstance(instance);
			return instance;
		}
开发者ID:firegrass,项目名称:Castle.Windsor,代码行数:17,代码来源:PoolableLifestyleManager.cs

示例5: CreateInstance

		protected virtual object CreateInstance(CreationContext context, Burden burden)
		{
			var instance = componentActivator.Create(context);
			burden.SetRootInstance(instance);
			return instance;
		}
开发者ID:firegrass,项目名称:Castle.Windsor,代码行数:6,代码来源:AbstractLifestyleManager.cs


注:本文中的Burden.SetRootInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。