Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12723/DotNetMock/Dynamic Modified Files: Tag: RFE_1001778 AbstractArgumentMutator.cs Assign.cs IArgumentMutator.cs IMockedCallHandler.cs IPredicate.cs Log Message: - Added XML Comments. - Refactored class layout to match other classes ( moved member declaration to top of class ) - Removed useless 'using' directives Index: Assign.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Attic/Assign.cs,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** Assign.cs 31 Dec 2004 23:39:04 -0000 1.1.2.2 --- Assign.cs 1 Jan 2005 01:19:49 -0000 1.1.2.3 *************** *** 3,7 **** #endregion #region Imports - using System; #endregion --- 3,6 ---- *************** *** 14,26 **** public class Assign : AbstractArgumentMutator { public Assign(object newValue) { _newValue = newValue; } public override void Mutate(ref object parameterValue) { parameterValue = _newValue; } - private object _newValue; } } --- 13,33 ---- public class Assign : AbstractArgumentMutator { + private object _newValue; + /// <summary> + /// Default constructor. + /// </summary> + /// <param name="newValue">Value to assgin when Mutate calls are performed.</param> public Assign(object newValue) { _newValue = newValue; } + /// <summary> + /// Exchanges the input parameter with the value originally associate with this instance. + /// </summary> + /// <param name="parameterValue">argument to change</param> public override void Mutate(ref object parameterValue) { parameterValue = _newValue; } } } Index: IArgumentMutator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Attic/IArgumentMutator.cs,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** IArgumentMutator.cs 30 Dec 2004 00:04:36 -0000 1.1.2.1 --- IArgumentMutator.cs 1 Jan 2005 01:19:49 -0000 1.1.2.2 *************** *** 3,7 **** #endregion #region Imports ! using System; #endregion --- 3,7 ---- #endregion #region Imports ! #endregion *************** *** 21,26 **** /// Mutate the argument value. /// </summary> ! /// <param name="argument">reference to argument that must ! /// be modified</param> void Mutate(ref object argument); } --- 21,25 ---- /// Mutate the argument value. /// </summary> ! /// <param name="argument">reference to argument that must be modified</param> void Mutate(ref object argument); } Index: AbstractArgumentMutator.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Attic/AbstractArgumentMutator.cs,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** AbstractArgumentMutator.cs 30 Dec 2004 00:04:36 -0000 1.1.2.1 --- AbstractArgumentMutator.cs 1 Jan 2005 01:19:48 -0000 1.1.2.2 *************** *** 3,7 **** #endregion #region Imports ! using System; #endregion --- 3,7 ---- #endregion #region Imports ! #endregion *************** *** 11,20 **** /// Abstract base class for all argument mutators. /// </summary> ! public abstract class AbstractArgumentMutator : ! IArgumentMutator, ! IPredicate { public abstract void Mutate(ref object argument); ! public object AndRequire(IPredicate predicate) { --- 11,29 ---- /// Abstract base class for all argument mutators. /// </summary> ! /// <author>Griffin Caprio</author> ! /// <author>Choy Rim</author> ! public abstract class AbstractArgumentMutator : IArgumentMutator, IPredicate { + private IPredicate _predicate = null; + /// <summary> + /// Abstract method representing the exchanging of parameters + /// </summary> + /// <param name="argument">argument to change</param> public abstract void Mutate(ref object argument); ! /// <summary> ! /// Chains the current instance to another predicate to evaluate when exchanging parameters ! /// </summary> ! /// <param name="predicate"><see cref="IPredicate"/> to use for evaluation</param> ! /// <returns>reference to this instance</returns> public object AndRequire(IPredicate predicate) { *************** *** 22,27 **** return this; } ! ! public virtual bool Eval(object currentValue) { if ( _predicate==null ) --- 31,41 ---- return this; } ! /// <summary> ! /// If there is no predicate associate with this mutator, returns true. Otherwise, evaluates the ! /// input value according to the predicate. ! /// </summary> ! /// <param name="inputValue">Value to evaluate</param> ! /// <returns>The Result of the predicate evaluation, or true if no predicate is assigned to this instance.</returns> ! public virtual bool Eval(object inputValue) { if ( _predicate==null ) *************** *** 29,36 **** return true; } ! return _predicate.Eval(currentValue); } - private IPredicate _predicate = null; } } --- 43,49 ---- return true; } ! return _predicate.Eval(inputValue); } } } Index: IPredicate.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/IPredicate.cs,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** IPredicate.cs 23 Aug 2004 02:36:01 -0000 1.5 --- IPredicate.cs 1 Jan 2005 01:19:49 -0000 1.5.2.1 *************** *** 10,16 **** /// A boolean result /// </summary> ! /// <param name="currentValue"></param> ! /// <returns></returns> ! bool Eval(object currentValue); } } --- 10,16 ---- /// A boolean result /// </summary> ! /// <param name="inputValue">Value to evaluate against</param> ! /// <returns>True/False if the current value equals the input value </returns> ! bool Eval(object inputValue); } } Index: IMockedCallHandler.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock/Dynamic/Attic/IMockedCallHandler.cs,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** IMockedCallHandler.cs 27 Dec 2004 00:45:28 -0000 1.1.2.3 --- IMockedCallHandler.cs 1 Jan 2005 01:19:49 -0000 1.1.2.4 *************** *** 3,7 **** #endregion #region Imports - using System; using System.Reflection; #endregion --- 3,6 ---- |