Exemple #1
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>A new object that is a copy of this instance.</returns>
        public object Clone()
        {
            var clonedObject = new TimePin
            {
                EndStamp = this.EndStamp,
                Recurrence = this.Recurrence,
                ReferenceStamp = this.ReferenceStamp
            };

            return clonedObject;
        }
Exemple #2
0
 /// <summary>
 /// Parses from string.
 /// </summary>
 /// <param name="timePinString">The time pin string.</param>
 /// <param name="timePinOutput">The time pin output.</param>
 /// <returns><c>true</c> if succeed to parse, <c>false</c> otherwise.</returns>
 /// <exception cref="InvalidObjectException">timePinString</exception>
 public static bool TryParse(string timePinString, out TimePin timePinOutput)
 {
     try
     {
         timePinOutput = Parse(timePinString);
         return true;
     }
     catch
     {
         timePinOutput = new TimePin();
         return false;
     }
 }