Пример #1
0
        /// <summary>
        /// Writes the value expressed as a <code>step</code>, which is how the current time advances each tick.  The default value is `SYSTEM_CLOCK_MULTIPLIER`.
        /// </summary>
        /// <param name="value">The clock step.</param>
        public void WriteStep(ClockStep value)
        {
            const string PropertyName = StepPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            Output.WriteValue(CesiumFormattingHelper.ClockStepToString(value));
        }
 /// <summary>
 /// Converts a <see cref="ClockStep"/> to the corresponding string in a CZML stream.
 /// </summary>
 /// <param name="value">The value to convert.</param>
 /// <returns>The string representing the specified value.</returns>
 public static string ClockStepToString(ClockStep value)
 {
     switch (value)
     {
         case ClockStep.SystemClock:
             return "SYSTEM_CLOCK";
         case ClockStep.SystemClockMultiplier:
             return "SYSTEM_CLOCK_MULTIPLIER";
         case ClockStep.TickDependent:
             return "TICK_DEPENDENT";
         default:
             throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "value");
     }
 }
Пример #3
0
        /// <summary>
        /// Converts a <see cref="ClockStep"/> to the corresponding string in a
        /// CZML stream.
        /// </summary>
        /// <param name="clockStep">The label style to convert.</param>
        /// <returns>The string representing the specified <see cref="CesiumLabelStyle"/>.</returns>
        public static string ClockStepToString(ClockStep clockStep)
        {
            switch (clockStep)
            {
            case ClockStep.SystemClock:
                return("SYSTEM_CLOCK");

            case ClockStep.SystemClockMultiplier:
                return("SYSTEM_CLOCK_MULTIPLIER");

            case ClockStep.TickDependent:
                return("TICK_DEPENDENT");

            default:
                throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "clockStep");
            }
        }
        public void TestClockStepToString(ClockStep value)
        {
            string s = CesiumFormattingHelper.ClockStepToString(value);

            Assert.IsNotNull(s);
        }