CesiumLanguageWriter.Advanced.CesiumWritingHelper.GetAndWriteEpoch C# (CSharp) 메소드

GetAndWriteEpoch() 개인적인 정적인 메소드

Gets an appropriate epoch from a list of dates and writes it to the CesiumOutputStream as the "epoch" property. If the dates collection is empty, the startIndex is past the end of the collection, or the length is zero, this method does not write the "epoch" property and returns JulianDate.MinValue.
private static GetAndWriteEpoch ( CesiumOutputStream output, IList dates, int startIndex, int length ) : JulianDate
output CesiumOutputStream The stream to which to write the epoch.
dates IList The collection of dates from which to determine the epoch.
startIndex int The first index in the collection to use.
length int The number of items from the collection to use.
리턴 JulianDate
        private static JulianDate GetAndWriteEpoch(CesiumOutputStream output, IList<JulianDate> dates, int startIndex, int length)
        {
            if (startIndex < dates.Count)
            {
                JulianDate epoch = dates[startIndex];
                output.WritePropertyName("epoch");
                output.WriteValue(CesiumFormattingHelper.ToIso8601(epoch, output.PrettyFormatting ? Iso8601Format.Extended : Iso8601Format.Compact));
                return epoch;
            }
            else
            {
                return JulianDate.MinValue;
            }
        }