Example #1
0
        /// <summary>
        /// Returns the augmented weight handler.
        /// </summary>
        public static WeightHandler AugmentedWeightHandlerCached(this IProfileInstance profile, RouterDb routerDb)
        {
            // prebuild profile factor cache.
            var profileCache = new ProfileFactorAndSpeedCache(routerDb);

            profileCache.CalculateFor(profile.Profile);

            return(new Weights.WeightHandler(profileCache.GetGetFactorAndSpeed(profile)));
        }