예제 #1
0
        public LongEpochTime(EpochTime epochTime)
        {
            if (epochTime == null)
            {
                throw new ArgumentNullException(nameof(epochTime), "The provided EpochTime can not be null");
            }

            rawEpoch = epochTime.Epoch.ToLongEpochTimestamp();
        }
예제 #2
0
        /// <summary>
        /// Creates a new instance of <see cref="EpochTime"/> with the given <see cref="EpochTime"/> instance as initialisation data
        /// </summary>
        /// <param name="epoch"><see cref="EpochTime"/> used to initialize the instance</param>
        /// <exception cref="ArgumentNullException">If the epoch instance is null</exception>
        /// <remarks>
        /// Is a simple copy constructor
        /// </remarks>
        public EpochTime(EpochTime epoch)
        {
            if (epoch == null)
            {
                throw new ArgumentNullException(nameof(epoch), "The provided epoch can not be null");
            }

            rawEpoch = epoch.Epoch;
        }
 public EpochTimeValueException(EpochTime value)
     : base(string.Format(EpochTimeErrorMessage, value))
 {
 }