protected override void TestSetup() { eventListener = new EventListenerForTest(); CacheBuilder.AddEventListener(eventListener); CacheBuilder .For <ObjectWithParametersOnCachedMethod>() .CacheMethod(c => c.CachedMethod(null)) .As <IObjectWithParametersOnCachedMethod>(); factory = CacheBuilder.BuildFactory(); }
protected override void TestSetup() { eventListener = new EventListenerForTest(); CacheBuilder.AddEventListener(eventListener); CacheBuilder .For<ObjectWithParametersOnCachedMethod>() .CacheMethod(c => c.CachedMethod(null)) .As<IObjectWithParametersOnCachedMethod>(); factory = CacheBuilder.BuildFactory(); }
protected override void TestSetup() { eventListener = new EventListenerForTest(); CacheBuilder .For<ObjectReturningNull>() .CacheMethod(c => c.ReturnNullIfZero(0)) .As<IObjectReturningNull>() .AddEventListener(eventListener); var factory = CacheBuilder.BuildFactory(); var comp = factory.Create<IObjectReturningNull>(); comp.ReturnNullIfZero(0); comp.ReturnNullIfZero(1); }
protected override void TestSetup() { eventListener = new EventListenerForTest(); CacheBuilder .For <ObjectReturningNull>() .CacheMethod(c => c.ReturnNullIfZero(0)) .As <IObjectReturningNull>() .AddEventListener(eventListener); var factory = CacheBuilder.BuildFactory(); var comp = factory.Create <IObjectReturningNull>(); comp.ReturnNullIfZero(0); comp.ReturnNullIfZero(1); }