/// <summary> /// Called during the chain of responsibility for a build operation. The /// PostBuildUp method is called when the chain has finished the PreBuildUp /// phase and executes in reverse order from the PreBuildUp calls. /// </summary> /// <param name="context">Context of the build operation.</param> // FxCop suppression: Validation is done by Guard class public override void PostBuildUp(IBuilderContext context) { Guard.ArgumentNotNull(context, "context"); // If we got to this method, then we know the lifetime policy didn't // find the object. So we go ahead and store it. ILifetimePolicy lifetimePolicy = GetLifetimePolicy(context); lifetimePolicy.SetValue(context.Existing); }
/// <summary> /// Called during the chain of responsibility for a build operation. The /// PostBuildUp method is called when the chain has finished the PreBuildUp /// phase and executes in reverse order from the PreBuildUp calls. /// </summary> /// <param name="context">Context of the build operation.</param> public override void PostBuildUp(IBuilderContext context) { Guard.ArgumentNotNull(context, "context"); IPolicyList containingPolicyList; ILifetimePolicy lifetimePolicy = GetLifetimePolicy(context, out containingPolicyList); lifetimePolicy.SetValue(context.Existing); }