/// <summary>
 /// Deeply copies an existing <see cref="ControllerRegister"/>.
 /// </summary>
 /// <param name="copy">A <see cref="ControllerRegister"/> to copy.</param>
 public ControllerRegister(ControllerRegister copy)
 {
     if (copy != null)
     {
         ctrl = copy.ctrl;
     }
 }
예제 #2
0
 /// <summary>
 /// Deeply copies an existing <see cref="ControllerRegister"/>.
 /// </summary>
 /// <param name="copy">A <see cref="ControllerRegister"/> to copy.</param>
 public ControllerRegister(ControllerRegister copy)
 {
     if (copy != null)
     {
         ctrl = copy.ctrl;
     }
 }
 /// <summary>
 /// Stores the parameters given and generates a message describing the exception.
 /// </summary>
 /// <param name="register">The associated <see cref="ControllerRegister"/>.</param>
 /// <param name="methodName">The name of the method called to a <see cref="Controller"/>.</param>
 /// <param name="timeTaken">The time in milliseconds that the method took to finish.</param>
 public ControllerTimeoutException(ControllerRegister register, string methodName, int timeTaken)
     : base(register + " took too long executing " + methodName + " according to the time limit of " +
     register.Match.TimeLimit + "ms. Time taken was " + timeTaken + "ms.")
 {
     this.controller = register;
     this.methodName = methodName;
     this.timeTaken = timeTaken;
 }
예제 #4
0
 /// <summary>
 /// Determines whether or not this <see cref="ControllerRegister"/> is equivalent to another
 /// <see cref="ControllerRegister"/>. Only the <see cref="ControllerRegister.ID"/> and <see cref="ControllerRegister.Match"/>
 /// are compared as they are only relevant for equivalence.
 /// </summary>
 /// <param name="register">The <see cref="ControllerRegister"/> to compare with.</param>
 /// <returns>A value indicating equality.</returns>
 public bool Equals(ControllerRegister register)
 {
     if (register == null)
     {
         return(false);
     }
     return((ID == register.ID) && (Match == register.Match));
 }
 /// <summary>
 /// Determines whether or not this <see cref="ControllerRegister"/> is equivalent to another
 /// <see cref="ControllerRegister"/>. Only the <see cref="ControllerRegister.ID"/> and <see cref="ControllerRegister.Match"/>
 /// are compared as they are only relevant for equivalence.
 /// </summary>
 /// <param name="register">The <see cref="ControllerRegister"/> to compare with.</param>
 /// <returns>A value indicating equality.</returns>
 public bool Equals(ControllerRegister register)
 {
     if (register == null)
     {
         return false;
     }
     return (ID == register.ID) && (Match == register.Match);
 }
 private void Init(ControllerRegister register, int time, string method)
 {
     TimeTaken = time;
     Method = method;
 }