コード例 #1
0
        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();
        }
コード例 #2
0
 static void Test <T>(ThingCreator <T> tc) where T : IThing
 {
     Console.WriteLine(tc.Method.ReturnType);
 }
コード例 #3
0
 static void Test(ThingCreator creator)
 {
     Console.WriteLine(creator.Method.ReturnType);
 }
コード例 #4
0
 static void Test(ThingCreator tc)
 {
     Console.WriteLine(tc.Method.ReturnType);
 }
コード例 #5
0
 static ThingCreator DoIt <T>(ThingCreator <T> tc) where T : class, IThing
 {
     return(tc.Invoke);
 }