コード例 #1
0
        /// <summary>
        /// Returns this <see cref="ParsedArguments"/> in a human readable format.
        /// </summary>
        /// <param name="detailed">True if the output should be detailed.</param>
        /// <returns>A <see cref="string"/>.</returns>
        public string ToString(bool detailed)
        {
            StringBuilder      returnValue      = new StringBuilder();
            ArgumentDictionary invalidArguments = ParsedArguments.GetInvalidArguments();
            ArgumentDictionary validArguments   = ParsedArguments.GetValidArguments();

            if (validArguments.Count > 0)
            {
                returnValue.AppendLine("Valid Arguments:");
                returnValue.AppendLine();

                foreach (Argument validArgument in validArguments.Values)
                {
                    returnValue.AppendLine(" " + validArgument.ToString(detailed));
                }
            }

            if (invalidArguments.Count > 0)
            {
                returnValue.AppendLine();
                returnValue.AppendLine("Invalid Arguments:");
                returnValue.AppendLine();

                foreach (Argument invalidArgument in invalidArguments.Values)
                {
                    returnValue.AppendLine(" " + invalidArgument.ToString(detailed));
                }
            }

            return(returnValue.ToString());
        }
コード例 #2
0
 public void Dispose()
 {
     _ArgumentDictionary = null;
 }
コード例 #3
0
 /// <summary>
 /// Creates a new <see cref="ArgumentDictionaryEnumerator"/>
 /// </summary>
 /// <param name="argumentDictionary">The <see cref="ArgumentDictionary"/> to enumerate</param>
 public ArgumentDictionaryEnumerator(ArgumentDictionary argumentDictionary)
 {
     _ArgumentDictionary = argumentDictionary;
 }