public void SetUp() { this.session = new Mock <ISession>(); this.cache = new ConcurrentDictionary <CacheKey, Lazy <Thing> >(); this.sessionThatThrowsException = new Mock <ISession>(); this.sessionThatThrowsException.Setup(x => x.Write(It.IsAny <OperationContainer>())).Throws <Exception>(); this.thingCreator = new ThingCreator(); }
static void Test <T>(ThingCreator <T> tc) where T : IThing { Console.WriteLine(tc.Method.ReturnType); }
static void Test(ThingCreator creator) { Console.WriteLine(creator.Method.ReturnType); }
static void Test(ThingCreator tc) { Console.WriteLine(tc.Method.ReturnType); }
static ThingCreator DoIt <T>(ThingCreator <T> tc) where T : class, IThing { return(tc.Invoke); }