Exemplo n.º 1
0
        /// <summary>
        /// Creates the bulletin product.
        /// </summary>
        /// <param name="filename">The filename.</param>
        /// <param name="timeStamp">The time stamp.</param>
        /// <param name="content">The content.</param>
        /// <param name="receivedAt">The received at.</param>
        /// <param name="seq">The seq.</param>
        /// <param name="source">The source.</param>
        /// <returns>TextProduct.</returns>
        public static TextProductSegment Create(string filename, DateTimeOffset timeStamp, TextContent content, DateTimeOffset receivedAt, int seq, string source)
        {
            var product = new TextProductSegment
            {
                Filename = filename,
                TimeStamp = timeStamp,
                Content = content,
                ReceivedAt = receivedAt,
                SequenceNumber = seq,
                Source = source
            };

            return product;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the bulletin product.
        /// </summary>
        /// <param name="filename">The filename.</param>
        /// <param name="timeStamp">The time stamp.</param>
        /// <param name="content">The content.</param>
        /// <param name="receivedAt">The received at.</param>
        /// <param name="seq">The seq.</param>
        /// <param name="source">The source.</param>
        /// <returns>TextProduct.</returns>
        public static TextProductSegment Create(string filename, DateTimeOffset timeStamp, TextContent content, DateTimeOffset receivedAt, int seq, string source)
        {
            var product = new TextProductSegment
            {
                Filename       = filename,
                TimeStamp      = timeStamp,
                Content        = content,
                ReceivedAt     = receivedAt,
                SequenceNumber = seq,
                Source         = source
            };

            return(product);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the parameters.
 /// </summary>
 /// <param name="segment">The bulletin.</param>
 /// <returns>Emwin.Core.Contracts.alertInfoParameter[].</returns>
 private static alertInfoParameter[] GetParameters(TextProductSegment segment) => new alertInfoParameter[]
 {
     //new alertInfoParameter {valueName = "WMOHEADER", value = ""},
     //new alertInfoParameter {valueName = "UGC", value = ""},
     //new alertInfoParameter
     //{
     //    valueName = "VTEC",
     //    value = string.Join(Environment.NewLine, segment.GetPrimaryVtec().First().ToRaw(), segment.HydrologicVtec?.ToRaw())
     //},
     //segment.TrackingLine == null ? null : new alertInfoParameter
     //{
     //    valueName = "TIME...MOT...LOC",
     //    value = segment.TrackingLine?.ToString()
     //}
 };
Exemplo n.º 4
0
 /// <summary>
 /// Gets the areas.
 /// </summary>
 /// <param name="segment">The bulletin.</param>
 /// <returns>Emwin.Core.Contracts.alertInfoArea[].</returns>
 private static alertInfoArea[] GetAreas(TextProductSegment segment) => new[]
 {
     new alertInfoArea
     {
         //areaDesc = "",
         polygon = segment.GetPolygons().Select(x => x.GetPolygonText()).ToArray(),
         //geocode = new[]
         //{
         //    new alertInfoAreaGeocode {valueName = "FIPS6", value = ""},
         //    new alertInfoAreaGeocode {valueName = "UGC", value = ""}
         //}
     }
 };