本文整理汇总了C#中IActivationContext.Transaction方法的典型用法代码示例。如果您正苦于以下问题:C# IActivationContext.Transaction方法的具体用法?C# IActivationContext.Transaction怎么用?C# IActivationContext.Transaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActivationContext
的用法示例。
在下文中一共展示了IActivationContext.Transaction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deactivate
public override void Deactivate(IActivationContext context)
{
if (context.Depth().RequiresActivation())
{
CascadeActivation(context);
}
SetOn(context.Transaction(), context.TargetObject(), null);
}
示例2: 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;
}
示例3: 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());
}
示例4: CascadeActivation
public virtual void CascadeActivation(IActivationContext context)
{
if (!ObjectCanActivate(context.Transaction(), context.TargetObject()))
{
return;
}
TraverseAllAspects(new _ITraverseAspectCommand_162(context));
}
示例5: ReadForActivation
private void ReadForActivation(IActivationContext context)
{
Read(context.Transaction(), null, context.TargetObject(), context.Depth(), Const4
.AddMembersToIdTreeOnly, false);
}
示例6: 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());
}