コード例 #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
ファイル: EpochTime.cs プロジェクト: gitter-badger/epoch.net
        /// <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;
        }
コード例 #3
0
 public EpochTimeValueException(EpochTime value)
     : base(string.Format(EpochTimeErrorMessage, value))
 {
 }