Exemplo n.º 1
0
        ///<inheritdoc/>
        public override string FeedValues(string line)
        {
            var values = Regex.Split(line, $"({SplitsPatterns.FirstOrDefault()})");

            if (!ValidateSplit(values))
            {
                return(line);
            }

            if (!GetPoints(Lat, values[1]))
            {
                return(line);
            }

            var nextValues = Regex.Split(values[2], $"({SplitsPatterns.Skip(1).FirstOrDefault()})");

            if (values.Length != 3)
            {
                return(line);
            }

            if (!GetPoints(Lon, nextValues[1]))
            {
                return(line);
            }

            return(null);
        }
Exemplo n.º 2
0
        ///<inheritdoc/>
        public override string FeedValues(string line)
        {
            var values = Regex.Split(line, $"({SplitsPatterns.FirstOrDefault()})");

            if (!ValidateSplit(values))
            {
                return(line);
            }

            Status.Value = values[1].Replace(Character.HASH, string.Empty)
                           .Replace(Character.COLON, string.Empty)
                           .Trim();

            return(string.IsNullOrWhiteSpace(Status.Value) ? line : null);
        }
Exemplo n.º 3
0
        ///<inheritdoc/>
        public override string FeedValues(string line)
        {
            var values = Regex.Split(line, $"({SplitsPatterns.FirstOrDefault()})");

            if (!ValidateSplit(values))
            {
                return(line);
            }

            var nameTemp    = values[1].Trim();
            var description = values[2].Trim();

            Name.Value        = nameTemp.Substring(1, nameTemp.Length - 1).Trim();
            Description.Value = description.Trim().Substring(1, description.Length - 2);

            return(string.IsNullOrWhiteSpace(Name.Value) ||
                   string.IsNullOrWhiteSpace(Description.Value)
                ? line
                : null);
        }