Exemplo n.º 1
0
        /// <summary>
        /// Returns a value that indicates whether the current instance and a specified <see cref="CommandLine.NotParsed{T}"/> have the same value.
        /// </summary>
        /// <param name="other">The <see cref="CommandLine.NotParsed{T}"/> instance to compare.</param>
        /// <returns><value>true</value> if this instance of <see cref="CommandLine.NotParsed{T}"/> and <paramref name="other"/> have the same value; otherwise, <value>false</value>.</returns>
        public bool Equals(NotParsed <T> other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.Tag.Equals(other.Tag) && Errors.SequenceEqual(other.Errors));
        }
Exemplo n.º 2
0
 public static NotParsed <T> MapErrors <T>(
     this NotParsed <T> parserResult,
     Func <IEnumerable <Error>, IEnumerable <Error> > func)
 {
     return(new NotParsed <T>(parserResult.Value, func(parserResult.Errors)));
 }