Exemplo n.º 1
0
 /// <summary>
 /// Generates a RevisionId based on the "yyyyddMM.HHmmss.fffffff" formated
 /// string representation of a DateTime object and the given SystemId.
 /// </summary>
 /// <param name="DateTimeString">A DateTime object as "yyyyddMM.HHmmss.fffffff"-formated string</param>
 /// <param name="SystemId">An unique identificator for the generating system, process or thread</param>
 /// <exception cref="System.FormatException"></exception>
 public RevisionId(String DateTimeString, SystemId SystemId)
 {
     try
     {
         this.Timestamp = (UInt64)(DateTime.ParseExact(DateTimeString, "yyyyddMM.HHmmss.fffffff", null)).Ticks;
         this.SystemId  = SystemId;
     }
     catch
     {
         throw new FormatException("The given string could not be parsed!");
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Generates a RevisionId based on the "yyyyddMM.HHmmss.fffffff(SystemId)"
        /// formated string representation of a RevId.
        /// </summary>
        /// <param name="RevIdString">A RevId object as "yyyyddMM.HHmmss.fffffff(SystemId)"-formated string</param>
        /// <exception cref="System.FormatException"></exception>
        public RevisionId(String RevIdString)
        {
            try
            {
                var __Timestamp = RevIdString.Remove(RevIdString.IndexOf("("));
                var __SystemId  = RevIdString.Substring(__Timestamp.Length + 1, RevIdString.Length - __Timestamp.Length - 2);

                this.Timestamp = (UInt64)(DateTime.ParseExact(__Timestamp, "yyyyddMM.HHmmss.fffffff", null)).Ticks;
                this.SystemId  = new SystemId(__SystemId);
            }
            catch
            {
                throw new FormatException("The given string could not be parsed!");
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Generates a RevisionId based on the given DateTime object and the given SystemId.
 /// </summary>
 /// <param name="DateTime">A DateTime object</param>
 /// <param name="SystemId">An unique identificator for the generating system, process or thread</param>
 public RevisionId(DateTime DateTime, SystemId SystemId)
 {
     this.Timestamp = (UInt64)DateTime.Ticks;
     this.SystemId  = SystemId;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Generates a RevisionId based on the given UInt64 timestamp and the given SystemId.
 /// </summary>
 /// <param name="Timestamp">A timestamp</param>
 /// <param name="SystemId">An unique identificator for the generating system, process or thread</param>
 public RevisionId(UInt64 Timestamp, SystemId SystemId)
 {
     this.Timestamp = Timestamp;
     this.SystemId  = SystemId;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Generates a RevisionId based on the actual timestamp and the given SystemId.
 /// </summary>
 /// <param name="SystemId">An unique identificator for the generating system, process or thread</param>
 public RevisionId(SystemId SystemId)
 {
     this.Timestamp = (UInt64)UniqueTimestamp.Ticks;
     this.SystemId  = SystemId;
 }