Ejemplo n.º 1
0
        /// <summary>
        /// New implementation that is called in-place of the the original method.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <remarks>
        /// It is up to this method to call the underlying target method.
        /// </remarks>
        public void NewImplementation(IAlternateMethodContext context)
        {
            TimerResult timerResult;
            if (!context.TryProceedWithTimer(out timerResult))
            {
                return;
            }

            PostImplementation(context, timerResult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// New implementation that is called in-place of the the original method.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <remarks>
        /// It is up to this method to call the underlying target method.
        /// </remarks>
        public void NewImplementation(IAlternateMethodContext context)
        {
            TimerResult timerResult;

            if (!context.TryProceedWithTimer(out timerResult))
            {
                return;
            }

            PostImplementation(context, timerResult);
        }