コード例 #1
0
ファイル: ThreadingTest.cs プロジェクト: chenzuo/mbcache
		protected override void TestSetup()
		{
			eventListener = new StatisticsEventListener();
			CacheBuilder
				.AddEventListener(eventListener)
				.For<ObjectWithParametersOnCachedMethod>()
					.CacheMethod(c => c.CachedMethod(null))
					.As<IObjectWithParametersOnCachedMethod>();

			factory = CacheBuilder.BuildFactory();
			component = factory.Create<IObjectWithParametersOnCachedMethod>();
		}
コード例 #2
0
        protected override void TestSetup()
        {
            eventListener = new StatisticsEventListener();
            CacheBuilder
            .AddEventListener(eventListener)
            .For <ObjectWithParametersOnCachedMethod>()
            .CacheMethod(c => c.CachedMethod(null))
            .As <IObjectWithParametersOnCachedMethod>();

            factory   = CacheBuilder.BuildFactory();
            component = factory.Create <IObjectWithParametersOnCachedMethod>();
        }