コード例 #1
0
ファイル: Invocation.cs プロジェクト: isaiah-perumalla/NMocha
 /// <summary>
 /// Initializes a new instance of the <see cref="Invocation"/> class.
 /// </summary>
 /// <param name="receiver">The receiver providing the method.</param>
 /// <param name="method">The method.</param>
 /// <param name="parameters">The parameters passed to the method..</param>
 public Invocation(object receiver, MethodInfo method, object[] parameters)
 {
     Receiver = receiver;
     Method = method;
     Parameters = new ParameterList(method, parameters);
 }
コード例 #2
0
        public void SetUp()
        {
            ParameterInfo inParam = new ParameterInfoStub("inParam", ParameterAttributes.In);
            ParameterInfo refParam = new ParameterInfoStub("refParam", ParameterAttributes.None);
            ParameterInfo outParam = new ParameterInfoStub("outParam", ParameterAttributes.Out);

            method = new MethodInfoStub("method", inParam, refParam, outParam);

            parameterValues = new[] {inValue, refValue, null};

            list = new ParameterList(method, parameterValues);
        }