• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IActivationContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IActivationContext的典型用法代码示例。如果您正苦于以下问题:C# IActivationContext类的具体用法?C# IActivationContext怎么用?C# IActivationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IActivationContext类属于命名空间,在下文中一共展示了IActivationContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CascadeActivation

		private void CascadeActivation(IActivationContext context)
		{
			IActivationDepth depth = context.Depth();
			if (!depth.RequiresActivation())
			{
				return;
			}
			if (depth.Mode().IsDeactivate())
			{
				Container().StillToDeactivate(_transaction, context.TargetObject(), depth, false);
			}
			else
			{
				// FIXME: [TA] do we really need to check for isValueType here?
				Db4objects.Db4o.Internal.ClassMetadata classMetadata = context.ClassMetadata();
				if (classMetadata.IsStruct())
				{
					classMetadata.CascadeActivation(context);
				}
				else
				{
					Container().StillToActivate(context);
				}
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:25,代码来源:ActivationContext4.cs


示例2: CascadeActivation

 public void CascadeActivation(IActivationContext context)
 {
     ICollection collection = ((ICollection)context.TargetObject());
     foreach (object item in collection)
     {
         context.CascadeActivationToChild(item);
     }
 }
开发者ID:Galigator,项目名称:db4o,代码行数:8,代码来源:SystemArrayTypeHandler.cs


示例3: Deactivate

		public override void Deactivate(IActivationContext context)
		{
			if (context.Depth().RequiresActivation())
			{
				CascadeActivation(context);
			}
			SetOn(context.Transaction(), context.TargetObject(), null);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:TranslatedAspect.cs


示例4: CascadeActivation

		public override void CascadeActivation(IActivationContext context)
		{
			if (!Handlers4.IsCascading(_typeHandler))
			{
				return;
			}
			Handlers4.CascadeActivation(context, _typeHandler);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:TypeHandlerAspect.cs


示例5: CascadeActivation

 public void CascadeActivation(IActivationContext context)
 {
     var all = ((ICollection) context.TargetObject()).GetEnumerator();
     while (all.MoveNext())
     {
         context.CascadeActivationToChild(all.Current);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:CollectionTypeHandler.cs


示例6: CascadeActivation

		public virtual void CascadeActivation(IActivationContext context)
		{
			object targetObject = context.TargetObject();
			if (IsPlainObject(targetObject))
			{
				return;
			}
			ITypeHandler4 typeHandler = TypeHandlerForObject(targetObject);
			Handlers4.CascadeActivation(context, typeHandler);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:10,代码来源:OpenTypeHandler.cs


示例7: CascadeActivation

 public void CascadeActivation(IActivationContext context)
 {
     var map = (IDictionary) context.TargetObject();
     var keys = (map).Keys.GetEnumerator();
     while (keys.MoveNext())
     {
         var key = keys.Current;
         context.CascadeActivationToChild(key);
         context.CascadeActivationToChild(map[key]);
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:MapTypeHandler.cs


示例8: CascadeActivation

		public void CascadeActivation(IActivationContext context)
		{
            IEnumerable collection = ((IEnumerable)context.TargetObject());

			// TODO: detect the element type
			// and return immediately when it's a primitive

			foreach (object item in collection)
			{
				context.CascadeActivationToChild(item);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:12,代码来源:GenericCollectionTypeHandler.cs


示例9: CascadeActivation

		public void CascadeActivation(IActivationContext context)
		{
			if (!Handlers4.IsCascading(_handler))
			{
				return;
			}
			ObjectContainerBase container = context.Container();
			IEnumerator all = AllElements(container, context.TargetObject());
			while (all.MoveNext())
			{
				context.CascadeActivationToChild(all.Current);
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:13,代码来源:ArrayHandler.cs


示例10: ProcessedByImmediateActivation

		private bool ProcessedByImmediateActivation(IActivationContext context)
		{
			if (!StackIsSmall())
			{
				return false;
			}
			if (!context.Depth().RequiresActivation())
			{
				return true;
			}
			ObjectReference @ref = context.Transaction().ReferenceForObject(context.TargetObject
				());
			if (@ref == null)
			{
				return false;
			}
			if (HandledInCurrentTopLevelCall(@ref))
			{
				return true;
			}
			FlagAsHandled(@ref);
			IncStackDepth();
			try
			{
				@ref.ActivateInternal(context);
			}
			finally
			{
				DecStackDepth();
			}
			return true;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:32,代码来源:ObjectContainerBase.cs


示例11: StillToActivate

		public void StillToActivate(IActivationContext context)
		{
			// TODO: We don't want the simple classes to search the hc_tree
			// Kick them out here.
			//		if (a_object != null) {
			//			Class clazz = a_object.getClass();
			//			if(! clazz.isPrimitive()){
			if (ProcessedByImmediateActivation(context))
			{
				return;
			}
			_stillToActivate = StillTo1(context.Transaction(), _stillToActivate, context.TargetObject
				(), context.Depth());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:14,代码来源:ObjectContainerBase.cs


示例12: CascadeActivation

		public static void CascadeActivation(IActivationContext context, ITypeHandler4 handler
			)
		{
			if (!(handler is ICascadingTypeHandler))
			{
				return;
			}
			((ICascadingTypeHandler)handler).CascadeActivation(context);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:Handlers4.cs


示例13: EnsureObjectIsActive

		private void EnsureObjectIsActive(IActivationContext context)
		{
			if (!context.Depth().Mode().IsActivate())
			{
				return;
			}
			if (Handlers4.IsValueType(GetHandler()))
			{
				return;
			}
			ObjectContainerBase container = context.Container();
			ClassMetadata classMetadata = container.ClassMetadataForObject(context.TargetObject
				());
			if (classMetadata == null || !classMetadata.HasIdentity())
			{
				return;
			}
			if (container.IsActive(context.TargetObject()))
			{
				return;
			}
			container.StillToActivate(context.Descend());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:23,代码来源:FieldMetadata.cs


示例14: CascadeActivation

 public virtual void CascadeActivation(IActivationContext context)
 {
     if (!ObjectCanActivate(context.Transaction(), context.TargetObject()))
     {
         return;
     }
     TraverseAllAspects(new _ITraverseAspectCommand_162(context));
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:ClassMetadata.cs


示例15: ReadForActivation

		private void ReadForActivation(IActivationContext context)
		{
			Read(context.Transaction(), null, context.TargetObject(), context.Depth(), Const4
				.AddMembersToIdTreeOnly, false);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:5,代码来源:ObjectReference.cs


示例16: _ITraverseAspectCommand_703

 public _ITraverseAspectCommand_703(IActivationContext context)
 {
     this.context = context;
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:ClassMetadata.cs


示例17: ActivateInternal

		internal virtual void ActivateInternal(IActivationContext context)
		{
			if (null == context)
			{
				throw new ArgumentNullException();
			}
			if (!context.Depth().RequiresActivation())
			{
				return;
			}
			ObjectContainerBase container = context.Container();
			if (context.Depth().Mode().IsRefresh())
			{
				LogActivation(container, "refresh");
			}
			else
			{
				if (IsActive())
				{
					_class.CascadeActivation(context);
					return;
				}
				LogActivation(container, "activate");
			}
			ReadForActivation(context);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:26,代码来源:ObjectReference.cs


示例18: CascadeActivation

 public override void CascadeActivation(IActivationContext context)
 {
 }
开发者ID:masroore,项目名称:db4o,代码行数:3,代码来源:PrimitiveTypeMetadata.cs


示例19: CascadingTarget

		protected object CascadingTarget(IActivationContext context)
		{
			if (context.Depth().Mode().IsDeactivate())
			{
				if (null == _reflectField)
				{
					return null;
				}
				return FieldAccessor().Get(_reflectField, context.TargetObject());
			}
			return GetOrCreate(context.Transaction(), context.TargetObject());
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:12,代码来源:FieldMetadata.cs


示例20: Deactivate

		// QBE constraint collection call
		// There isn't anything useful to do here, since virtual fields
		// are not on the actual object.
		public override void Deactivate(IActivationContext context)
		{
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:VirtualFieldMetadata.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IActivationFunction类代码示例发布时间:2022-05-24
下一篇:
C# IActivatedEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap