Beispiel #1
0
        /// <summary>
        /// Specifies that a call's configured behavior should apply only for 2 calls.
        /// </summary>
        /// <typeparam name="TInterface">The type of configuration interface to return.</typeparam>
        /// <param name="configuration">The configuration on which to set the behavior lifetime to 2.</param>
        /// <returns>A configuration object that lets you define the subsequent behavior.</returns>
        public static IThenConfiguration <TInterface> Twice <TInterface>(this IBehaviorLifetimeConfiguration <TInterface> configuration)
        {
            Guard.AgainstNull(configuration, nameof(configuration));

            return(configuration.NumberOfTimes(2));
        }