Exemplo n.º 1
0
        /// <summary>
        /// Applies .proto rules to ensure that this value is in the expected ranges
        /// </summary>
        public Duration Normalize()
        {
            var seconds = Seconds;
            var nanos   = Nanoseconds;

            PrimaryTypeProvider.NormalizeSecondsNanoseconds(ref seconds, ref nanos, false);
            return(new Duration(seconds, nanos));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Applies .proto rules to ensure that this value is in the expected ranges
        /// </summary>
        public Timestamp Normalize()
        {
            var seconds = Seconds;
            var nanos   = Nanoseconds;

            PrimaryTypeProvider.NormalizeSecondsNanoseconds(ref seconds, ref nanos, true);
            return(new Timestamp(seconds, nanos));
        }