/// <summary>
        /// Serialize bitrate to a string presentation like 128000-56000
        /// </summary>
        private static string Serialize(FilterTrackBitrateRange range)
        {
            if (!range.LowBound.HasValue && !range.HighBound.HasValue)
            {
                return string.Empty;
            }

            if (range.LowBound.HasValue && range.HighBound.HasValue && range.LowBound == range.HighBound)
            {
                return range.LowBound.Value.ToString(CultureInfo.InvariantCulture);
            }

            StringBuilder builder = new StringBuilder();

            if (range.LowBound.HasValue)
            {
                builder.Append(range.LowBound.Value.ToString(CultureInfo.InvariantCulture));
            }

            builder.Append(cRangeSign);

            if (range.HighBound.HasValue)
            {
                builder.Append(range.HighBound.Value.ToString(CultureInfo.InvariantCulture));
            }

            return builder.ToString();
        }
        /// <summary>
        /// Serialize bitrate to a string presentation like 128000-56000
        /// </summary>
        private static string Serialize(FilterTrackBitrateRange range)
        {
            if (!range.LowBound.HasValue && !range.HighBound.HasValue)
            {
                return(string.Empty);
            }

            if (range.LowBound.HasValue && range.HighBound.HasValue && range.LowBound == range.HighBound)
            {
                return(range.LowBound.Value.ToString(CultureInfo.InvariantCulture));
            }

            StringBuilder builder = new StringBuilder();

            if (range.LowBound.HasValue)
            {
                builder.Append(range.LowBound.Value.ToString(CultureInfo.InvariantCulture));
            }

            builder.Append(cRangeSign);

            if (range.HighBound.HasValue)
            {
                builder.Append(range.HighBound.Value.ToString(CultureInfo.InvariantCulture));
            }

            return(builder.ToString());
        }
 private string ReturnFilterTrackBitrateRangeAsString(FilterTrackBitrateRange br)
 {
     if (br.HighBound != null && br.LowBound != null)
     {
         return string.Format("{0}-{1}", br.LowBound, br.HighBound);
     }
     else
     {
         if (br.HighBound != null)
         {
             return br.HighBound.ToString();
         }
         else
         {
             return br.LowBound.ToString();
         }
     }
 }
 internal FilterTrackBitrateRange(FilterTrackBitrateRange other)
 {
     LowBound = other.LowBound;
     HighBound = other.HighBound;
 }
 public FilterTrackBitrateRangeData(FilterTrackBitrateRange range)
 {
     Range = Serialize(range);
 }
 internal FilterTrackBitrateRange(FilterTrackBitrateRange other)
 {
     LowBound  = other.LowBound;
     HighBound = other.HighBound;
 }
 public FilterTrackBitrateRangeData(FilterTrackBitrateRange range)
 {
     Range = Serialize(range);
 }