public override void Deactivate(IActivationContext context) { if (context.Depth().RequiresActivation()) { CascadeActivation(context); } SetOn(context.Transaction(), context.TargetObject(), null); }
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())); }
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; }
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()); }
public virtual void CascadeActivation(IActivationContext context) { if (!ObjectCanActivate(context.Transaction(), context.TargetObject())) { return; } TraverseAllAspects(new _ITraverseAspectCommand_162(context)); }
private void ReadForActivation(IActivationContext context) { Read(context.Transaction(), null, context.TargetObject(), context.Depth(), Const4 .AddMembersToIdTreeOnly, false); }
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()); }