예제 #1
0
 /// <summary>
 /// Writes a value for the <code>portionToDisplay</code> property as a <code>portionToDisplay</code> value.  The <code>portionToDisplay</code> property specifies indicates what part of a sensor should be displayed.
 /// </summary>
 /// <param name="value">The portion of the sensor to display.</param>
 public void WritePortionToDisplayProperty(CesiumSensorVolumePortionToDisplay value)
 {
     using (var writer = OpenPortionToDisplayProperty())
     {
         writer.WritePortionToDisplay(value);
     }
 }
        /// <summary>
        /// Writes the value expressed as a <c>portionToDisplay</c>, which is the part of a sensor to display.
        /// </summary>
        /// <param name="value">The portion of the sensor to display.</param>
        public void WritePortionToDisplay(CesiumSensorVolumePortionToDisplay value)
        {
            const string PropertyName = PortionToDisplayPropertyName;

            if (ForceInterval)
            {
                OpenIntervalIfNecessary();
            }
            if (IsInterval)
            {
                Output.WritePropertyName(PropertyName);
            }
            Output.WriteValue(CesiumFormattingHelper.SensorVolumePortionToDisplayToString(value));
        }
예제 #3
0
        /// <summary>
        /// Converts a <see cref="CesiumLabelStyle"/> to the corresponding string in a
        /// CZML stream.
        /// </summary>
        /// <param name="portionToDisplay">The value to convert.</param>
        /// <returns>The string representing the specified <see cref="CesiumSensorVolumePortionToDisplay"/>.</returns>
        public static string SensorVolumePortionToDisplayToString(CesiumSensorVolumePortionToDisplay portionToDisplay)
        {
            switch (portionToDisplay)
            {
            case CesiumSensorVolumePortionToDisplay.Complete:
                return("COMPLETE");

            case CesiumSensorVolumePortionToDisplay.AboveEllipsoidHorizon:
                return("ABOVE_ELLIPSOID_HORIZON");

            case CesiumSensorVolumePortionToDisplay.BelowEllipsoidHorizon:
                return("BELOW_ELLIPSOID_HORIZON");

            default:
                throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "portionToDisplay");
            }
        }
        public void TestSensorVolumePortionToDisplayToString(CesiumSensorVolumePortionToDisplay value)
        {
            string s = CesiumFormattingHelper.SensorVolumePortionToDisplayToString(value);

            Assert.IsNotNull(s);
        }
예제 #5
0
        /// <summary>
        /// Converts a <see cref="CesiumLabelStyle"/> to the corresponding string in a
        /// CZML stream.
        /// </summary>
        /// <param name="portionToDisplay">The value to convert.</param>
        /// <returns>The string representing the specified <see cref="CesiumSensorVolumePortionToDisplay"/>.</returns>
        public static string SensorVolumePortionToDisplayToString(CesiumSensorVolumePortionToDisplay portionToDisplay)
        {
            switch (portionToDisplay)
            {
                case CesiumSensorVolumePortionToDisplay.Complete:
                    return "COMPLETE";

                case CesiumSensorVolumePortionToDisplay.AboveEllipsoidHorizon:
                    return "ABOVE_ELLIPSOID_HORIZON";

                case CesiumSensorVolumePortionToDisplay.BelowEllipsoidHorizon:
                    return "BELOW_ELLIPSOID_HORIZON";

                default:
                    throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "portionToDisplay");
            }
        }