public object WrapFlowScope(IJointPoint joinpoint) { var aspectType = typeof(TAspectType); var lifecycle = PerCFlowAspectLifecycle.For(aspectType); lifecycle.Push(AspectRuntime.Provider.GetFactory(aspectType).CreateInstance(aspectType, joinpoint)); try { return(joinpoint.Execute()); } finally { lifecycle.Pop(); } }
public IAspectLifecycle GetLifecycle(Type aspectType, IAspectFactory factory) { return(PerCFlowAspectLifecycle.For(aspectType)); }