Example #1
0
        private void AddInterceptions()
        {
            var cachingInterceptor = this.Kernel.Get <CachingInterceptor>();

            Kernel.AddMethodInterceptor(typeof(LogsService).GetMethod("GetAllSortedByDate"), cachingInterceptor.Intercept);
            Kernel.AddMethodInterceptor(typeof(NutritionService).GetMethod("GetUserNutritionsSortedByDate"), cachingInterceptor.Intercept);
            Kernel.AddMethodInterceptor(typeof(MeasurementService).GetMethod("GetUserMeasurementsSortedByDate"), cachingInterceptor.Intercept);
        }
Example #2
0
        private void AddInterceptions()
        {
            var cachingInterceptor = this.Kernel.Get <CachingInterceptor>();

            Kernel.AddMethodInterceptor(typeof(LogsService).GetMethod("GetAllSortedByDate"), cachingInterceptor.Intercept);
        }