コード例 #1
0
        public void MakeClosedGenericExecuteMethod()
        {
            var executeMethod = typeof(CountResultOperator).GetMethod("ExecuteInMemory", new[] { typeof(StreamedSequence) });
            var result        = _infoWithStringSequence.MakeClosedGenericExecuteMethod(executeMethod);

            Assert.That(result.GetGenericArguments(), Is.EqualTo(new[] { typeof(string) }));
        }
コード例 #2
0
        public void MakeClosedGenericExecuteMethod_WithCovariantDataType()
        {
            var info = new StreamedSequenceInfo(typeof(IEnumerable <object>), _stringExpression);

            var executeMethod = typeof(CountResultOperator).GetMethod("ExecuteInMemory", new[] { typeof(StreamedSequence) });
            var result        = info.MakeClosedGenericExecuteMethod(executeMethod);

            Assert.That(result.GetGenericArguments(), Is.EqualTo(new[] { typeof(object) }));
        }
コード例 #3
0
    public void MakeClosedGenericExecuteMethod_WithCovariantDataType ()
    {
      var info = new StreamedSequenceInfo (typeof (IEnumerable<object>), _stringExpression);

      var executeMethod = typeof (CountResultOperator).GetMethod ("ExecuteInMemory", new[] { typeof (StreamedSequence) });
      var result = info.MakeClosedGenericExecuteMethod (executeMethod);

      Assert.That (result.GetGenericArguments (), Is.EqualTo (new[] { typeof (object) }));
    }