From ab02f6e0fadc02a4ee4b53c8ca94256d1ff73211 Mon Sep 17 00:00:00 2001 From: Vladymyr Liashenko Date: Wed, 13 Jul 2016 13:58:17 +0300 Subject: [PATCH 1/4] Implemented dotnet core supporting --- .../CommandLineParserErrorFormatter.cs | 95 ++++++ .../FluentCommandLineBuilderT.cs | 38 +++ .../FluentCommandLineParser.cs | 316 ++++++++++++++++++ .../FluentCommandLineParser.xproj | 21 ++ .../FluentCommandLineParserT.cs | 112 +++++++ .../ICommandLineOptionBuilderFluent.cs | 68 ++++ .../ICommandLineOptionFluent.cs | 72 ++++ .../ICommandLineOptionFormatter.cs | 44 +++ .../ICommandLineParserError.cs | 39 +++ .../ICommandLineParserErrorFormatter.cs | 48 +++ .../ICommandLineParserResult.cs | 70 ++++ .../IFluentCommandLineBuilderT.cs | 37 ++ .../IFluentCommandLineParser.cs | 118 +++++++ .../IFluentCommandLineParserT.cs | 72 ++++ .../IHelpCommandLineOptionFluent.cs | 80 +++++ .../Internals/CommandLineOption.cs | 254 ++++++++++++++ .../CommandLineOptionBuilderFluent.cs | 113 +++++++ .../Internals/CommandLineOptionFactory.cs | 71 ++++ .../Internals/CommandLineOptionFormatter.cs | 139 ++++++++ .../Internals/EmptyHelpCommandLineOption.cs | 55 +++ .../Errors/CommandLineParserErrorBase.cs | 50 +++ .../ExpectedOptionNotFoundParseError.cs | 44 +++ .../Errors/OptionSyntaxParseError.cs | 70 ++++ .../Internals/Extensions/UsefulExtension.cs | 162 +++++++++ .../Internals/HelpCommandLineOption.cs | 174 ++++++++++ .../Internals/ICommandLineOption.cs | 96 ++++++ .../Internals/ICommandLineOptionFactory.cs | 50 +++ .../Internals/ICommandLineOptionResult.cs | 34 ++ .../Internals/IHelpCommandLineOption.cs | 50 +++ .../Internals/IHelpCommandLineOptionResult.cs | 33 ++ .../Parsing/CommandLineOptionGrouper.cs | 148 ++++++++ .../Parsing/CommandLineParserEngineMark2.cs | 154 +++++++++ .../Parsing/CommandLineParserResult.cs | 107 ++++++ .../ICommandLineOptionParserFactory.cs | 42 +++ .../Parsing/ICommandLineParserEngine.cs | 39 +++ .../Internals/Parsing/OptionArgumentParser.cs | 101 ++++++ .../BoolCommandLineOptionParser.cs | 111 ++++++ .../CommandLineOptionParserFactory.cs | 231 +++++++++++++ .../DateTimeCommandLineOptionParser.cs | 64 ++++ .../DoubleCommandLineOptionParser.cs | 55 +++ .../EnumCommandLineOptionParser.cs | 112 +++++++ .../EnumFlagCommandLineOptionParser.cs | 125 +++++++ .../OptionParsers/ICommandLineOptionParser.cs | 45 +++ .../Int32CommandLineOptionParser.cs | 55 +++ .../Int64CommandLineOptionParser.cs | 31 ++ .../ListCommandLineOptionParser.cs | 86 +++++ .../NullableCommandLineOptionParser.cs | 62 ++++ .../NullableEnumCommandLineOptionParser.cs | 83 +++++ .../StringCommandLineOptionParser.cs | 62 ++++ .../UriCommandLineOptionParser.cs | 70 ++++ .../Internals/Parsing/ParsedOption.cs | 153 +++++++++ .../Internals/Parsing/ParsedOptionFactory.cs | 71 ++++ .../Internals/Parsing/ParserEngineResult.cs | 55 +++ .../Internals/SpecialCharacters.cs | 62 ++++ .../Validators/CommandLineOptionValidator.cs | 60 ++++ .../Validators/ICommandLineOptionValidator.cs | 37 ++ .../Validators/NoDuplicateOptionValidator.cs | 84 +++++ .../Validators/OptionNameValidator.cs | 109 ++++++ .../InvalidOptionNameException.cs | 71 ++++ .../OptionAlreadyExistsException.cs | 70 ++++ .../OptionSyntaxException.cs | 38 +++ .../Properties/AssemblyInfo.cs | 19 ++ .../UnsupportedTypeException.cs | 38 +++ Core/FluentCommandLineParser/project.json | 20 ++ FluentCommandLineParser.sln | 27 +- global.json | 6 + 66 files changed, 5327 insertions(+), 1 deletion(-) create mode 100644 Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs create mode 100644 Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs create mode 100644 Core/FluentCommandLineParser/FluentCommandLineParser.cs create mode 100644 Core/FluentCommandLineParser/FluentCommandLineParser.xproj create mode 100644 Core/FluentCommandLineParser/FluentCommandLineParserT.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineOptionFluent.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineParserError.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs create mode 100644 Core/FluentCommandLineParser/ICommandLineParserResult.cs create mode 100644 Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs create mode 100644 Core/FluentCommandLineParser/IFluentCommandLineParser.cs create mode 100644 Core/FluentCommandLineParser/IFluentCommandLineParserT.cs create mode 100644 Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs create mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs create mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs create mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs create mode 100644 Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs create mode 100644 Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs create mode 100644 Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs create mode 100644 Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs create mode 100644 Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs create mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs create mode 100644 Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs create mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs create mode 100644 Core/FluentCommandLineParser/Internals/SpecialCharacters.cs create mode 100644 Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs create mode 100644 Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs create mode 100644 Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs create mode 100644 Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs create mode 100644 Core/FluentCommandLineParser/InvalidOptionNameException.cs create mode 100644 Core/FluentCommandLineParser/OptionAlreadyExistsException.cs create mode 100644 Core/FluentCommandLineParser/OptionSyntaxException.cs create mode 100644 Core/FluentCommandLineParser/Properties/AssemblyInfo.cs create mode 100644 Core/FluentCommandLineParser/UnsupportedTypeException.cs create mode 100644 Core/FluentCommandLineParser/project.json create mode 100644 global.json diff --git a/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs b/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs new file mode 100644 index 0000000..5993a08 --- /dev/null +++ b/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs @@ -0,0 +1,95 @@ +#region License +// CommandLineParserErrorFormatter.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; +using System.Text; +using Fclp.Internals.Errors; +using Fclp.Internals.Extensions; + +namespace Fclp +{ + /// + /// A simple parser error formatter designed to create error descriptions suitable for the console. + /// + public class CommandLineParserErrorFormatter : ICommandLineParserErrorFormatter + { + + /// + /// Formats the specified list of to a suitable for the end user. + /// + /// The errors to format. + /// A describing the specified errors. + public string Format(IEnumerable parserErrors) + { + if (parserErrors.IsNullOrEmpty()) return null; + + var builder = new StringBuilder(); + + foreach (var error in parserErrors) + { + builder.AppendLine(Format(error)); + } + + return builder.ToString(); + } + + /// + /// Formats the specified to a suitable for the end user. + /// + /// The error to format. This must not be null. + /// A describing the specified error. + public string Format(ICommandLineParserError parserError) + { + var optionSyntaxParseError = parserError as OptionSyntaxParseError; + if (optionSyntaxParseError != null) return FormatOptionSyntaxParseError(optionSyntaxParseError); + + var expectedOptionNotFoundError = parserError as ExpectedOptionNotFoundParseError; + if (expectedOptionNotFoundError != null) return FormatExpectedOptionNotFoundError(expectedOptionNotFoundError); + + return "unknown parse error."; + } + + private static string FormatOptionSyntaxParseError(OptionSyntaxParseError error) + { + return string.Format("Option '{0}' parse error: could not parse '{1}' to '{2}'.", + error.ParsedOption.RawKey, + error.ParsedOption.Value.RemoveAnyWrappingDoubleQuotes(), + error.Option.SetupType); + } + + private static string FormatExpectedOptionNotFoundError(ExpectedOptionNotFoundParseError error) + { + var optionText = GetOptionText(error); + return string.Format("Option '{0}' parse error. option is required but was not specified.", optionText); + } + + private static string GetOptionText(ICommandLineParserError error) + { + var optionText = error.Option.LongName.IsNullOrWhiteSpace() + ? error.Option.ShortName + : error.Option.ShortName + ":" + error.Option.LongName; + return optionText; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs b/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs new file mode 100644 index 0000000..2434795 --- /dev/null +++ b/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs @@ -0,0 +1,38 @@ +#region License +// FluentCommandLineBuilderT.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp +{ + /// + /// Parser that constructs and populates the specified type of object from command line arguments. + /// + /// The object type containing the argument properties to populate from parsed command line arguments. + [Obsolete("FluentCommandLineBuilder has been renamed to FluentCommandLineParser", false)] + public class FluentCommandLineBuilder : FluentCommandLineParser, IFluentCommandLineBuilder where TBuildType : new() + { + + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/FluentCommandLineParser.cs b/Core/FluentCommandLineParser/FluentCommandLineParser.cs new file mode 100644 index 0000000..c8e6935 --- /dev/null +++ b/Core/FluentCommandLineParser/FluentCommandLineParser.cs @@ -0,0 +1,316 @@ +#region License +// FluentCommandLineParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Fclp.Internals; +using Fclp.Internals.Errors; +using Fclp.Internals.Extensions; +using Fclp.Internals.Parsing; +using Fclp.Internals.Validators; + +namespace Fclp +{ + /// + /// A command line parser which provides methods and properties + /// to easily and fluently parse command line arguments. + /// + public class FluentCommandLineParser : IFluentCommandLineParser + { + /// + /// Initialises a new instance of the class. + /// + public FluentCommandLineParser() + { + IsCaseSensitive = true; + } + + /// + /// The type used for case sensitive comparisons. + /// + public const StringComparison CaseSensitiveComparison = StringComparison.CurrentCulture; + + /// + /// The type used for case in-sensitive comparisons. + /// + public const StringComparison IgnoreCaseComparison = StringComparison.CurrentCultureIgnoreCase; + + List _options; + ICommandLineOptionFactory _optionFactory; + ICommandLineParserEngine _parserEngine; + ICommandLineOptionFormatter _optionFormatter; + IHelpCommandLineOption _helpOption; + ICommandLineParserErrorFormatter _errorFormatter; + ICommandLineOptionValidator _optionValidator; + + /// + /// Gets or sets whether values that differ by case are considered different. + /// + public bool IsCaseSensitive + { + get { return StringComparison == CaseSensitiveComparison; } + set { StringComparison = value ? CaseSensitiveComparison : IgnoreCaseComparison; } + } + + /// + /// Gets the to use when matching values. + /// + internal StringComparison StringComparison { get; private set; } + + /// + /// Gets the list of Options + /// + public List Options + { + get { return _options ?? (_options = new List()); } + } + + /// + /// Gets or sets the default option formatter. + /// + public ICommandLineOptionFormatter OptionFormatter + { + get { return _optionFormatter ?? (_optionFormatter = new CommandLineOptionFormatter()); } + set { _optionFormatter = value; } + } + + /// + /// Gets or sets the default option formatter. + /// + public ICommandLineParserErrorFormatter ErrorFormatter + { + get { return _errorFormatter ?? (_errorFormatter = new CommandLineParserErrorFormatter()); } + set { _errorFormatter = value; } + } + + /// + /// Gets or sets the to use for creating . + /// + /// If this property is set to null then the default is returned. + public ICommandLineOptionFactory OptionFactory + { + get { return _optionFactory ?? (_optionFactory = new CommandLineOptionFactory()); } + set { _optionFactory = value; } + } + + /// + /// Gets or sets the used to validate each setup Option. + /// + public ICommandLineOptionValidator OptionValidator + { + get { return _optionValidator ?? (_optionValidator = new CommandLineOptionValidator(this)); } + set { _optionValidator = value; } + } + + /// + /// Gets or sets the to use for parsing the command line args. + /// + public ICommandLineParserEngine ParserEngine + { + get { return _parserEngine ?? (_parserEngine = new CommandLineParserEngineMark2()); } + set { _parserEngine = value; } + } + + /// + /// Gets or sets the option used for when help is detected in the command line args. + /// + public IHelpCommandLineOption HelpOption + { + get { return _helpOption ?? (_helpOption = new EmptyHelpCommandLineOption()); } + set { _helpOption = value; } + } + + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be null, empty or only whitespace. + /// The long name for the Option or null if not required. + /// + /// + /// A Option with the same name or name + /// already exists in the . + /// + public ICommandLineOptionFluent Setup(char shortOption, string longOption) + { +#if !NETCORE + return SetupInternal(shortOption.ToString(CultureInfo.InvariantCulture), longOption); +#else + return SetupInternal(shortOption.ToString(), longOption); +#endif + + } + + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name or name already exists in the . + /// + /// + /// Either or are not valid. must not be whitespace + /// or a control character. must not be null, empty or only whitespace. + /// + [Obsolete("Use new overload Setup(char, string) to specify both a short and long option name instead.")] + public ICommandLineOptionFluent Setup(string shortOption, string longOption) + { + return SetupInternal(shortOption, longOption); + } + + private ICommandLineOptionFluent SetupInternal(string shortOption, string longOption) + { + var argOption = this.OptionFactory.CreateOption(shortOption, longOption); + + if (argOption == null) + throw new InvalidOperationException("OptionFactory is producing unexpected results."); + + OptionValidator.Validate(argOption); + + this.Options.Add(argOption); + + return argOption; + } + + /// + /// Setup a new using the specified short Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// + /// + /// A Option with the same name already exists in the . + /// + public ICommandLineOptionFluent Setup(char shortOption) + { +#if !NETCORE + return SetupInternal(shortOption.ToString(CultureInfo.InvariantCulture), null); +#else + return SetupInternal(shortOption.ToString(), null); +#endif + } + + /// + /// Setup a new using the specified long Option name. + /// + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name already exists in the . + /// + public ICommandLineOptionFluent Setup(string longOption) + { + return SetupInternal(null, longOption); + } + + /// + /// Parses the specified T:System.String[] using the setup Options. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + public ICommandLineParserResult Parse(string[] args) + { + var parserEngineResult = this.ParserEngine.Parse(args); + var parsedOptions = parserEngineResult.ParsedOptions.ToList(); + + var result = new CommandLineParserResult { EmptyArgs = parsedOptions.IsNullOrEmpty() }; + + if (this.HelpOption.ShouldShowHelp(parsedOptions, StringComparison)) + { + result.HelpCalled = true; + this.HelpOption.ShowHelp(this.Options); + return result; + } + + foreach (var setupOption in this.Options) + { + /* + * Step 1. match the setup Option to one provided in the args by either long or short names + * Step 2. if the key has been matched then bind the value + * Step 3. if the key is not matched and it is required, then add a new error + * Step 4. the key is not matched and optional, bind the default value if available + */ + + // Step 1 + ICommandLineOption option = setupOption; + var match = parsedOptions.FirstOrDefault(pair => + pair.Key.Equals(option.ShortName, this.StringComparison) // tries to match the short name + || pair.Key.Equals(option.LongName, this.StringComparison)); // or else the long name + + if (match != null) // Step 2 + { + + try + { + option.Bind(match); + } + catch (OptionSyntaxException) + { + result.Errors.Add(new OptionSyntaxParseError(option, match)); + if (option.HasDefault) + option.BindDefault(); + } + + parsedOptions.Remove(match); + } + else + { + if (option.IsRequired) // Step 3 + result.Errors.Add(new ExpectedOptionNotFoundParseError(option)); + else if (option.HasDefault) + option.BindDefault(); // Step 4 + + result.UnMatchedOptions.Add(option); + } + } + + parsedOptions.ForEach(item => result.AdditionalOptionsFound.Add(new KeyValuePair(item.Key, item.Value))); + + result.ErrorText = ErrorFormatter.Format(result.Errors); + + return result; + } + + /// + /// Setup the help args. + /// + /// The help arguments to register. + public IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs) + { + var helpOption = this.OptionFactory.CreateHelpOption(helpArgs); + this.HelpOption = helpOption; + return helpOption; + } + + /// + /// Returns the Options that have been setup for this parser. + /// + IEnumerable IFluentCommandLineParser.Options + { + get { return Options; } + } + } +} diff --git a/Core/FluentCommandLineParser/FluentCommandLineParser.xproj b/Core/FluentCommandLineParser/FluentCommandLineParser.xproj new file mode 100644 index 0000000..7be6d5d --- /dev/null +++ b/Core/FluentCommandLineParser/FluentCommandLineParser.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 6caadcee-649e-4ed2-a7e6-bdb621776055 + FluentCommandLineParser + .\obj + .\bin\ + v4.5.2 + + + + 2.0 + + + diff --git a/Core/FluentCommandLineParser/FluentCommandLineParserT.cs b/Core/FluentCommandLineParser/FluentCommandLineParserT.cs new file mode 100644 index 0000000..5ec7821 --- /dev/null +++ b/Core/FluentCommandLineParser/FluentCommandLineParserT.cs @@ -0,0 +1,112 @@ +#region License +// FluentCommandLineParserT.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using Fclp.Internals; + +namespace Fclp +{ + /// + /// A command line parser which provides methods and properties + /// to easily and fluently parse command line arguments into + /// a predefined arguments object. + /// + /// The object type containing the argument properties to populate from parsed command line arguments. + public class FluentCommandLineParser : IFluentCommandLineParser where TBuildType : new() + { + /// + /// Gets the . + /// + public IFluentCommandLineParser Parser { get; private set; } + + /// + /// Gets the constructed object. + /// + public TBuildType Object { get; private set; } + + /// + /// Initialises a new instance of the class. + /// + public FluentCommandLineParser() + { + Object = new TBuildType(); + Parser = new FluentCommandLineParser(); + } + + /// + /// Sets up an Option for a write-able property on the type being built. + /// + public ICommandLineOptionBuilderFluent Setup(Expression> propertyPicker) + { + return new CommandLineOptionBuilderFluent(Parser, Object, propertyPicker); + } + + /// + /// Parses the specified T:System.String[] using the setup Options. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + public ICommandLineParserResult Parse(string[] args) + { + return Parser.Parse(args); + } + + /// + /// Setup the help args. + /// + /// The help arguments to register. + public IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs) + { + return Parser.SetupHelp(helpArgs); + } + + /// + /// Gets or sets whether values that differ by case are considered different. + /// + public bool IsCaseSensitive + { + get { return Parser.IsCaseSensitive; } + set { Parser.IsCaseSensitive = value; } + } + + /// + /// Gets or sets the option used for when help is detected in the command line args. + /// + public IHelpCommandLineOption HelpOption + { + get { return Parser.HelpOption; } + set { Parser.HelpOption = value; } + } + + /// + /// Returns the Options that have been setup for this parser. + /// + public IEnumerable Options + { + get { return Parser.Options; } + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs b/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs new file mode 100644 index 0000000..88fc507 --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs @@ -0,0 +1,68 @@ +#region License +// ICommandLineOptionBuilderFluent.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp +{ + /// + /// Defines the fluent interface for setting up a . + /// + public interface ICommandLineOptionBuilderFluent + { + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name or name already exists in the . + /// + /// + /// Either or are not valid. must not be whitespace + /// or a control character. must not be null, empty or only whitespace. + /// + ICommandLineOptionFluent As(char shortOption, string longOption); + + /// + /// Setup a new using the specified short Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// + /// if is invalid for a short option. + /// + /// A Option with the same name + /// already exists in the . + /// + ICommandLineOptionFluent As(char shortOption); + + /// + /// Setup a new using the specified long Option name. + /// + /// The long name for the Option. This must not be null, empty or only whitespace. + /// if is invalid for a long option. + /// + /// A Option with the same name already exists in the . + /// + ICommandLineOptionFluent As(string longOption); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs b/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs new file mode 100644 index 0000000..9d0a3b8 --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs @@ -0,0 +1,72 @@ +#region License +// ICommandLineOptionFluent.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; + +namespace Fclp +{ + /// + /// Provides the fluent interface for a object. + /// + public interface ICommandLineOptionFluent + { + /// + /// Adds the specified description to the . + /// + /// The representing the description to use. This should be localised text. + /// A . + ICommandLineOptionFluent WithDescription(string description); + + /// + /// Declares that this is required. + /// + /// A . + ICommandLineOptionFluent Required(); + + /// + /// Specifies the method to invoke when the . + /// is parsed. If a callback is not required either do not call it, or specify null. + /// Do no use this if you are using the Fluent Command Line Builder. + /// + /// The return callback to execute with the parsed value of the Option. + /// A . + ICommandLineOptionFluent Callback(Action callback); + + /// + /// Specifies the default value to use if no value is found whilst parsing this . + /// + /// The value to use. + /// A . + ICommandLineOptionFluent SetDefault(T value); + + /// + /// Specified the method to invoke with any addition arguments parsed with the Option. + /// If additional arguments are not required either do not call it, or specify null. + /// + /// The return callback to execute with the parsed addition arguments found for this Option. + /// A . + ICommandLineOptionFluent CaptureAdditionalArguments(Action> callback); + } +} diff --git a/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs b/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs new file mode 100644 index 0000000..e0034cf --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs @@ -0,0 +1,44 @@ +#region License +// ICommandLineOptionFormatter.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using Fclp.Internals; + +namespace Fclp +{ + /// + /// Represents a formatter used to display command line options to the user. + /// + public interface ICommandLineOptionFormatter + { + /// + /// Formats the list of to be displayed to the user. + /// + /// The list of to format. + /// A representing the format + /// If is null. + string Format(IEnumerable options); + } +} diff --git a/Core/FluentCommandLineParser/ICommandLineParserError.cs b/Core/FluentCommandLineParser/ICommandLineParserError.cs new file mode 100644 index 0000000..ca2ecdb --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineParserError.cs @@ -0,0 +1,39 @@ +#region License +// ICommandLineParserError.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using Fclp.Internals; + +namespace Fclp +{ + /// + /// Represents an error that has occurred whilst parsing a Option. + /// + public interface ICommandLineParserError + { + /// + /// Gets the this error belongs too. + /// + ICommandLineOption Option { get; } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs b/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs new file mode 100644 index 0000000..9ab6419 --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs @@ -0,0 +1,48 @@ +#region License +// ICommandLineParserErrorFormatter.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; + +namespace Fclp +{ + /// + /// Represents a formatter used to format parser errors for display to the end user. + /// + public interface ICommandLineParserErrorFormatter + { + /// + /// Formats the specified to a suitable for the end user. + /// + /// The error to format. This must not be null. + /// A describing the specified error. + string Format(ICommandLineParserError parserError); + + /// + /// Formats the specified list of to a suitable for the end user. + /// + /// The errors to format. + /// A describing the specified errors. + string Format(IEnumerable parserErrors); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineParserResult.cs b/Core/FluentCommandLineParser/ICommandLineParserResult.cs new file mode 100644 index 0000000..309dfc5 --- /dev/null +++ b/Core/FluentCommandLineParser/ICommandLineParserResult.cs @@ -0,0 +1,70 @@ +#region License +// ICommandLineParserResult.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; +using Fclp.Internals; + +namespace Fclp +{ + /// + /// Represents all the information gained from the result of a parse operation. + /// + public interface ICommandLineParserResult + { + /// + /// Gets whether the parse operation encountered any errors. + /// + bool HasErrors { get; } + + /// + /// Gets whether the help text was called. + /// + bool HelpCalled { get; } + + /// + /// Gets whether the parser was called with empty arguments. + /// + bool EmptyArgs { get; } + + /// + /// Gets any formatted error for this result. + /// + string ErrorText { get; } + + /// + /// Gets the errors which occurred during the parse operation. + /// + IEnumerable Errors { get; } + + /// + /// Contains a list of options that were specified in the args but not setup and therefore were not expected. + /// + IEnumerable> AdditionalOptionsFound { get; } + + /// + /// Contains all the setup options that were not matched during the parse operation. + /// + IEnumerable UnMatchedOptions { get; } + } +} diff --git a/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs b/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs new file mode 100644 index 0000000..739a872 --- /dev/null +++ b/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs @@ -0,0 +1,37 @@ +#region License +// IFluentCommandLineBuilderT.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp +{ + /// + /// Parser that constructs and populates the specified type of object from command line arguments. + /// + [Obsolete("IFluentCommandLineBuilder has been renamed to IFluentCommandLineParser", false)] + public interface IFluentCommandLineBuilder : IFluentCommandLineParser where TBuildType : new() + { + + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/IFluentCommandLineParser.cs b/Core/FluentCommandLineParser/IFluentCommandLineParser.cs new file mode 100644 index 0000000..cf623c9 --- /dev/null +++ b/Core/FluentCommandLineParser/IFluentCommandLineParser.cs @@ -0,0 +1,118 @@ +#region License +// IFluentCommandLineParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using Fclp.Internals; + +namespace Fclp +{ + /// + /// Represents a command line parser which provides methods and properties + /// to easily and fluently parse command line arguments. + /// + public interface IFluentCommandLineParser + { + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name or name already exists in the . + /// + /// + /// Either or are not valid. must not be whitespace + /// or a control character. must not be null, empty or only whitespace. + /// + ICommandLineOptionFluent Setup(char shortOption, string longOption); + + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name or name already exists in the . + /// + /// + /// Either or are not valid. must not be whitespace + /// or a control character. must not be null, empty or only whitespace. + /// + [Obsolete("Use new overload Setup(char, string) to specify both a short and long option name instead.")] + ICommandLineOptionFluent Setup(string shortOption, string longOption); + + /// + /// Setup a new using the specified short Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// + /// if is invalid for a short option. + /// + /// A Option with the same name + /// already exists in the . + /// + ICommandLineOptionFluent Setup(char shortOption); + + /// + /// Setup a new using the specified long Option name. + /// + /// The long name for the Option. This must not be null, empty or only whitespace. + /// if is invalid for a long option. + /// + /// A Option with the same name already exists in the . + /// + ICommandLineOptionFluent Setup(string longOption); + + /// + /// Setup the help args. + /// + /// The help arguments to register. + IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs); + + /// + /// Parses the specified T:System.String[] using the setup Options. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + ICommandLineParserResult Parse(string[] args); + + /// + /// Returns the Options that have been setup for this parser. + /// + IEnumerable Options { get; } + + /// + /// Gets or sets the help option for this parser. + /// + IHelpCommandLineOption HelpOption { get; set; } + + /// + /// Gets or sets whether values that differ by case are considered different. + /// + bool IsCaseSensitive { get; set; } + } +} diff --git a/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs b/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs new file mode 100644 index 0000000..3cd5443 --- /dev/null +++ b/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs @@ -0,0 +1,72 @@ +#region License +// IFluentCommandLineParserT.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using Fclp.Internals; + +namespace Fclp +{ + /// + /// A command line parser which provides methods and properties + /// to easily and fluently parse command line arguments into + /// a predefined arguments object. + /// + public interface IFluentCommandLineParser where TBuildType : new() + { + /// + /// Gets the constructed object. + /// + TBuildType Object { get; } + + /// + /// Sets up an Option for a write-able property on the type being built. + /// + ICommandLineOptionBuilderFluent Setup(Expression> propertyPicker); + + /// + /// Parses the specified T:System.String[] using the setup Options. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + ICommandLineParserResult Parse(string[] args); + + /// + /// Setup the help args. + /// + /// The help arguments to register. + IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs); + + /// + /// Gets or sets whether values that differ by case are considered different. + /// + bool IsCaseSensitive { get; set; } + + /// + /// Returns the Options that have been setup for this parser. + /// + IEnumerable Options { get; } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs b/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs new file mode 100644 index 0000000..c26ccf1 --- /dev/null +++ b/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs @@ -0,0 +1,80 @@ +#region License +// IHelpCommandLineOptionFluent.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp +{ + /// + /// Provides the fluent interface for setting up the help arguments. + /// + public interface IHelpCommandLineOptionFluent + { + /// + /// Specifies the method to invoke with the formatted command line options when any of the setup + /// help arguments are found. If a callback is not required either do not call it, or specify null. + /// + /// + /// The callback to execute with the formatted command line options. + /// + /// A . + /// + /// An example use of this would be to write the provided containing the formatted + /// options directly to the console. If you would like to use a custom formatter you can do so by providing + /// one using the method. + /// + IHelpCommandLineOptionFluent Callback(Action callback); + + /// + /// Specified the method to invoke when any of the setup help arguments are found. If a callback is not required + /// either do not call it, or specified null. + /// + /// + /// The callback to execute. If you have also setup the other help callback this will be called last. + /// + /// A . + IHelpCommandLineOptionFluent Callback(Action callback); + + /// + /// Registers a custom to use to generate the help text. + /// + /// The custom formatter to use. This must not be null. + /// A . + IHelpCommandLineOptionFluent WithCustomFormatter(ICommandLineOptionFormatter formatter); + + /// + /// Provides a custom header to be printed before the registered options. + /// + /// The header to use. + /// A . + IHelpCommandLineOptionFluent WithHeader(string header); + + /// + /// Specifies that if empty arguments are found then the behaviour should be the same as when any help arguments + /// are found. + /// + /// A . + IHelpCommandLineOptionFluent UseForEmptyArgs(); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOption.cs b/Core/FluentCommandLineParser/Internals/CommandLineOption.cs new file mode 100644 index 0000000..62ce2f4 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/CommandLineOption.cs @@ -0,0 +1,254 @@ +#region License +// CommandLineOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +#if !FEATURE_LEGACY_REFLECTION_API +using System.Reflection; +#endif +using Fclp.Internals.Extensions; +using Fclp.Internals.Parsing; +using Fclp.Internals.Parsing.OptionParsers; + +namespace Fclp.Internals +{ + /// + /// A command line Option + /// + /// The type of value this Option requires. + public class CommandLineOption : ICommandLineOptionResult + { +#region Constructors + + /// + /// Initialises a new instance of the class. + /// + /// The short name for this Option or null if not required. Either or must not be null, empty or contain only whitespace. + /// The long name for this Option or null if not required. Either or must not be null, empty or contain only whitespace. + /// The parser to use for this Option. + /// Thrown if both and are null, empty or contain only whitespace. + /// If is null. + public CommandLineOption(string shortName, string longName, ICommandLineOptionParser parser) + { + if (parser == null) throw new ArgumentNullException("parser"); + + this.ShortName = shortName; + this.LongName = longName; + this.Parser = parser; + } + +#endregion + +#region Properties + + /// + /// + /// Gets or sets the parser to use for this . + /// + ICommandLineOptionParser Parser { get; set; } + + /// + /// Gets the description set for this . + /// + public string Description { get; set; } + + internal Action ReturnCallback { get; set; } + + internal Action> AdditionalArgumentsCallback { get; set; } + + internal T Default { get; set; } + + /// + /// Gets whether this is required. + /// + public bool IsRequired { get; set; } + + /// + /// Gets the short name of this . + /// + public string ShortName { get; set; } + + /// + /// Gets the long name of this . + /// + public string LongName { get; set; } + + /// + /// Gets whether this has a default value setup. + /// + public bool HasDefault { get; set; } + + /// + /// Gets the setup for this option. + /// + public Type SetupType + { + get + { + var type = typeof (T); + +#if FEATURE_LEGACY_REFLECTION_API + var genericArgs = type.GetGenericArguments(); +#else + var genericArgs = type.GetTypeInfo().GetGenericArguments(); +#endif + return genericArgs.Any() ? genericArgs.First() : type; + } + } + + /// + /// Gets whether this has a long name. + /// + public bool HasLongName + { + get { return this.LongName.IsNullOrWhiteSpace() == false; } + } + + /// + /// Gets whether this has a short name. + /// + public bool HasShortName + { + get { return this.ShortName.IsNullOrWhiteSpace() == false; } + } + + /// + /// Gets whether this has a callback setup. + /// + public bool HasCallback + { + get { return this.ReturnCallback != null; } + } + + /// + /// Gets whether this has an additional arguments callback setup. + /// + public bool HasAdditionalArgumentsCallback + { + get { return this.AdditionalArgumentsCallback != null; } + } + +#endregion Properties + +#region Methods + + /// + /// Binds the specified to the Option. + /// + /// The to bind. + public void Bind(ParsedOption value) + { + if (this.Parser.CanParse(value) == false) throw new OptionSyntaxException(); + + this.Bind(this.Parser.Parse(value)); + + this.BindAnyAdditionalArgs(value); + } + + /// + /// Binds the default value for this if available. + /// + public void BindDefault() + { + if (this.HasDefault) + this.Bind(this.Default); + } + + void Bind(T value) + { + if (this.HasCallback) + this.ReturnCallback(value); + } + + void BindAnyAdditionalArgs(ParsedOption option) + { + if (!this.HasAdditionalArgumentsCallback) return; + + if (option.AdditionalValues.Any()) + { + this.AdditionalArgumentsCallback(option.AdditionalValues); + } + } + + /// + /// Adds the specified description to the . + /// + /// The representing the description to use. This should be localised text. + /// A . + public ICommandLineOptionFluent WithDescription(string description) + { + this.Description = description; + return this; + } + + /// + /// Declares that this is required and a value must be specified to fulfil it. + /// + /// A . + public ICommandLineOptionFluent Required() + { + this.IsRequired = true; + return this; + } + + /// + /// Specifies the method to invoke when the . + /// is parsed. If a callback is not required either do not call it, or specify null. + /// + /// The return callback to execute with the parsed value of the Option. + /// A . + public ICommandLineOptionFluent Callback(Action callback) + { + this.ReturnCallback = callback; + return this; + } + + /// + /// Specifies the default value to use if no value is found whilst parsing this . + /// + /// The value to use. + /// A . + public ICommandLineOptionFluent SetDefault(T value) + { + this.Default = value; + this.HasDefault = true; + return this; + } + + /// + /// Specified the method to invoke with any addition arguments parsed with the Option. + /// If additional arguments are not required either do not call it, or specify null. + /// + /// The return callback to execute with the parsed addition arguments found for this Option. + /// A . + public ICommandLineOptionFluent CaptureAdditionalArguments(Action> callback) + { + this.AdditionalArgumentsCallback = callback; + return this; + } + +#endregion Methods + } +} diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs new file mode 100644 index 0000000..5692001 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs @@ -0,0 +1,113 @@ +#region License +// CommandLineOptionBuilderFluent.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Linq.Expressions; +using System.Reflection; + +namespace Fclp.Internals +{ + /// + /// Wraps the Setup call of the fluent command line parser and defines the callback to setup the property parsed value. + /// + /// The type of object being populated. + /// The type of the property the value will be assigned too. + public class CommandLineOptionBuilderFluent : ICommandLineOptionBuilderFluent + { + private readonly IFluentCommandLineParser _parser; + private readonly TBuildType _buildObject; + private readonly Expression> _propertyPicker; + + /// + /// Initializes a new instance of the class. + /// + /// The parser. + /// The build object. + /// The property picker. + public CommandLineOptionBuilderFluent( + IFluentCommandLineParser parser, + TBuildType buildObject, + Expression> propertyPicker) + { + _parser = parser; + _buildObject = buildObject; + _propertyPicker = propertyPicker; + } + + /// + /// Setup a new using the specified short and long Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// The long name for the Option. This must not be null, empty or only whitespace. + /// + /// + /// A Option with the same name or name already exists in the . + /// + /// + /// Either or are not valid. must not be whitespace + /// or a control character. must not be null, empty or only whitespace. + /// + public ICommandLineOptionFluent As(char shortOption, string longOption) + { + return _parser.Setup(shortOption, longOption) + .Callback(AssignValueToPropertyCallback); + } + + /// + /// Setup a new using the specified short Option name. + /// + /// The short name for the Option. This must not be whitespace or a control character. + /// + /// if is invalid for a short option. + /// + /// A Option with the same name + /// already exists in the . + /// + public ICommandLineOptionFluent As(char shortOption) + { + return _parser.Setup(shortOption) + .Callback(AssignValueToPropertyCallback); + } + + /// + /// Setup a new using the specified long Option name. + /// + /// The long name for the Option. This must not be null, empty or only whitespace. + /// if is invalid for a long option. + /// + /// A Option with the same name already exists in the . + /// + public ICommandLineOptionFluent As(string longOption) + { + return _parser.Setup(longOption) + .Callback(AssignValueToPropertyCallback); + } + + private void AssignValueToPropertyCallback(TProperty value) + { + var prop = (PropertyInfo)((MemberExpression)_propertyPicker.Body).Member; + prop.SetValue(_buildObject, value, null); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs new file mode 100644 index 0000000..b92da32 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs @@ -0,0 +1,71 @@ +#region License +// CommandLineOptionFactory.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using Fclp.Internals.Parsing; +using Fclp.Internals.Parsing.OptionParsers; + +namespace Fclp.Internals +{ + /// + /// Factory used to create command line Options + /// + public class CommandLineOptionFactory : ICommandLineOptionFactory + { + + ICommandLineOptionParserFactory _parserFactory; + + /// + /// Gets or sets the to use. + /// + /// If null a new instance of the will be returned. + public ICommandLineOptionParserFactory ParserFactory + { + get { return _parserFactory ?? (_parserFactory = new CommandLineOptionParserFactory()); } + set { _parserFactory = value; } + } + + /// + /// Creates a new . + /// + /// The type of to create. + /// The short name for this Option. This must not be null, empty or contain only whitespace. + /// The long name for this Option or null if not required. + /// Thrown if is null, empty or contains only whitespace. + /// A . + public ICommandLineOptionResult CreateOption(string shortName, string longName) + { + return new CommandLineOption(shortName, longName, this.ParserFactory.CreateParser()); + } + + /// + /// Create a new using the specified args. + /// + /// The args used to display the help option. + public IHelpCommandLineOptionResult CreateHelpOption(string[] helpArgs) + { + return new HelpCommandLineOption(helpArgs); + } + } +} diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs new file mode 100644 index 0000000..a52c932 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs @@ -0,0 +1,139 @@ +#region License +// CommandLineOptionFormatter.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals +{ + /// + /// Simple default formatter used to display command line options to the user. + /// + public class CommandLineOptionFormatter : ICommandLineOptionFormatter + { + #region Constructors + + /// + /// Initialises a new instance of the class. + /// + public CommandLineOptionFormatter() + { + this.ValueText = "Value"; + this.DescriptionText = "Description"; + this.NoOptionsText = "No options have been setup"; + } + + #endregion + + /// + /// The text format used in this formatter. + /// + public const string TextFormat = "\t{0}\t\t{1}\n"; + + /// + /// If true, outputs a header line above the option list. If false, the header is omitted. Default is true. + /// + private bool ShowHeader + { + get { return Header != null; } + } + + /// + /// Gets or sets the header to display before the printed options. + /// + public string Header { get; set; } + + /// + /// Gets or sets the text to use as Value header. This should be localised for the end user. + /// + public string ValueText { get; set; } + + /// + /// Gets or sets the text to use as the Description header. This should be localised for the end user. + /// + public string DescriptionText { get; set; } + + /// + /// Gets or sets the text to use when there are no options. This should be localised for the end user. + /// + public string NoOptionsText { get; set; } + + /// + /// Formats the list of to be displayed to the user. + /// + /// The list of to format. + /// A representing the format + /// If is null. + public string Format(IEnumerable options) + { + if (options == null) throw new ArgumentNullException("options"); + + var list = options.ToList(); + + if (!list.Any()) return this.NoOptionsText; + + var sb = new StringBuilder(); + sb.AppendLine(); + + // add headers first + if (ShowHeader) + { + sb.AppendLine(Header); + sb.AppendLine(); + } + + var ordered = (from option in list + orderby option.ShortName.IsNullOrWhiteSpace() == false descending , option.ShortName + select option).ToList(); + + foreach (var cmdOption in ordered) + sb.AppendFormat(CultureInfo.CurrentUICulture, TextFormat, FormatValue(cmdOption), cmdOption.Description); + + return sb.ToString(); + } + + /// + /// Formats the short and long names into one . + /// + static string FormatValue(ICommandLineOption cmdOption) + { + if (cmdOption.ShortName.IsNullOrWhiteSpace()) + { + return cmdOption.LongName; + } + + if (cmdOption.LongName.IsNullOrWhiteSpace()) + { + return cmdOption.ShortName; + } + + return cmdOption.ShortName + ":" + cmdOption.LongName; + } + // string = [-|/]f[:|=| ]|[-|/|--]filename[:|=| ] value + } +} diff --git a/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs new file mode 100644 index 0000000..382c310 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs @@ -0,0 +1,55 @@ +#region License +// EmptyHelpCommandLineOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using Fclp.Internals.Parsing; + +namespace Fclp.Internals +{ + /// + /// Help command line options used when there have been non setup. + /// + public class EmptyHelpCommandLineOption : IHelpCommandLineOption + { + /// + /// Always returns false. + /// + /// The command line args. + /// Type of the comparison. + /// + public bool ShouldShowHelp(IEnumerable commandLineArgs, StringComparison comparisonType) + { + return false; + } + + /// + /// Not supported. + /// + public void ShowHelp(IEnumerable options) + { + throw new NotSupportedException(); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs b/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs new file mode 100644 index 0000000..6855d03 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs @@ -0,0 +1,50 @@ +#region License +// CommandLineParserErrorBase.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp.Internals.Errors +{ + /// + /// Contains error information regarding a failed parsing of a Option. + /// + public abstract class CommandLineParserErrorBase : ICommandLineParserError + { + /// + /// Initialises a new instance of the class. + /// + /// The this error relates too. This must not be null. + /// If is null. + protected CommandLineParserErrorBase(ICommandLineOption cmdOption) + { + if (cmdOption == null) throw new ArgumentNullException("cmdOption"); + this.Option = cmdOption; + } + + /// + /// Gets the this error belongs too. + /// + public virtual ICommandLineOption Option { get; private set; } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs b/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs new file mode 100644 index 0000000..3c27b6f --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs @@ -0,0 +1,44 @@ +#region License +// ExpectedOptionNotFoundParseError.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp.Internals.Errors +{ + /// + /// Represents a parse error that has occurred because an expected Option was not found. + /// + public class ExpectedOptionNotFoundParseError : CommandLineParserErrorBase + { + /// + /// Initialises a new instance of the class. + /// + /// The this error relates too. This must not be null. + /// If is null. + public ExpectedOptionNotFoundParseError(ICommandLineOption cmdOption) : + base(cmdOption) + { + } + } +} diff --git a/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs b/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs new file mode 100644 index 0000000..67046b9 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs @@ -0,0 +1,70 @@ +#region License +// OptionSyntaxParseError.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using Fclp.Internals.Parsing; + +namespace Fclp.Internals.Errors +{ + /// + /// Represents a parse error that has occurred because the syntax was in an unexpected format. + /// + public class OptionSyntaxParseError : CommandLineParserErrorBase + { + /// + /// Gets the parsed option that caused the error. + /// + public ParsedOption ParsedOption { get; private set; } + + /// + /// Initialises a new instance of the class. + /// + /// The this error relates too. This must not be null. + /// The parsed option that caused the error. + /// If is null. + public OptionSyntaxParseError(ICommandLineOption cmdOption, ParsedOption parsedOption) : + base(cmdOption) + { + ParsedOption = parsedOption; + } + } + + /// + /// + /// + public class UnexpectedValueParseError : CommandLineParserErrorBase + { + /// + /// Initialises a new instance of the class. + /// + /// The this error relates too. This must not be null. + /// If is null. + public UnexpectedValueParseError(ICommandLineOption cmdOption) : + base(cmdOption) + { + } + + + } +} diff --git a/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs b/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs new file mode 100644 index 0000000..c610aab --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs @@ -0,0 +1,162 @@ +#region License +// UsefulExtension.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Fclp.Internals.Extensions +{ + /// + /// Contains some simple extension methods that are useful throughout the library. + /// + public static class UsefulExtension + { + /// + /// Indicates whether the specified is null, empty or contains only whitespace. + /// + /// + /// + /// This method mimics the String.IsNullOrWhiteSpace method available in .Net 4 framework. + public static bool IsNullOrWhiteSpace(this string value) + { + return string.IsNullOrEmpty(value) || string.IsNullOrEmpty(value.Trim()); + } + + /// + /// Indicates whether the specified is null or contains no elements. + /// + /// A to check. + /// true if is null or contains no elements; otherwise false. + public static bool IsNullOrEmpty(this IEnumerable enumerable) + { + return enumerable == null || enumerable.Any() == false; + } + + /// + /// Performs the specified action on each element of the . + /// + /// + /// A to iterate through all the available elements. + /// The delegate to execute with on each element of the specified . + /// if is null. + public static void ForEach(this IEnumerable enumerable, Action action) + { + foreach (var item in enumerable) + { + action(item); + } + } + + /// + /// Indicates whether the specified contains whitespace. + /// + /// The to examine. + /// true if contains at least one whitespace char; otherwise false. + public static bool ContainsWhitespace(this string value) + { + return string.IsNullOrEmpty(value) == false && value.Contains(" "); + } + + /// + /// Wraps the specified in double quotes. + /// + public static string WrapInDoubleQuotes(this string str) + { + return string.Format(@"""{0}""", str); + } + + /// + /// Removes and double quotes wrapping the specified . + /// + public static string RemoveAnyWrappingDoubleQuotes(this string str) + { + return str.IsNullOrWhiteSpace() + ? str + : str.TrimStart('"').TrimEnd('"'); + } + + /// + /// Wraps the specified in double quotes if it contains at least one whitespace character. + /// + /// The to examine and wrap. + public static string WrapInDoubleQuotesIfContainsWhitespace(this string str) + { + return str.ContainsWhitespace() && str.IsWrappedInDoubleQuotes() == false + ? str.WrapInDoubleQuotes() + : str; + } + + /// + /// Determines whether the specified starts and ends with a double quote. + /// + /// The to examine. + /// true if is wrapped in double quotes; otherwise false. + public static bool IsWrappedInDoubleQuotes(this string str) + { + return str.IsNullOrWhiteSpace() == false && str.StartsWith("\"") && str.EndsWith("\""); + } + + /// + /// Splits the specified when each whitespace char is encountered into a collection of substrings. + /// + /// The to split. + /// A collection of substrings taken from . + /// If the whitespace is wrapped in double quotes then it is ignored. + public static IEnumerable SplitOnWhitespace(this string value) + { + if (string.IsNullOrEmpty(value)) return null; + + char[] parmChars = value.ToCharArray(); + + bool inDoubleQuotes = false; + + for (int index = 0; index < parmChars.Length; index++) + { + if (parmChars[index] == '"') + inDoubleQuotes = !inDoubleQuotes; + + if (!inDoubleQuotes && parmChars[index] == ' ') + parmChars[index] = '\n'; + } + + return (new string(parmChars)).Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); + } + + /// + /// Elements at or default. + /// + /// + /// The items. + /// The index. + /// The default to use. + /// + public static T ElementAtOrDefault(this T[] items, int index, T defaultToUse) + { + return index >= 0 && index < items.Length + ? items[index] + : defaultToUse; + } + } +} diff --git a/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs new file mode 100644 index 0000000..71678f0 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs @@ -0,0 +1,174 @@ +#region License +// HelpCommandLineOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using Fclp.Internals.Parsing; + +namespace Fclp.Internals +{ + /// + /// Represents a command line option that determines whether to show the help text. + /// + public class HelpCommandLineOption : IHelpCommandLineOptionResult + { + ICommandLineOptionFormatter _optionFormatter; + + /// + /// Initialises a new instance of class. + /// + /// The registered help arguments. + public HelpCommandLineOption(IEnumerable helpArgs) + { + HelpArgs = helpArgs ?? new List(); + } + + /// + /// Gets the registered help arguments. + /// + public IEnumerable HelpArgs { get; private set; } + + /// + /// Gets or sets the callback method. + /// + internal Action ReturnCallback { get; set; } + + private Action ReturnCallbackWithoutParser { get; set; } + + private bool ShouldUseForEmptyArgs { get; set; } + + /// + /// Gets or sets any header to display at the top of the printed options. + /// + public string Header { get; set; } + + /// + /// Gets or sets the to use to format the options. + /// + public ICommandLineOptionFormatter OptionFormatter + { + get { return _optionFormatter ?? (_optionFormatter = new CommandLineOptionFormatter { Header = this.Header }); } + set { _optionFormatter = value; } + } + + /// + /// Specifies the method to invoke with the formatted command line options when any of the setup + /// help arguments are found. If a callback is not required either do not call it, or specify null. + /// + /// + /// The callback to execute with the formatted command line options. + /// + /// A . + public IHelpCommandLineOptionFluent Callback(Action callback) + { + ReturnCallback = callback; + return this; + } + + /// + /// Specified the method to invoke when any of the setup help arguments are found. If a callback is not required + /// either do not call it, or specified null. + /// + /// + /// The callback to execute. If you have also setup the other help callback this will be called last. + /// + /// A . + public IHelpCommandLineOptionFluent Callback(Action callback) + { + ReturnCallbackWithoutParser = callback; + return this; + } + + /// + /// Registers a custom to use to generate the help text. + /// + /// The custom formatter to use. This must not be null. + public IHelpCommandLineOptionFluent WithCustomFormatter(ICommandLineOptionFormatter formatter) + { + this.OptionFormatter = formatter; + return this; + } + + + /// + /// Provides a custom header to be printed before the registered options. + /// + /// The header to use. + public IHelpCommandLineOptionFluent WithHeader(string header) + { + this.Header = header; + return this; + } + + /// + /// Specifies that if empty arguments are found then the behaviour should be the same as when any help arguments + /// are found. + /// + /// A . + public IHelpCommandLineOptionFluent UseForEmptyArgs() + { + this.ShouldUseForEmptyArgs = true; + return this; + } + + /// + /// Determines whether the help text should be shown. + /// + /// The parsed command line arguments + /// The type of comparison to use when comparing Option names. + /// + /// true if the parser operation should cease and should be called; otherwise false if the parse operation to continue. + /// + public bool ShouldShowHelp(IEnumerable parsedOptions, StringComparison comparisonType) + { + var parsed = parsedOptions != null ? parsedOptions.ToList() : new List(); + + if (parsed.Any() == false && ShouldUseForEmptyArgs) + { + return true; + } + + return this.HelpArgs.Any(helpArg => parsed.Any(cmdArg => helpArg.Equals(cmdArg.Key, comparisonType))); + } + + /// + /// Shows the help text for the specified registered options. + /// + /// The options to generate the help text for. + public void ShowHelp(IEnumerable options) + { + if (ReturnCallback != null) + { + var formattedOutput = this.OptionFormatter.Format(options); + this.ReturnCallback(formattedOutput); + } + + if (ReturnCallbackWithoutParser != null) + { + this.ReturnCallbackWithoutParser(); + } + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs new file mode 100644 index 0000000..b7b6e78 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs @@ -0,0 +1,96 @@ +#region License +// ICommandLineOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using Fclp.Internals.Parsing; + +namespace Fclp.Internals +{ + /// + /// Represents a setup command line Option + /// + public interface ICommandLineOption + { + /// + /// Gets whether this is required. + /// + bool IsRequired { get; } + + /// + /// Gets the description set for this . + /// + string Description { get; } + + /// + /// Binds the specified to this . + /// + /// The to bind. + void Bind(ParsedOption value); + + /// + /// Binds the default value for this if available. + /// + void BindDefault(); + + /// + /// Gets the short name of this . + /// + string ShortName { get; } + + /// + /// Gets the long name of this . + /// + string LongName { get; } + + /// + /// Gets whether this has a long name. + /// + bool HasLongName { get; } + + /// + /// Gets whether this has a short name. + /// + bool HasShortName { get; } + + /// + /// Gets whether this has a callback setup. + /// + bool HasCallback { get; } + + /// + /// Gets whether this has an additional arguments callback setup. + /// + bool HasAdditionalArgumentsCallback { get; } + + /// + /// Gets whether this has a default value setup. + /// + bool HasDefault { get; } + + /// + /// Gets the setup for this option. + /// + Type SetupType { get; } + } +} diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs new file mode 100644 index 0000000..a76443c --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs @@ -0,0 +1,50 @@ +#region License +// ICommandLineOptionFactory.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp.Internals +{ + /// + /// Represents a factory capable of creating command line Options. + /// + public interface ICommandLineOptionFactory + { + /// + /// Creates a new . + /// + /// The type of to create. + /// The short name for this Option. This must not be null, empty or contain only whitespace. + /// The long name for this Option or null if not required. + /// Thrown if is null, empty or contains only whitespace. + /// A . + ICommandLineOptionResult CreateOption(string shortName, string longName); + + /// + /// Create a new using the specified args. + /// + /// The args used to display the help option. + IHelpCommandLineOptionResult CreateHelpOption(string[] helpArgs); + } +} diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs new file mode 100644 index 0000000..753d4b5 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs @@ -0,0 +1,34 @@ +#region License +// ICommandLineOptionResult.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals +{ + /// + /// Used to encapsulate both command Option interfaces which are returned from the factory. + /// + /// The type of Option. + public interface ICommandLineOptionResult : ICommandLineOption, ICommandLineOptionFluent + { + + } +} diff --git a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs new file mode 100644 index 0000000..9c58573 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs @@ -0,0 +1,50 @@ +#region License +// IHelpCommandLineOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using Fclp.Internals.Parsing; + +namespace Fclp.Internals +{ + /// + /// Represents a command line option that determines whether to show the help text. + /// + public interface IHelpCommandLineOption + { + /// + /// Determines whether the help text should be shown. + /// + /// The parsed command line arguments + /// The type of comparison to use when comparing Option names. + /// true if the parser operation should cease and should be called; otherwise false if the parse operation to continue. + bool ShouldShowHelp(IEnumerable parsedOptions, StringComparison comparisonType); + + /// + /// Shows the help text for the specified registered options. + /// + /// The options to generate the help text for. + void ShowHelp(IEnumerable options); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs new file mode 100644 index 0000000..60ee4da --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs @@ -0,0 +1,33 @@ +#region License +// IHelpCommandLineOptionResult.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals +{ + /// + /// Used to encapsulate both help command option interfaces which are returned from the factory. + /// + public interface IHelpCommandLineOptionResult : IHelpCommandLineOption, IHelpCommandLineOptionFluent + { + + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs new file mode 100644 index 0000000..d2303f1 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs @@ -0,0 +1,148 @@ +#region License +// CommandLineOptionGrouper.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing +{ + /// + /// Organises arguments into group defined by their associated Option. + /// + public class CommandLineOptionGrouper + { + private string[] _args; + private int _currentOptionLookupIndex; + private int[] _foundOptionLookup; + private int _currentOptionIndex; + + /// + /// Groups the specified arguments by the associated Option. + /// + public string[][] GroupArgumentsByOption(string[] args) + { + if (args.IsNullOrEmpty()) return new string[0][]; + + _args = args; + + _currentOptionIndex = -1; + _currentOptionLookupIndex = -1; + FindOptionIndexes(); + + var options = new List(); + + if (this.ArgsContainsOptions() == false) + { + options.Add(this.CreateGroupForCurrent()); + } + else + { + while (MoveToNextOption()) + { + options.Add(CreateGroupForCurrent()); + } + } + + return options.ToArray(); + } + + private string[] CreateGroupForCurrent() + { + var optionEndIndex = LookupTheNextOptionIndex(); + + optionEndIndex = optionEndIndex != -1 + ? optionEndIndex - 1 + : _args.Length - 1; + + var length = optionEndIndex - (_currentOptionIndex - 1); + + return _args.Skip(_currentOptionIndex) + .Take(length) + .ToArray(); + } + + private void FindOptionIndexes() + { + var indexes = new List(); + + for (int index = 0; index < _args.Length; index++) + { + string currentArg = _args[index]; + + if (IsEndOfOptionsKey(currentArg)) break; + if (IsAKey(currentArg) == false) continue; + + indexes.Add(index); + } + + _foundOptionLookup = indexes.ToArray(); + } + + private bool ArgsContainsOptions() + { + return _foundOptionLookup.Any(); + } + + private bool MoveToNextOption() + { + var nextIndex = LookupTheNextOptionIndex(); + if (nextIndex == -1) return false; + + _currentOptionLookupIndex += 1; + _currentOptionIndex = nextIndex; + + return true; + } + + private int LookupTheNextOptionIndex() + { + return _foundOptionLookup.ElementAtOrDefault(_currentOptionLookupIndex + 1, -1); + } + + /// + /// Gets whether the specified is a Option key. + /// + /// The to examine. + /// true if is a Option key; otherwise false. + static bool IsAKey(string arg) + { + return arg != null && SpecialCharacters.OptionPrefix.Any(arg.StartsWith); + } + + /// + /// Determines whether the specified string indicates the end of parsed options. + /// + static bool IsEndOfOptionsKey(string arg) + { +#if !NETCORE + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); +#else + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); +#endif + + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs new file mode 100644 index 0000000..2cc4e98 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs @@ -0,0 +1,154 @@ +#region License +// CommandLineParserEngineMark2.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing +{ + /// + /// More advanced parser for transforming command line arguments into appropriate . + /// + public class CommandLineParserEngineMark2 : ICommandLineParserEngine + { + private readonly List _additionalArgumentsFound = new List(); + private readonly List _parsedOptions = new List(); + private readonly OptionArgumentParser _optionArgumentParser = new OptionArgumentParser(); + + /// + /// Parses the specified T:System.String[] into appropriate objects.. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + public ParserEngineResult Parse(string[] args) + { + args = args ?? new string[0]; + + var grouper = new CommandLineOptionGrouper(); + + foreach (var optionGroup in grouper.GroupArgumentsByOption(args)) + { + string rawKey = optionGroup.First(); + ParseGroupIntoOption(rawKey, optionGroup.Skip(1)); + } + + return new ParserEngineResult(_parsedOptions, _additionalArgumentsFound); + } + + private void ParseGroupIntoOption(string rawKey, IEnumerable optionGroup) + { + if (IsAKey(rawKey)) + { + var parsedOption = ParsedOptionFactory.Create(rawKey); + + TrimSuffix(parsedOption); + + _optionArgumentParser.ParseArguments(optionGroup, parsedOption); + + AddParsedOptionToList(parsedOption); + } + else + { + AddAdditionArgument(rawKey); + optionGroup.ForEach(AddAdditionArgument); + } + } + + private void AddParsedOptionToList(ParsedOption parsedOption) + { + if (ShortOptionNeedsToBeSplit(parsedOption)) + { + _parsedOptions.AddRange(CloneAndSplit(parsedOption)); + } + else + { + _parsedOptions.Add(parsedOption); + } + } + + private void AddAdditionArgument(string argument) + { + if (IsEndOfOptionsKey(argument) == false) + { + _additionalArgumentsFound.Add(argument); + } + } + + private static bool ShortOptionNeedsToBeSplit(ParsedOption parsedOption) + { + return PrefixIsShortOption(parsedOption.Prefix) && parsedOption.Key.Length > 1; + } + + private static IEnumerable CloneAndSplit(ParsedOption parsedOption) + { + return parsedOption.Key.Select(c => Clone(parsedOption, c)).ToList(); + } + + private static ParsedOption Clone(ParsedOption toClone, char c) + { + var clone = toClone.Clone(); + clone.Key = new string(new[] { c }); + return clone; + } + + private static bool PrefixIsShortOption(string key) + { + return SpecialCharacters.ShortOptionPrefix.Contains(key); + } + + private static void TrimSuffix(ParsedOption parsedOption) + { + if (parsedOption.HasSuffix) + { + parsedOption.Key = parsedOption.Key.TrimEnd(parsedOption.Suffix.ToCharArray()); + } + } + + /// + /// Gets whether the specified is a Option key. + /// + /// The to examine. + /// true if is a Option key; otherwise false. + static bool IsAKey(string arg) + { // TODO: push related special char operations into there own object + return arg != null + && SpecialCharacters.OptionPrefix.Any(arg.StartsWith) + && SpecialCharacters.OptionPrefix.Any(arg.Equals) == false; + } + + /// + /// Determines whether the specified string indicates the end of parsed options. + /// + static bool IsEndOfOptionsKey(string arg) + { +#if !NETCORE + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); +#else + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); +#endif + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs new file mode 100644 index 0000000..84e7bd4 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs @@ -0,0 +1,107 @@ +#region License +// CommandLineParserResult.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; +using System.Linq; + +namespace Fclp.Internals.Parsing +{ + /// + /// Contains all information about the result of a parse operation. + /// + public class CommandLineParserResult : ICommandLineParserResult + { + /// + /// Initialises a new instance of the class. + /// + public CommandLineParserResult() + { + this.Errors = new List(); + this.AdditionalOptionsFound = new List>(); + this.UnMatchedOptions = new List(); + } + + /// + /// Gets whether the parse operation encountered any errors or the help text was shown. + /// + public bool HasErrors + { + get { return this.Errors.Any(); } + } + + /// + /// + /// + internal IList Errors { get; set; } + + /// + /// Gets the errors which occurred during the parse operation. + /// + IEnumerable ICommandLineParserResult.Errors + { + get { return this.Errors; } + } + + /// + /// Contains a list of options that were specified in the args but not setup and therefore were not expected. + /// + IEnumerable> ICommandLineParserResult.AdditionalOptionsFound + { + get { return this.AdditionalOptionsFound; } + } + + /// + /// Contains a list of options that were specified in the args but not setup and therefore were not expected. + /// + public IList> AdditionalOptionsFound { get; set; } + + /// + /// Contains all the setup options that were not matched during the parse operation. + /// + IEnumerable ICommandLineParserResult.UnMatchedOptions + { + get { return this.UnMatchedOptions; } + } + + /// + /// Contains all the setup options that were not matched during the parse operation. + /// + public IList UnMatchedOptions { get; set; } + + /// + /// Gets whether the help text was called. + /// + public bool HelpCalled { get; set; } + + /// + /// Gets whether the parser was called with empty arguments. + /// + public bool EmptyArgs { get; set; } + + /// + /// Gets or sets the formatted error for this result. + /// + public string ErrorText { get; set; } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs new file mode 100644 index 0000000..a3e6632 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs @@ -0,0 +1,42 @@ +#region License +// ICommandLineOptionParserFactory.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using Fclp.Internals.Parsing.OptionParsers; + +namespace Fclp.Internals.Parsing +{ + /// + /// Represents a factory capable of creating . + /// + public interface ICommandLineOptionParserFactory + { + /// + /// Creates a to handle the specified type. + /// + /// The type of parser to create. + /// A suitable for the specified type. + /// If the specified type is not supported by this factory. + ICommandLineOptionParser CreateParser(); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs new file mode 100644 index 0000000..da08938 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs @@ -0,0 +1,39 @@ +#region License +// ICommandLineParserEngine.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +namespace Fclp.Internals.Parsing +{ + /// + /// Responsible for parsing command line arguments into simple key and value pairs. + /// + public interface ICommandLineParserEngine + { + /// + /// Parses the specified T:System.String[] into key value pairs. + /// + /// The T:System.String[] to parse. + /// An representing the results of the parse operation. + ParserEngineResult Parse(string[] args); + } +} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs new file mode 100644 index 0000000..583d8d2 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs @@ -0,0 +1,101 @@ +#region License +// OptionArgumentParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing +{ + /// + /// + /// + public class OptionArgumentParser + { + /// + /// Parses the values. + /// + /// The args. + /// The option. + public void ParseArguments(IEnumerable args, ParsedOption option) + { + if (SpecialCharacters.ValueAssignments.Any(option.Key.Contains)) + { + TryGetArgumentFromKey(option); + } + + var allArguments = new List(); + var additionalArguments = new List(); + + var otherArguments = CollectArgumentsUntilNextKey(args).ToList(); + + if (option.HasValue) allArguments.Add(option.Value); + + if (otherArguments.Any()) + { + allArguments.AddRange(otherArguments); + + if (otherArguments.Count() > 1) + { + additionalArguments.AddRange(otherArguments); + additionalArguments.RemoveAt(0); + } + } + + option.Value = allArguments.FirstOrDefault(); + option.Values = allArguments.ToArray(); + option.AdditionalValues = additionalArguments.ToArray(); + } + + private static void TryGetArgumentFromKey(ParsedOption option) + { + var split = option.Key.Split(SpecialCharacters.ValueAssignments, 2, StringSplitOptions.RemoveEmptyEntries); + + option.Key = split[0]; + option.Value = split.Length > 1 + ? split[1].WrapInDoubleQuotesIfContainsWhitespace() + : null; + } + + static IEnumerable CollectArgumentsUntilNextKey(IEnumerable args) + { + return from argument in args + where !IsEndOfOptionsKey(argument) + select argument.WrapInDoubleQuotesIfContainsWhitespace(); + } + + /// + /// Determines whether the specified string indicates the end of parsed options. + /// + static bool IsEndOfOptionsKey(string arg) + { +#if !NETCORE + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); +#else + return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); +#endif + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs new file mode 100644 index 0000000..02dabaa --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs @@ -0,0 +1,111 @@ +#region License +// BoolCommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Linq; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + /// For types the value is optional. If no value is provided for the Option then true is returned. + public class BoolCommandLineOptionParser : ICommandLineOptionParser + { + /// + /// The recognised false argument values. + /// + private static readonly string[] recognisedFalseArgs = new[] { "off", "0" }; + + /// + /// The recognised true argument values (use these values to set a boolean arg to true) + /// + private static readonly string[] recognisedTrueArgs = new[] { "on", "1" }; + + /// + /// Parses the specified into a . + /// + /// + /// + /// A representing the parsed value. + /// The value is optional. If no value is provided then true is returned. + /// + public bool Parse(ParsedOption parsedOption) + { + if (parsedOption.Value.IsNullOrWhiteSpace()) + { + // for the suffix: + // "-" means the value should be false + // "+" or any other suffix means the value should be true. + // if we don't have a + return parsedOption.HasSuffix == false || parsedOption.Suffix != "-"; + } + + bool result; + TryParse(parsedOption, out result); + return result; + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + // if the key exists with no value then this translates as true. + // if the key exists but has a value then we must try to parse the value + bool result; + return TryParse(parsedOption, out result); + } + + private bool TryParse(ParsedOption parsedOption, out bool result) + { + if (parsedOption.Value.IsNullOrWhiteSpace()) + { + // for the suffix: + // "-" means the value should be false + // "+" or any other suffix means the value should be true. + // if we don't have a + result = parsedOption.HasSuffix == false || parsedOption.Suffix != "-"; + return true; + } + + if (recognisedTrueArgs.Contains(parsedOption.Value, StringComparer.OrdinalIgnoreCase)) + { + result = true; + return true; + } + + if (recognisedFalseArgs.Contains(parsedOption.Value, StringComparer.OrdinalIgnoreCase)) + { + result = false; + return true; + } + + return bool.TryParse(parsedOption.Value, out result); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs new file mode 100644 index 0000000..b9d91b7 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs @@ -0,0 +1,231 @@ +#region License +// CommandLineOptionParserFactory.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Reflection; +using System.Collections.Generic; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// + /// + public class CommandLineOptionParserFactory : ICommandLineOptionParserFactory + { + /// + /// Initialises a new instance of the class. + /// + public CommandLineOptionParserFactory() + { + this.Parsers = new Dictionary(); + this.AddOrReplace(new BoolCommandLineOptionParser()); + this.AddOrReplace(new Int32CommandLineOptionParser()); + this.AddOrReplace(new Int64CommandLineOptionParser()); + this.AddOrReplace(new StringCommandLineOptionParser()); + this.AddOrReplace(new DateTimeCommandLineOptionParser()); + this.AddOrReplace(new DoubleCommandLineOptionParser()); + this.AddOrReplace(new UriCommandLineOptionParser()); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new ListCommandLineOptionParser(this)); + this.AddOrReplace(new NullableCommandLineOptionParser(this)); + this.AddOrReplace(new NullableCommandLineOptionParser(this)); + this.AddOrReplace(new NullableCommandLineOptionParser(this)); + this.AddOrReplace(new NullableCommandLineOptionParser(this)); + this.AddOrReplace(new NullableCommandLineOptionParser(this)); + } + + internal Dictionary Parsers { get; set; } + + /// + /// Adds the specified to this factories list of supported parsers. + /// If an existing parser has already been registered for the type then it will be replaced. + /// + /// The type which the will be returned for. + /// The parser to return for the specified type. + /// If is null. + public void AddOrReplace(ICommandLineOptionParser parser) + { + if (parser == null) throw new ArgumentNullException("parser"); + + var parserType = typeof(T); + + // remove existing + this.Parsers.Remove(parserType); + + this.Parsers.Add(parserType, parser); + } + + /// + /// Creates a to handle the specified type. + /// + /// The type of parser to create. + /// A suitable for the specified type. + /// If the specified type is not supported by this factory. + public ICommandLineOptionParser CreateParser() + { + var type = typeof(T); + + if (!this.Parsers.ContainsKey(type)) + { +#if !NETCORE + if (!TryAddAsSpecialParser(type)) +#else + if (!TryAddAsSpecialParser(type.GetTypeInfo())) +#endif + { + throw new UnsupportedTypeException(); + } + } + + return (ICommandLineOptionParser)this.Parsers[type]; + } + + /// + /// Attempts to add a special case parser, such as Enum or List{TEnum} parser. + /// + /// True if a special parser was added for the type; otherwise false. +#if !NETCORE + private bool TryAddAsSpecialParser(Type type) +#else + private bool TryAddAsSpecialParser(TypeInfo type) +#endif + { + + if (type.IsEnum) + { + +#if !NETCORE + bool hasFlags = typeof(T).IsDefined(typeof(FlagsAttribute), false); +#else + bool hasFlags = typeof(T).GetTypeInfo().IsDefined(typeof(FlagsAttribute), false); +#endif + Type enumParserType = hasFlags ? + typeof(EnumFlagCommandLineOptionParser) : + typeof(EnumCommandLineOptionParser); + + if (!this.Parsers.ContainsKey(enumParserType)) + { + if (hasFlags) + { + this.AddOrReplace(new EnumFlagCommandLineOptionParser()); + } + else + { + this.AddOrReplace(new EnumCommandLineOptionParser()); + } + + } + return true; + } + + if (type.IsGenericType) + { + var genericType = TryGetListGenericType(type); + + if (genericType != null) + { + if (genericType.IsEnum || IsNullableEnum(genericType)) + { +#if !NETCORE + var enumListParserType = typeof(ListCommandLineOptionParser<>).MakeGenericType(genericType); +#else + var enumListParserType = typeof(ListCommandLineOptionParser<>).MakeGenericType(genericType.GetType()); +#endif + var parser = (ICommandLineOptionParser)Activator.CreateInstance(enumListParserType, this); + +#if !NETCORE + if (!this.Parsers.ContainsKey(type)) +#else + if (!this.Parsers.ContainsKey(type.GetType())) +#endif + { + this.AddOrReplace(parser); + } + + return true; + } + } + } + + if (IsNullableEnum(type)) + { +#if !NETCORE + var underlyingType = Nullable.GetUnderlyingType(type); +#else + var underlyingType = Nullable.GetUnderlyingType(type.GetType()); +#endif + var nullableEnumParserType = typeof(NullableEnumCommandLineOptionParser<>).MakeGenericType(underlyingType); + var parser = (ICommandLineOptionParser)Activator.CreateInstance(nullableEnumParserType, this); +#if !NETCORE + if (!this.Parsers.ContainsKey(type)) +#else + if (!this.Parsers.ContainsKey(type.GetType())) +#endif + { + this.AddOrReplace(parser); + } + + return true; + } + + return false; + } + +#if !NETCORE + private static bool IsNullableEnum(Type t) + { + Type u = Nullable.GetUnderlyingType(t); + return (u != null) && u.IsEnum; + } +#else + private static bool IsNullableEnum(TypeInfo t) + { + Type u = Nullable.GetUnderlyingType(t.GetType()); + return (u != null) && u.GetTypeInfo().IsEnum; + } +#endif + + /// + /// Attemps to get the type of generic from a generic list. + /// +#if !NETCORE + private static Type TryGetListGenericType(Type type) +#else + private static TypeInfo TryGetListGenericType(TypeInfo type) +#endif + { + if (type.IsGenericType && type.GetGenericTypeDefinition() + == typeof(List<>)) + { + return type.GetGenericArguments()[0].GetTypeInfo(); + } + + return null; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs new file mode 100644 index 0000000..f101cbb --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs @@ -0,0 +1,64 @@ +#region License +// DateTimeCommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Globalization; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + public class DateTimeCommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Parses the specified into a . + /// + /// + /// + public DateTime Parse(ParsedOption parsedOption) + { + return DateTime.Parse(TrimAnyUnwantedCharacters(parsedOption.Value), CultureInfo.CurrentCulture); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + DateTime dtOut; + return DateTime.TryParse(TrimAnyUnwantedCharacters(parsedOption.Value), out dtOut); + } + + /// + /// Trim any unwanted characters such as any remaining double quotes that can come through. + /// + private static string TrimAnyUnwantedCharacters(string value) + { + return (value ?? string.Empty).Trim('"'); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs new file mode 100644 index 0000000..a732008 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs @@ -0,0 +1,55 @@ +#region License +// DoubleCommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Globalization; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + public class DoubleCommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Parses the specified into a . + /// + /// + /// + public double Parse(ParsedOption parsedOption) + { + return double.Parse(parsedOption.Value, CultureInfo.InvariantCulture); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + double result; + return double.TryParse(parsedOption.Value, System.Globalization.NumberStyles.Number, CultureInfo.InvariantCulture, out result); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs new file mode 100644 index 0000000..6878689 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs @@ -0,0 +1,112 @@ +#region License +// EnumCommandLineOptionParser.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +#if NETCORE +using System.Reflection; +#endif +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + /// For types the value is optional. If no value is provided for the Option then true is returned. + /// /// The that will be parsed by this parser. + public class EnumCommandLineOptionParser : ICommandLineOptionParser + { + private readonly IList _all; + private readonly Dictionary _insensitiveNames; + private readonly Dictionary _values; + + /// + /// Initialises a new instance of the class. + /// + /// If {TEnum} is not a . + public EnumCommandLineOptionParser() + { + var type = typeof(TEnum); +#if !NETCORE + if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); +#else + if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); +#endif + + _all = Enum.GetValues(typeof(TEnum)).Cast().ToList(); + _insensitiveNames = _all.ToDictionary(k => Enum.GetName(typeof(TEnum), k).ToLowerInvariant()); + _values = _all.ToDictionary(k => Convert.ToInt32(k)); + } + + /// + /// Parses the specified into a . + /// + /// + /// + /// A representing the parsed value. + /// The value is optional. If no value is provided then true is returned. + /// + public TEnum Parse(ParsedOption parsedOption) + { + return (TEnum)Enum.Parse(typeof(TEnum), parsedOption.Value.ToLowerInvariant(), true); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + if (parsedOption.HasValue == false) return false; + if (parsedOption.Value.IsNullOrWhiteSpace()) return false; + return IsDefined(parsedOption.Value); + } + + /// + /// Determines whether the specified can be parsed into {TEnum}. + /// + /// The value to be parsed + /// true if can be parsed; otherwise false. + private bool IsDefined(string value) + { + int asInt; + return int.TryParse(value, out asInt) + ? IsDefined(asInt) + : _insensitiveNames.Keys.Contains(value.ToLowerInvariant()); + } + + /// + /// Determines whether the specified represents a {TEnum} value. + /// + /// The that represents a {TEnum} value. + /// true if represents a {TEnum} value; otherwise false. + private bool IsDefined(int value) + { + return _values.Keys.Contains(value); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs new file mode 100644 index 0000000..0b56787 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs @@ -0,0 +1,125 @@ +#region License +// EnumCommandLineOptionParser.cs +// Copyright (c) 2014, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +#if NETCORE +using System.Reflection; +#endif +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + /// For types the value is optional. If no value is provided for the Option then true is returned. + /// /// The that will be parsed by this parser. + public class EnumFlagCommandLineOptionParser : ICommandLineOptionParser + { + private readonly IList _all; + private readonly Dictionary _insensitiveNames; + private readonly Dictionary _values; + + /// + /// Initialises a new instance of the class. + /// + /// If {TEnum} is not a . + public EnumFlagCommandLineOptionParser() + { + var type = typeof(TEnum); +#if !NETCORE + if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); + if (!type.IsDefined(typeof(FlagsAttribute), false)) throw new ArgumentException("T must have a System.FlagsAttribute'"); +#else + if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); + if (!type.GetTypeInfo().IsDefined(typeof(FlagsAttribute), false)) throw new ArgumentException("T must have a System.FlagsAttribute'"); +#endif + + _all = Enum.GetValues(typeof(TEnum)).Cast().ToList(); + _insensitiveNames = _all.ToDictionary(k => Enum.GetName(typeof(TEnum), k).ToLowerInvariant()); + _values = _all.ToDictionary(k => Convert.ToInt32(k)); + } + + /// + /// Parses the specified into a . + /// + /// + /// + /// A representing the parsed value. + /// The value is optional. If no value is provided then true is returned. + /// + public TEnum Parse(ParsedOption parsedOption) + { + int result = 0; + foreach (var value in parsedOption.Values) + { + result += (int)Enum.Parse(typeof(TEnum), value.ToLowerInvariant(), true); + } + return (TEnum)(object)result; + + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + if (parsedOption == null) return false; + if (parsedOption.HasValue == false) return false; + + return parsedOption.Values.All(value => + { + if (value.IsNullOrWhiteSpace()) return false; + return IsDefined(value); + }); + } + + /// + /// Determines whether the specified can be parsed into {TEnum}. + /// + /// The value to be parsed + /// true if can be parsed; otherwise false. + private bool IsDefined(string value) + { + int asInt; + return int.TryParse(value, out asInt) + ? IsDefined(asInt) + : _insensitiveNames.Keys.Contains(value.ToLowerInvariant()); + } + + /// + /// Determines whether the specified represents a {TEnum} value. + /// + /// The that represents a {TEnum} value. + /// true if represents a {TEnum} value; otherwise false. + private bool IsDefined(int value) + { + return _values.Keys.Contains(value); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs new file mode 100644 index 0000000..8115404 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs @@ -0,0 +1,45 @@ +#region License +// ICommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Represents a parser for a Option that can convert a value into the required type. + /// + public interface ICommandLineOptionParser + { + /// + /// Parses the specified into the return type. + /// + /// + /// The parsed value. + T Parse(ParsedOption parsedOption); + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + bool CanParse(ParsedOption parsedOption); + } +} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs new file mode 100644 index 0000000..73abde3 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs @@ -0,0 +1,55 @@ +#region License +// Int32CommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Globalization; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + public class Int32CommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Converts the string representation of a number in a specified culture-specific format to its 32-bit signed integer equivalent. + /// + /// + /// + public int Parse(ParsedOption parsedOption) + { + return int.Parse(parsedOption.Value, CultureInfo.CurrentCulture); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + int result; + return int.TryParse(parsedOption.Value, out result); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs new file mode 100644 index 0000000..a9cf8e5 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs @@ -0,0 +1,31 @@ +using System.Globalization; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + public class Int64CommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Converts the string representation of a number in a specified culture-specific format to its 64-bit signed integer equivalent. + /// + /// + /// + public long Parse(ParsedOption parsedOption) + { + return long.Parse(parsedOption.Value, CultureInfo.CurrentCulture); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + long result; + return long.TryParse(parsedOption.Value, out result); + } + } +} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs new file mode 100644 index 0000000..441aaf0 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs @@ -0,0 +1,86 @@ +#region License +// ListCommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; +using System.Linq; + +namespace Fclp.Internals.Parsing.OptionParsers +{ +/// +/// +/// +/// +public class ListCommandLineOptionParser : ICommandLineOptionParser> +{ + private readonly ICommandLineOptionParserFactory _parserFactory; + + /// + /// Initialises a new instance of the . + /// + /// + public ListCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) + { + _parserFactory = parserFactory; + } + + /// + /// Parses the specified into the return type. + /// + /// + /// The parsed value. + public List Parse(ParsedOption parsedOption) + { + var parser = _parserFactory.CreateParser(); + + return parsedOption.Values.Select(value => + { + var clone = parsedOption.Clone(); + clone.Value = value; + return parser.Parse(clone); + }).ToList(); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + if (parsedOption == null) return false; + if (parsedOption.HasValue == false) return false; + + var parser = _parserFactory.CreateParser(); + + return parsedOption.Values.All(value => + { + var clone = parsedOption.Clone(); + clone.Value = value; + clone.Values = new [] { value }; + clone.AdditionalValues = new string[0]; + return parser.CanParse(clone); + }); + } +} +} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs new file mode 100644 index 0000000..3c00177 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs @@ -0,0 +1,62 @@ +#region License +// NullableCommandLineOptionParser.cs +// Copyright (c) 2015, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to nullable types + /// + public class NullableCommandLineOptionParser : ICommandLineOptionParser where TNullableType : struct + { + private readonly ICommandLineOptionParserFactory _parserFactory; + + /// + /// Initialises a new instance of the . + /// + /// + public NullableCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) + { + _parserFactory = parserFactory; + } + + /// + /// Parses the specified into a nullable type. + /// + public TNullableType? Parse(ParsedOption parsedOption) + { + if (parsedOption.HasValue == false) return null; + var parser = _parserFactory.CreateParser(); + if (parser.CanParse(parsedOption) == false) return null; + return parser.Parse(parsedOption); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + public bool CanParse(ParsedOption parsedOption) + { + return true; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs new file mode 100644 index 0000000..bedc34f --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs @@ -0,0 +1,83 @@ +#region License +// ListTests.cs +// Copyright (c) 2015, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +#if NETCORE +using System.Reflection; +#endif + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// + /// + /// + public class NullableEnumCommandLineOptionParser : ICommandLineOptionParser where TEnum : struct + { + private readonly ICommandLineOptionParserFactory _parserFactory; + + /// + /// Initialises a new instance of the . + /// + /// + public NullableEnumCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) + { + var type = typeof(TEnum); + +#if !NETCORE + if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); +#else + if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); +#endif + _parserFactory = parserFactory; + } + + /// + /// Parses the specified into the return type. + /// + /// + /// The parsed value. + public TEnum? Parse(ParsedOption parsedOption) + { + if (parsedOption.HasValue == false) return null; + var parser = _parserFactory.CreateParser(); + return parser.Parse(parsedOption); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + if (parsedOption == null) return false; + if (parsedOption.HasValue == false) return true; + + var parser = _parserFactory.CreateParser(); + + return parser.CanParse(parsedOption); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs new file mode 100644 index 0000000..92d6684 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs @@ -0,0 +1,62 @@ +#region License +// StringCommandLineOptionParser.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Linq; +using Fclp.Internals.Extensions; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + public class StringCommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Parses the specified into a . + /// + /// + /// + public string Parse(ParsedOption parsedOption) + { + return parsedOption.Value.RemoveAnyWrappingDoubleQuotes(); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + if (parsedOption.Value.IsNullOrWhiteSpace()) return false; + if (parsedOption.HasValue == false) return false; + + string value = parsedOption.Value.Trim(); + + var items = value.SplitOnWhitespace(); + + return items.Count() == 1; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs new file mode 100644 index 0000000..0d5da43 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs @@ -0,0 +1,70 @@ +#region License +// UriCommandLineOptionParser.cs +// Copyright (c) 2015, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp.Internals.Parsing.OptionParsers +{ + /// + /// Parser used to convert to . + /// + /// For types the value is optional. If no value is provided for the Option then true is returned. + public class UriCommandLineOptionParser : ICommandLineOptionParser + { + /// + /// Parses the specified into a . + /// + /// + /// + /// A representing the parsed value. + /// The value is optional. If no value is provided then true is returned. + /// + public Uri Parse(ParsedOption parsedOption) + { + return new Uri(parsedOption.Value); + } + + /// + /// Determines whether the specified can be parsed by this . + /// + /// + /// true if the specified can be parsed by this ; otherwise false. + public bool CanParse(ParsedOption parsedOption) + { + try + { + new Uri(parsedOption.Value); + return true; + } + catch (ArgumentNullException) + { + return false; + } + catch (UriFormatException) + { + return false; + } + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs new file mode 100644 index 0000000..f88c51e --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs @@ -0,0 +1,153 @@ +#region License +// ParsedOption.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals.Parsing +{ + /// + /// Contains information about a single parsed option and any value. + /// + public class ParsedOption + { + /// + /// Initialises a new instance of the class. + /// + /// The command line option key. + /// The value matched with the key. + public ParsedOption(string key, string value) + { + Key = key; + Value = value; + } + + /// + /// Initialises a new instance of the class. + /// + public ParsedOption() + { + } + + /// + /// Gets the raw key representing this option. + /// + public string RawKey { get; set; } + + /// + /// Gets or sets the command line option key. + /// + public string Key { get; set; } + + /// + /// Gets or sets the first value matched with the key. + /// + public string Value { get; set; } + + /// + /// Gets or sets all the values matched with this key. + /// + public string[] Values { get; set; } + + /// + /// Gets or sets the additional values matched with this key. + /// + public string[] AdditionalValues { get; set; } + + /// + /// Gets or sets the prefix for the key e.g. -, / or --. + /// + public string Prefix { get; set; } + + /// + /// Gets or sets any suffix for the key e.g. boolean arguments with +, -. + /// + public string Suffix { get; set; } + + /// + /// Gets whether this parsed option has a value set. + /// + public bool HasValue + { + get { return string.IsNullOrEmpty(Value) == false; } + } + + /// + /// Gets whether this parsed options has a suffix. + /// + public bool HasSuffix + { + get { return string.IsNullOrEmpty(Suffix) == false; } + } + + /// + /// Determines whether two specified objects have the same values. + /// + /// The other to compare. + /// true if they are equal; otherwise false. + protected bool Equals(ParsedOption other) + { + return string.Equals(Key, other.Key) && string.Equals(Value, other.Value); + } + + /// + /// Determines whether this is equal to the specified . + /// + /// The to compare. + /// true if they are equal; otherwise false. + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((ParsedOption) obj); + } + + /// + /// Returns the hashcode for this instance. + /// + /// + public override int GetHashCode() + { + unchecked + { + return ((Key != null ? Key.GetHashCode() : 0)*397) ^ (Value != null ? Value.GetHashCode() : 0); + } + } + + /// + /// Creates a clone of this option. + /// + /// + public ParsedOption Clone() + { + return new ParsedOption + { + Key = Key, + Prefix = Prefix, + Suffix = Suffix, + Value = Value, + AdditionalValues = AdditionalValues, + RawKey = RawKey, + Values = Values + }; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs new file mode 100644 index 0000000..cb2af07 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs @@ -0,0 +1,71 @@ +#region License +// ParsedOptionFactory.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Linq; + +namespace Fclp.Internals.Parsing +{ + /// + /// Factory used to created parsed option meta data. + /// + public static class ParsedOptionFactory + { + /// + /// Creates parsed option meta data for the specified raw key. + /// + public static ParsedOption Create(string rawKey) + { + var prefix = ExtractPrefix(rawKey); + + return new ParsedOption + { + RawKey = rawKey, + Prefix = prefix, + Key = rawKey.Remove(0, prefix.Length), + Suffix = ExtractSuffix(rawKey) + }; + } + + + /// + /// Extracts the key identifier from the specified . + /// + /// The to extract the key identifier from. + /// A representing the key identifier if found; otherwise null. + static string ExtractPrefix(string arg) + { + return arg != null ? SpecialCharacters.OptionPrefix.FirstOrDefault(arg.StartsWith) : null; + } + + /// + /// Extracts the key identifier from the specified . + /// + /// The to extract the key identifier from. + /// A representing the key identifier if found; otherwise null. + static string ExtractSuffix(string arg) + { + return arg != null ? SpecialCharacters.OptionSuffix.FirstOrDefault(arg.EndsWith) : null; + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs new file mode 100644 index 0000000..5c0884b --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs @@ -0,0 +1,55 @@ +#region License +// ParserEngineResult.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; + +namespace Fclp.Internals.Parsing +{ + /// + /// Contains the results of the parse operation + /// + public class ParserEngineResult + { + /// + /// Initialises a new instance of the class; + /// + /// The parsed options. + /// Any additional values that could not be translated into options. + public ParserEngineResult(IEnumerable parsedOptions, IEnumerable additionalValues) + { + ParsedOptions = parsedOptions ?? new List(); + AdditionalValues = additionalValues ?? new List(); + } + + /// + /// Gets the parsed options. + /// + public IEnumerable ParsedOptions { get; private set; } + + /// + /// Gets any additional values that could not be translated into options. + /// + public IEnumerable AdditionalValues { get; private set; } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs b/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs new file mode 100644 index 0000000..a47e6bd --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs @@ -0,0 +1,62 @@ +#region License +// SpecialCharacters.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals +{ + /// + /// Contains special characters used throughout the parser. + /// + public static class SpecialCharacters + { + /// + /// Characters used for value assignment. + /// + public static readonly char[] ValueAssignments = new[] { '=', ':' }; + + /// + /// Assign a name to the whitespace character. + /// + public const char Whitespace = ' '; + + /// + /// Characters that define the start of an option. + /// + public static readonly string[] OptionPrefix = new[] { "/", "--", "-" }; + + /// + /// Characters that have special meaning at the end of an option key. + /// + public static readonly string[] OptionSuffix = new[] { "+", "-" }; + + /// + /// Characters that define an explicit short option. + /// + public static readonly string[] ShortOptionPrefix = new[] { "-" }; + + /// + /// The key that indicates the end of any options. + /// Any following arguments should be treated as operands, even if they begin with the '-' character. + /// + public static readonly string EndOfOptionsKey = "--"; + } +} diff --git a/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs new file mode 100644 index 0000000..9ca3048 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs @@ -0,0 +1,60 @@ +#region License +// CommandLineOptionValidator.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System.Collections.Generic; + +namespace Fclp.Internals.Validators +{ + /// + /// Wrapping validator that executes all the individual validation rules. + /// + public class CommandLineOptionValidator : ICommandLineOptionValidator + { + private readonly IList _rules; + + /// + /// Initialises a new instance of the class. + /// + public CommandLineOptionValidator(IFluentCommandLineParser parser) + { + _rules = new List + { + new OptionNameValidator(), + new NoDuplicateOptionValidator(parser) + }; + } + + /// + /// Validates the specified against all the registered rules. + /// + /// The to validate. + public void Validate(ICommandLineOption commandLineOption) + { + foreach (var rule in _rules) + { + rule.Validate(commandLineOption); + } + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs new file mode 100644 index 0000000..bb14a8b --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs @@ -0,0 +1,37 @@ +#region License +// ICommandLineOptionValidator.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion +namespace Fclp.Internals.Validators +{ + /// + /// Represents a validator used to verify new setup command line options. + /// + public interface ICommandLineOptionValidator + { + /// + /// Verifies that the proposed new is a valid new Option. + /// + /// The to validate. This must not be null. + void Validate(ICommandLineOption commandLineOption); + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs new file mode 100644 index 0000000..051e4ca --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs @@ -0,0 +1,84 @@ +#region License +// NoDuplicateOptionValidator.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp.Internals.Validators +{ + /// + /// Validator used to ensure no there are duplicate Options setup. + /// + public class NoDuplicateOptionValidator : ICommandLineOptionValidator + { + private readonly IFluentCommandLineParser _parser; + + + + /// + /// Initialises a new instance of the class. + /// + /// The containing the setup options. This must not be null. + public NoDuplicateOptionValidator(IFluentCommandLineParser parser) + { + if (parser == null) throw new ArgumentNullException("parser"); + _parser = parser; + } + + /// + /// Gets the type used for duplicates. + /// + private StringComparison ComparisonType + { + get { return _parser.IsCaseSensitive ? StringComparison.CurrentCulture : StringComparison.CurrentCultureIgnoreCase; } + } + + /// + /// Verifies that the specified will not cause any duplication. + /// + /// The to validate. + public void Validate(ICommandLineOption commandLineOption) + { + foreach (var option in _parser.Options) + { + if (string.IsNullOrEmpty(commandLineOption.ShortName) == false) + { + ValuesAreEqual(commandLineOption.ShortName, option.ShortName); + } + + if (string.IsNullOrEmpty(commandLineOption.LongName) == false) + { + ValuesAreEqual(commandLineOption.LongName, option.LongName); + } + } + } + + private void ValuesAreEqual(string value, string otherValue) + { + if (string.Equals(value, otherValue, ComparisonType)) + { + throw new OptionAlreadyExistsException(value); + } + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs new file mode 100644 index 0000000..26bf4f8 --- /dev/null +++ b/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs @@ -0,0 +1,109 @@ +#region License +// OptionNameValidator.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +using System.Globalization; +using System.Linq; + +namespace Fclp.Internals.Validators +{ + /// + /// Validator to ensure a new Option has a valid long name. + /// + public class OptionNameValidator : ICommandLineOptionValidator + { + private static readonly char[] ReservedChars = + SpecialCharacters.ValueAssignments.Union(new[] { SpecialCharacters.Whitespace }).ToArray(); + + /// + /// Verifies that the specified has a valid short/long name combination. + /// + /// The to validate. This must not be null. + /// if is null. + public void Validate(ICommandLineOption commandLineOption) + { + if (commandLineOption == null) throw new ArgumentNullException("commandLineOption"); + + ValidateShortName(commandLineOption.ShortName); + ValidateLongName(commandLineOption.LongName); + ValidateShortAndLongName(commandLineOption.ShortName, commandLineOption.LongName); + } + + private static void ValidateShortAndLongName(string shortName, string longName) + { + if (string.IsNullOrEmpty(shortName) && string.IsNullOrEmpty(longName)) + { + ThrowInvalid(string.Empty, "A short or long name must be provided."); + } + } + + private static void ValidateLongName(string longName) + { + if (string.IsNullOrEmpty(longName)) return; + + VerifyDoesNotContainsReservedChar(longName); + + if (longName.Length == 1) + { + ThrowInvalid(longName, "Long names must be longer than a single character. Single characters are reserved for short options only."); + } + } + + private static void ValidateShortName(string shortName) + { + if (string.IsNullOrEmpty(shortName)) return; + + if (shortName.Length > 1) + { + ThrowInvalid(shortName, "Short names must be a single character only."); + } + + VerifyDoesNotContainsReservedChar(shortName); + + if (char.IsControl(shortName, 0)) + { + ThrowInvalid(shortName, "The character '" + shortName + "' is not valid for a short name."); + } + } + + private static void VerifyDoesNotContainsReservedChar(string value) + { + if (string.IsNullOrEmpty(value)) return; + + foreach (char reservedChar in ReservedChars) + { + if (value.Contains(reservedChar)) + { + ThrowInvalid(value, "The character '" + reservedChar + "' is not valid within a short or long name."); + } + } + } + + private static void ThrowInvalid(string value, string message) + { + throw new InvalidOptionNameException( + string.Format(CultureInfo.InvariantCulture, "Invalid option name '{0}'. {1}", value, message)); + } + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/InvalidOptionNameException.cs b/Core/FluentCommandLineParser/InvalidOptionNameException.cs new file mode 100644 index 0000000..8ca8cdd --- /dev/null +++ b/Core/FluentCommandLineParser/InvalidOptionNameException.cs @@ -0,0 +1,71 @@ +#region License +// InvalidOptionNameException.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +#if FEATURE_SERIALIZATION +using System.Runtime.Serialization; +#endif +namespace Fclp +{ + /// + /// Represents an error that has occurred because a specified Option name is invalid. + /// + public class InvalidOptionNameException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public InvalidOptionNameException() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The message that describes the error. + public InvalidOptionNameException(string message) : base(message) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + public InvalidOptionNameException(string message, Exception innerException) : base(message, innerException) + { + } + +#if FEATURE_SERIALIZATION + /// + /// Initializes a new instance of the class. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + protected InvalidOptionNameException(SerializationInfo info, StreamingContext context) : base(info, context) + { + } +#endif + } +} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs b/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs new file mode 100644 index 0000000..167de94 --- /dev/null +++ b/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs @@ -0,0 +1,70 @@ +#region License +// OptionAlreadyExistsException.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; +#if FEATURE_SERIALIZATION +using System.Runtime.Serialization; +#endif +namespace Fclp +{ + /// + /// Represents an error that has occurred because a matching Option already exists in the parser. + /// + #if FEATURE_SERIALIZATION + [Serializable] + #endif + public class OptionAlreadyExistsException : Exception + { + /// + /// Initialises a new instance of the class. + /// + public OptionAlreadyExistsException() { } + + /// + /// Initialises a new instance of the class. + /// + /// + public OptionAlreadyExistsException(string optionName) : base(optionName) { } + + + #if FEATURE_SERIALIZATION + /// + /// Initialises a new instance of the class. + /// + /// + /// + public OptionAlreadyExistsException(SerializationInfo info, StreamingContext context) + : base(info, context) { } + #endif + + /// + /// Initialises a new instance of the class. + /// + /// + /// + public OptionAlreadyExistsException(string optionName, Exception innerException) + : base(optionName, innerException) { } + + } +} diff --git a/Core/FluentCommandLineParser/OptionSyntaxException.cs b/Core/FluentCommandLineParser/OptionSyntaxException.cs new file mode 100644 index 0000000..eed0352 --- /dev/null +++ b/Core/FluentCommandLineParser/OptionSyntaxException.cs @@ -0,0 +1,38 @@ +#region License +// OptionSyntaxException.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp +{ + /// + /// Represents an error that has occurred because a Option syntax was in an unexpected format. + /// + #if FEATURE_SERIALIZATION + [Serializable] + #endif + public class OptionSyntaxException : Exception + { + } +} diff --git a/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs b/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a063968 --- /dev/null +++ b/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("FluentCommandLineParser")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6caadcee-649e-4ed2-a7e6-bdb621776055")] diff --git a/Core/FluentCommandLineParser/UnsupportedTypeException.cs b/Core/FluentCommandLineParser/UnsupportedTypeException.cs new file mode 100644 index 0000000..558bd66 --- /dev/null +++ b/Core/FluentCommandLineParser/UnsupportedTypeException.cs @@ -0,0 +1,38 @@ +#region License +// UnsupportedTypeException.cs +// Copyright (c) 2013, Simon Williams +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provide +// d that the following conditions are met: +// +// Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// +// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and +// the following disclaimer in the documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +#endregion + +using System; + +namespace Fclp +{ + /// + /// Represents an error that has occurred because a specified type is unsupported. + /// + #if FEATURE_SERIALIZATION + [Serializable] + #endif + public class UnsupportedTypeException : Exception + { + } +} diff --git a/Core/FluentCommandLineParser/project.json b/Core/FluentCommandLineParser/project.json new file mode 100644 index 0000000..94d646e --- /dev/null +++ b/Core/FluentCommandLineParser/project.json @@ -0,0 +1,20 @@ +{ + "version": "1.0.0-*", + + "dependencies": { + "System.Linq.Expressions": "4.0.0" + }, + + "frameworks": { + "netstandard1.5": { + "imports": "dnxcore50", + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + }, + "buildOptions": { "define": [ "NETCORE" ] } + }, + "net451": { + "buildOptions": { "define": [ "FEATURE_LEGACY_REFLECTION_API" ] } + } + } +} diff --git a/FluentCommandLineParser.sln b/FluentCommandLineParser.sln index 601837a..8ca8404 100644 --- a/FluentCommandLineParser.sln +++ b/FluentCommandLineParser.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser", "FluentCommandLineParser\FluentCommandLineParser.csproj", "{74CDFA61-81D8-40F2-B536-949BABA15D3E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser.Tests", "FluentCommandLineParser.Tests\FluentCommandLineParser.Tests.csproj", "{A2546703-0B86-4515-BE5B-FAF85B756BDC}" @@ -12,6 +14,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D8DCB1 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{D91A0B4C-0A5D-44CF-A727-2A72AE0165AD}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FluentCommandLineParser", "Core\FluentCommandLineParser\FluentCommandLineParser.xproj", "{6CAADCEE-649E-4ED2-A7E6-BDB621776055}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FluentCommandLineParser.Test", "Core\FluentCommandLineParser.Test\FluentCommandLineParser.Test.xproj", "{AC50A196-69FF-4E66-A0DF-1EAE80B261A7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D99A89F2-12E3-402E-8E3A-9EFAFCF2BC76}" + ProjectSection(SolutionItems) = preProject + global.json = global.json + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,8 +39,20 @@ Global {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Debug|Any CPU.Build.0 = Debug|Any CPU {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Release|Any CPU.ActiveCfg = Release|Any CPU {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Release|Any CPU.Build.0 = Release|Any CPU + {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.Build.0 = Release|Any CPU + {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {6CAADCEE-649E-4ED2-A7E6-BDB621776055} = {D91A0B4C-0A5D-44CF-A727-2A72AE0165AD} + {AC50A196-69FF-4E66-A0DF-1EAE80B261A7} = {D91A0B4C-0A5D-44CF-A727-2A72AE0165AD} + EndGlobalSection EndGlobal diff --git a/global.json b/global.json new file mode 100644 index 0000000..d979fbd --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "projects": [ "Core"], + "sdk": { + "version": "1.0.0-preview2-003121" + } +} \ No newline at end of file From b240060c93b03e07a58cf3fe674d8154571866c4 Mon Sep 17 00:00:00 2001 From: Vladymyr Liashenko Date: Wed, 13 Jul 2016 15:01:20 +0300 Subject: [PATCH 2/4] Fixed run issue --- Core/FluentCommandLineParser/project.json | 13 ++++++++----- .../FluentCommandLineParser.Tests.csproj | 9 +++------ FluentCommandLineParser.sln | 7 ------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Core/FluentCommandLineParser/project.json b/Core/FluentCommandLineParser/project.json index 94d646e..d9aa728 100644 --- a/Core/FluentCommandLineParser/project.json +++ b/Core/FluentCommandLineParser/project.json @@ -2,19 +2,22 @@ "version": "1.0.0-*", "dependencies": { - "System.Linq.Expressions": "4.0.0" + }, "frameworks": { "netstandard1.5": { "imports": "dnxcore50", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24027" + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Linq.Expressions": "4.0.11-rc2-24027" }, "buildOptions": { "define": [ "NETCORE" ] } - }, - "net451": { - "buildOptions": { "define": [ "FEATURE_LEGACY_REFLECTION_API" ] } } + //, + //"net451": { + // "buildOptions": { "define": [ "FEATURE_LEGACY_REFLECTION_API" ] }, + // "dependencies": { "System.Linq.Expressions": "4.0.0" } + //} } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj b/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj index d450bd6..5d93423 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj @@ -42,6 +42,9 @@ + + ..\Core\FluentCommandLineParser\bin\Debug\net451\FluentCommandLineParser.dll + False ..\packages\Machine.Specifications.0.9.1\lib\net40\Machine.Specifications.dll @@ -168,12 +171,6 @@ - - - {74CDFA61-81D8-40F2-B536-949BABA15D3E} - FluentCommandLineParser - - diff --git a/FluentCommandLineParser.sln b/FluentCommandLineParser.sln index 8ca8404..671975e 100644 --- a/FluentCommandLineParser.sln +++ b/FluentCommandLineParser.sln @@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{D91A0B4C-0 EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FluentCommandLineParser", "Core\FluentCommandLineParser\FluentCommandLineParser.xproj", "{6CAADCEE-649E-4ED2-A7E6-BDB621776055}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FluentCommandLineParser.Test", "Core\FluentCommandLineParser.Test\FluentCommandLineParser.Test.xproj", "{AC50A196-69FF-4E66-A0DF-1EAE80B261A7}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D99A89F2-12E3-402E-8E3A-9EFAFCF2BC76}" ProjectSection(SolutionItems) = preProject global.json = global.json @@ -43,16 +41,11 @@ Global {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Debug|Any CPU.Build.0 = Debug|Any CPU {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.ActiveCfg = Release|Any CPU {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.Build.0 = Release|Any CPU - {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC50A196-69FF-4E66-A0DF-1EAE80B261A7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {6CAADCEE-649E-4ED2-A7E6-BDB621776055} = {D91A0B4C-0A5D-44CF-A727-2A72AE0165AD} - {AC50A196-69FF-4E66-A0DF-1EAE80B261A7} = {D91A0B4C-0A5D-44CF-A727-2A72AE0165AD} EndGlobalSection EndGlobal From 05f96d4ceaa781b823056db8101000ed7c52db50 Mon Sep 17 00:00:00 2001 From: Vladymyr Liashenko Date: Fri, 29 Jul 2016 13:41:36 +0300 Subject: [PATCH 3/4] Updated to core release --- Core/FluentCommandLineParser/project.json | 4 +- .../FluentCommandLineParser/project.lock.json | 3480 +++++++++++++++++ 2 files changed, 3482 insertions(+), 2 deletions(-) create mode 100644 Core/FluentCommandLineParser/project.lock.json diff --git a/Core/FluentCommandLineParser/project.json b/Core/FluentCommandLineParser/project.json index d9aa728..48556e8 100644 --- a/Core/FluentCommandLineParser/project.json +++ b/Core/FluentCommandLineParser/project.json @@ -9,8 +9,8 @@ "netstandard1.5": { "imports": "dnxcore50", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24027", - "System.Linq.Expressions": "4.0.11-rc2-24027" + "NETStandard.Library": "1.6.0", + "System.Linq.Expressions": "4.1.0" }, "buildOptions": { "define": [ "NETCORE" ] } } diff --git a/Core/FluentCommandLineParser/project.lock.json b/Core/FluentCommandLineParser/project.lock.json new file mode 100644 index 0000000..7658eba --- /dev/null +++ b/Core/FluentCommandLineParser/project.lock.json @@ -0,0 +1,3480 @@ +{ + "locked": false, + "version": 2, + "targets": { + ".NETStandard,Version=v1.5": { + "Microsoft.NETCore.Platforms/1.0.1": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.0.1": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.Win32.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {} + } + }, + "NETStandard.Library/1.6.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.Win32.Primitives": "4.0.1", + "System.AppContext": "4.1.0", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Console": "4.0.0", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tools": "4.0.1", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.Globalization.Calendars": "4.0.1", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.IO.Compression.ZipFile": "4.0.1", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.Net.Http": "4.1.0", + "System.Net.Primitives": "4.0.11", + "System.Net.Sockets": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.0.0", + "System.Runtime.Numerics": "4.0.1", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Security.Cryptography.X509Certificates": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Text.RegularExpressions": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "System.Threading.Timer": "4.0.1", + "System.Xml.ReaderWriter": "4.0.11", + "System.Xml.XDocument": "4.0.11" + } + }, + "runtime.native.System/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.native.System.IO.Compression/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.native.System.Security.Cryptography/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.1.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.AppContext.dll": {} + } + }, + "System.Buffers/4.0.0": { + "type": "package", + "dependencies": { + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "lib/netstandard1.1/_._": {} + }, + "runtime": { + "lib/netstandard1.1/System.Buffers.dll": {} + } + }, + "System.Collections/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Collections.dll": {} + } + }, + "System.Collections.Concurrent/4.0.12": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Collections.Concurrent.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Collections.Concurrent.dll": {} + } + }, + "System.Console/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Console.dll": {} + } + }, + "System.Diagnostics.Debug/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Diagnostics.Debug.dll": {} + } + }, + "System.Diagnostics.DiagnosticSource/4.0.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "lib/netstandard1.3/_._": {} + }, + "runtime": { + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {} + } + }, + "System.Diagnostics.Tools/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Diagnostics.Tools.dll": {} + } + }, + "System.Diagnostics.Tracing/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {} + } + }, + "System.Globalization/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Globalization.dll": {} + } + }, + "System.Globalization.Calendars/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Globalization": "4.0.11", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Globalization.Calendars.dll": {} + } + }, + "System.IO/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.5/System.IO.dll": {} + } + }, + "System.IO.Compression/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "runtime.native.System": "4.0.0", + "runtime.native.System.IO.Compression": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.IO.Compression.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.IO.Compression.ZipFile/4.0.1": { + "type": "package", + "dependencies": { + "System.Buffers": "4.0.0", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.IO.Compression.ZipFile.dll": {} + } + }, + "System.IO.FileSystem/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.IO.FileSystem.dll": {} + } + }, + "System.IO.FileSystem.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} + } + }, + "System.Linq/4.1.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Linq.dll": {} + } + }, + "System.Linq.Expressions/4.1.0": { + "type": "package", + "dependencies": { + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Linq.Expressions.dll": {} + } + }, + "System.Net.Http/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.Win32.Primitives": "4.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.DiagnosticSource": "4.0.0", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.Net.Primitives": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.X509Certificates": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Net.Http.dll": {} + }, + "runtimeTargets": { + "runtimes/win/lib/netstandard1.3/System.Net.Http.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Net.Primitives/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1" + }, + "compile": { + "ref/netstandard1.3/System.Net.Primitives.dll": {} + } + }, + "System.Net.Sockets/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Net.Primitives": "4.0.11", + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Net.Sockets.dll": {} + } + }, + "System.ObjectModel/4.0.12": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.ObjectModel.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.ObjectModel.dll": {} + } + }, + "System.Reflection/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Reflection.dll": {} + } + }, + "System.Reflection.Extensions/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Reflection.Extensions.dll": {} + } + }, + "System.Reflection.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Reflection.Primitives.dll": {} + } + }, + "System.Resources.ResourceManager/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Globalization": "4.0.11", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Resources.ResourceManager.dll": {} + } + }, + "System.Runtime/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.Handles/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Runtime.Handles.dll": {} + } + }, + "System.Runtime.InteropServices/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Reflection": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.InteropServices.dll": {} + } + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Threading": "4.0.11", + "runtime.native.System": "4.0.0" + }, + "compile": { + "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Runtime.Numerics/4.0.1": { + "type": "package", + "dependencies": { + "System.Globalization": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0" + }, + "compile": { + "ref/netstandard1.1/System.Runtime.Numerics.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Runtime.Numerics.dll": {} + } + }, + "System.Security.Cryptography.Algorithms/4.2.0": { + "type": "package", + "dependencies": { + "System.IO": "4.1.0", + "System.Runtime": "4.1.0", + "System.Security.Cryptography.Primitives": "4.0.0" + }, + "compile": { + "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll": {} + } + }, + "System.Security.Cryptography.Encoding/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Linq": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Security.Cryptography.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} + } + }, + "System.Security.Cryptography.X509Certificates/4.1.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0" + }, + "compile": { + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {} + } + }, + "System.Text.Encoding/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Text.Encoding.dll": {} + } + }, + "System.Text.Encoding.Extensions/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {} + } + }, + "System.Text.RegularExpressions/4.1.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Text.RegularExpressions.dll": {} + } + }, + "System.Threading/4.0.11": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Threading.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Threading.dll": {} + } + }, + "System.Threading.Tasks/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Threading.Tasks.dll": {} + } + }, + "System.Threading.Tasks.Extensions/4.0.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {} + } + }, + "System.Threading.Timer/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.2/System.Threading.Timer.dll": {} + } + }, + "System.Xml.ReaderWriter/4.0.11": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Text.RegularExpressions": "4.1.0", + "System.Threading.Tasks": "4.0.11", + "System.Threading.Tasks.Extensions": "4.0.0" + }, + "compile": { + "ref/netstandard1.3/System.Xml.ReaderWriter.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Xml.ReaderWriter.dll": {} + } + }, + "System.Xml.XDocument/4.0.11": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tools": "4.0.1", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Xml.ReaderWriter": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Xml.XDocument.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Xml.XDocument.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.NETCore.Platforms/1.0.1": { + "sha512": "4L/w/J1TKV03QLqH86f7gftULX5hm1IqXU5XQ9P5GtuCdS+yXpi5AQ8RXXVZ1v3c38vP2GqnzDysLJ9EfqRTPQ==", + "type": "package", + "path": "Microsoft.NETCore.Platforms/1.0.1", + "files": [ + "Microsoft.NETCore.Platforms.1.0.1.nupkg.sha512", + "Microsoft.NETCore.Platforms.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.0.1": { + "sha512": "5Y6AzzxG3gg110XggFr2vSLOyxb7cFzhd8+oyf+VPgtrY+Nq5m4O048npNi5WiX+vLqs9fN4anb6QKbVviqBsQ==", + "type": "package", + "path": "Microsoft.NETCore.Targets/1.0.1", + "files": [ + "Microsoft.NETCore.Targets.1.0.1.nupkg.sha512", + "Microsoft.NETCore.Targets.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.json" + ] + }, + "Microsoft.Win32.Primitives/4.0.1": { + "sha512": "nqi97Ue263Tx+n/GpA1dGiExv9nJGb5wkeoYlH0MvnkGZ6FoexKbcU+D0ChbU6EvDnsqUxyWgqqhAdbppbkOsQ==", + "type": "package", + "path": "Microsoft.Win32.Primitives/4.0.1", + "files": [ + "Microsoft.Win32.Primitives.4.0.1.nupkg.sha512", + "Microsoft.Win32.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/Microsoft.Win32.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/Microsoft.Win32.Primitives.dll", + "ref/netstandard1.3/Microsoft.Win32.Primitives.dll", + "ref/netstandard1.3/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/de/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/es/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/fr/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/it/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ja/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ko/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ru/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/zh-hans/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/zh-hant/Microsoft.Win32.Primitives.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "NETStandard.Library/1.6.0": { + "sha512": "MwHuvbxwJ1xB9Afd6WasYx5J7kfOn8CYGNSv31Ie0Wr2ZSKvuoRivdju3k4fQvZ6nlxXvASsush2VuVBKezdbw==", + "type": "package", + "path": "NETStandard.Library/1.6.0", + "files": [ + "NETStandard.Library.1.6.0.nupkg.sha512", + "NETStandard.Library.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt" + ] + }, + "runtime.native.System/4.0.0": { + "sha512": "yepfh3Y8eCy38yTAoxHuA/C7QjK2tDHvCJuLLSYeU8GVgqIOY7AGshGxwFRC+AxvNQADkwjlj/6FU4deOGNNQQ==", + "type": "package", + "path": "runtime.native.System/4.0.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.4.0.0.nupkg.sha512", + "runtime.native.System.nuspec" + ] + }, + "runtime.native.System.IO.Compression/4.1.0": { + "sha512": "B7sSouMGZqcM6l1UeVJEoh8kC6+EivSZvsf1LmbtAhPik/YNq/4QHUVkRWrZ2rKo9nfIdZ/GL3EtqNtO+I/SOg==", + "type": "package", + "path": "runtime.native.System.IO.Compression/4.1.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.IO.Compression.4.1.0.nupkg.sha512", + "runtime.native.System.IO.Compression.nuspec" + ] + }, + "runtime.native.System.Security.Cryptography/4.0.0": { + "sha512": "4ca/RWUp/xiR5LXZDFCdqJRFs8X3l0fq1CkNcknIZE675CuPF65PE5rmNDjgZrlFsFWrKxnq6stxda/KPUkNxw==", + "type": "package", + "path": "runtime.native.System.Security.Cryptography/4.0.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.Security.Cryptography.4.0.0.nupkg.sha512", + "runtime.native.System.Security.Cryptography.nuspec" + ] + }, + "System.AppContext/4.1.0": { + "sha512": "YliYZTf0dlY+GH5F1kBjReoPPqXUqJNuhEEd85g88aoeMRsrZNQZqK3qVWaQujl8zaM1pghBhiynXfj5W0X5nQ==", + "type": "package", + "path": "System.AppContext/4.1.0", + "files": [ + "System.AppContext.4.1.0.nupkg.sha512", + "System.AppContext.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.AppContext.dll", + "lib/net463/System.AppContext.dll", + "lib/netcore50/System.AppContext.dll", + "lib/netstandard1.6/System.AppContext.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.AppContext.dll", + "ref/net463/System.AppContext.dll", + "ref/netstandard/_._", + "ref/netstandard1.3/System.AppContext.dll", + "ref/netstandard1.3/System.AppContext.xml", + "ref/netstandard1.3/de/System.AppContext.xml", + "ref/netstandard1.3/es/System.AppContext.xml", + "ref/netstandard1.3/fr/System.AppContext.xml", + "ref/netstandard1.3/it/System.AppContext.xml", + "ref/netstandard1.3/ja/System.AppContext.xml", + "ref/netstandard1.3/ko/System.AppContext.xml", + "ref/netstandard1.3/ru/System.AppContext.xml", + "ref/netstandard1.3/zh-hans/System.AppContext.xml", + "ref/netstandard1.3/zh-hant/System.AppContext.xml", + "ref/netstandard1.6/System.AppContext.dll", + "ref/netstandard1.6/System.AppContext.xml", + "ref/netstandard1.6/de/System.AppContext.xml", + "ref/netstandard1.6/es/System.AppContext.xml", + "ref/netstandard1.6/fr/System.AppContext.xml", + "ref/netstandard1.6/it/System.AppContext.xml", + "ref/netstandard1.6/ja/System.AppContext.xml", + "ref/netstandard1.6/ko/System.AppContext.xml", + "ref/netstandard1.6/ru/System.AppContext.xml", + "ref/netstandard1.6/zh-hans/System.AppContext.xml", + "ref/netstandard1.6/zh-hant/System.AppContext.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.AppContext.dll" + ] + }, + "System.Buffers/4.0.0": { + "sha512": "ZzXO4AkiHOKWZaYKky/JfkAdi8MHyqJU/VM1yyyLVDJXkxzdr/bB1KdFiAyyivLg+xse1WMFgPppiPIVheXWIw==", + "type": "package", + "path": "System.Buffers/4.0.0", + "files": [ + "System.Buffers.4.0.0.nupkg.sha512", + "System.Buffers.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.1/.xml", + "lib/netstandard1.1/System.Buffers.dll" + ] + }, + "System.Collections/4.0.11": { + "sha512": "mwplfsKawu6y513xLRRvP6akVQI4Qj+fip1cZmw3OXP+nMYSIHFviPSeQLZfu5xtr0OJ3qSD7wPENO2GdypOfQ==", + "type": "package", + "path": "System.Collections/4.0.11", + "files": [ + "System.Collections.4.0.11.nupkg.sha512", + "System.Collections.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Collections.dll", + "ref/netcore50/System.Collections.xml", + "ref/netcore50/de/System.Collections.xml", + "ref/netcore50/es/System.Collections.xml", + "ref/netcore50/fr/System.Collections.xml", + "ref/netcore50/it/System.Collections.xml", + "ref/netcore50/ja/System.Collections.xml", + "ref/netcore50/ko/System.Collections.xml", + "ref/netcore50/ru/System.Collections.xml", + "ref/netcore50/zh-hans/System.Collections.xml", + "ref/netcore50/zh-hant/System.Collections.xml", + "ref/netstandard1.0/System.Collections.dll", + "ref/netstandard1.0/System.Collections.xml", + "ref/netstandard1.0/de/System.Collections.xml", + "ref/netstandard1.0/es/System.Collections.xml", + "ref/netstandard1.0/fr/System.Collections.xml", + "ref/netstandard1.0/it/System.Collections.xml", + "ref/netstandard1.0/ja/System.Collections.xml", + "ref/netstandard1.0/ko/System.Collections.xml", + "ref/netstandard1.0/ru/System.Collections.xml", + "ref/netstandard1.0/zh-hans/System.Collections.xml", + "ref/netstandard1.0/zh-hant/System.Collections.xml", + "ref/netstandard1.3/System.Collections.dll", + "ref/netstandard1.3/System.Collections.xml", + "ref/netstandard1.3/de/System.Collections.xml", + "ref/netstandard1.3/es/System.Collections.xml", + "ref/netstandard1.3/fr/System.Collections.xml", + "ref/netstandard1.3/it/System.Collections.xml", + "ref/netstandard1.3/ja/System.Collections.xml", + "ref/netstandard1.3/ko/System.Collections.xml", + "ref/netstandard1.3/ru/System.Collections.xml", + "ref/netstandard1.3/zh-hans/System.Collections.xml", + "ref/netstandard1.3/zh-hant/System.Collections.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Collections.Concurrent/4.0.12": { + "sha512": "9mK7U6Ax9PZWf4H/UuCHOY3zg1lwE7EXSNJTyWXXPcKIGriC3ewZMZ9qRBf+M9xzaA2jd86bEd/JQ7fptdwMTg==", + "type": "package", + "path": "System.Collections.Concurrent/4.0.12", + "files": [ + "System.Collections.Concurrent.4.0.12.nupkg.sha512", + "System.Collections.Concurrent.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Collections.Concurrent.dll", + "lib/netstandard1.3/System.Collections.Concurrent.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Collections.Concurrent.dll", + "ref/netcore50/System.Collections.Concurrent.xml", + "ref/netcore50/de/System.Collections.Concurrent.xml", + "ref/netcore50/es/System.Collections.Concurrent.xml", + "ref/netcore50/fr/System.Collections.Concurrent.xml", + "ref/netcore50/it/System.Collections.Concurrent.xml", + "ref/netcore50/ja/System.Collections.Concurrent.xml", + "ref/netcore50/ko/System.Collections.Concurrent.xml", + "ref/netcore50/ru/System.Collections.Concurrent.xml", + "ref/netcore50/zh-hans/System.Collections.Concurrent.xml", + "ref/netcore50/zh-hant/System.Collections.Concurrent.xml", + "ref/netstandard1.1/System.Collections.Concurrent.dll", + "ref/netstandard1.1/System.Collections.Concurrent.xml", + "ref/netstandard1.1/de/System.Collections.Concurrent.xml", + "ref/netstandard1.1/es/System.Collections.Concurrent.xml", + "ref/netstandard1.1/fr/System.Collections.Concurrent.xml", + "ref/netstandard1.1/it/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ja/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ko/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ru/System.Collections.Concurrent.xml", + "ref/netstandard1.1/zh-hans/System.Collections.Concurrent.xml", + "ref/netstandard1.1/zh-hant/System.Collections.Concurrent.xml", + "ref/netstandard1.3/System.Collections.Concurrent.dll", + "ref/netstandard1.3/System.Collections.Concurrent.xml", + "ref/netstandard1.3/de/System.Collections.Concurrent.xml", + "ref/netstandard1.3/es/System.Collections.Concurrent.xml", + "ref/netstandard1.3/fr/System.Collections.Concurrent.xml", + "ref/netstandard1.3/it/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ja/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ko/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ru/System.Collections.Concurrent.xml", + "ref/netstandard1.3/zh-hans/System.Collections.Concurrent.xml", + "ref/netstandard1.3/zh-hant/System.Collections.Concurrent.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Console/4.0.0": { + "sha512": "nOPtaHrRruntGbl1QQh9TwI3+fVAADecgAPMzrnrXasu9ArHEiH3ifjV2Hocf/RYYOWleOHm1Hdl5zwivIPGBw==", + "type": "package", + "path": "System.Console/4.0.0", + "files": [ + "System.Console.4.0.0.nupkg.sha512", + "System.Console.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Console.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Console.dll", + "ref/netstandard1.3/System.Console.dll", + "ref/netstandard1.3/System.Console.xml", + "ref/netstandard1.3/de/System.Console.xml", + "ref/netstandard1.3/es/System.Console.xml", + "ref/netstandard1.3/fr/System.Console.xml", + "ref/netstandard1.3/it/System.Console.xml", + "ref/netstandard1.3/ja/System.Console.xml", + "ref/netstandard1.3/ko/System.Console.xml", + "ref/netstandard1.3/ru/System.Console.xml", + "ref/netstandard1.3/zh-hans/System.Console.xml", + "ref/netstandard1.3/zh-hant/System.Console.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.Debug/4.0.11": { + "sha512": "83pJvRSUCL5y4dC2Q8wG7ItblNtguWXbC8pf/easfFsRr3IylY4nl/r1YMD+f3LHeheRFR31xaBinHr19Zk7fw==", + "type": "package", + "path": "System.Diagnostics.Debug/4.0.11", + "files": [ + "System.Diagnostics.Debug.4.0.11.nupkg.sha512", + "System.Diagnostics.Debug.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Diagnostics.Debug.dll", + "ref/netcore50/System.Diagnostics.Debug.xml", + "ref/netcore50/de/System.Diagnostics.Debug.xml", + "ref/netcore50/es/System.Diagnostics.Debug.xml", + "ref/netcore50/fr/System.Diagnostics.Debug.xml", + "ref/netcore50/it/System.Diagnostics.Debug.xml", + "ref/netcore50/ja/System.Diagnostics.Debug.xml", + "ref/netcore50/ko/System.Diagnostics.Debug.xml", + "ref/netcore50/ru/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/System.Diagnostics.Debug.dll", + "ref/netstandard1.0/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/System.Diagnostics.Debug.dll", + "ref/netstandard1.3/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hant/System.Diagnostics.Debug.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.DiagnosticSource/4.0.0": { + "sha512": "BC7VEwjFn4JP5nammI3FihCjXy78cNPOt7lMOjCLSol3EfpvM4kR9hO3vxXhhh+ljUsJZEytCGYWz97RVnPdHA==", + "type": "package", + "path": "System.Diagnostics.DiagnosticSource/4.0.0", + "files": [ + "System.Diagnostics.DiagnosticSource.4.0.0.nupkg.sha512", + "System.Diagnostics.DiagnosticSource.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/net46/System.Diagnostics.DiagnosticSource.dll", + "lib/net46/System.Diagnostics.DiagnosticSource.xml", + "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.dll", + "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.xml", + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll", + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.xml", + "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.dll", + "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.xml" + ] + }, + "System.Diagnostics.Tools/4.0.1": { + "sha512": "7q2sNlaOVvUgBFJvqzM7IZm5aJgSbGObJDZ2kQZFLjrAmpLf5GiDzlmHc539OkGnTRT3UvsFapHkkxM+awMCuQ==", + "type": "package", + "path": "System.Diagnostics.Tools/4.0.1", + "files": [ + "System.Diagnostics.Tools.4.0.1.nupkg.sha512", + "System.Diagnostics.Tools.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Diagnostics.Tools.dll", + "ref/netcore50/System.Diagnostics.Tools.xml", + "ref/netcore50/de/System.Diagnostics.Tools.xml", + "ref/netcore50/es/System.Diagnostics.Tools.xml", + "ref/netcore50/fr/System.Diagnostics.Tools.xml", + "ref/netcore50/it/System.Diagnostics.Tools.xml", + "ref/netcore50/ja/System.Diagnostics.Tools.xml", + "ref/netcore50/ko/System.Diagnostics.Tools.xml", + "ref/netcore50/ru/System.Diagnostics.Tools.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Tools.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/System.Diagnostics.Tools.dll", + "ref/netstandard1.0/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/de/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/es/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/fr/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/it/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ja/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ko/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ru/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/zh-hans/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/zh-hant/System.Diagnostics.Tools.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.Tracing/4.1.0": { + "sha512": "5wK1axG5QMGZuzZoc+j2Eh7EssfmKSE34yAVqu09df4u2KRGf18RzJbtJNLQ+hZ4rvRaJH26R0+zLk0u07sF7g==", + "type": "package", + "path": "System.Diagnostics.Tracing/4.1.0", + "files": [ + "System.Diagnostics.Tracing.4.1.0.nupkg.sha512", + "System.Diagnostics.Tracing.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Diagnostics.Tracing.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Diagnostics.Tracing.dll", + "ref/netcore50/System.Diagnostics.Tracing.dll", + "ref/netcore50/System.Diagnostics.Tracing.xml", + "ref/netcore50/de/System.Diagnostics.Tracing.xml", + "ref/netcore50/es/System.Diagnostics.Tracing.xml", + "ref/netcore50/fr/System.Diagnostics.Tracing.xml", + "ref/netcore50/it/System.Diagnostics.Tracing.xml", + "ref/netcore50/ja/System.Diagnostics.Tracing.xml", + "ref/netcore50/ko/System.Diagnostics.Tracing.xml", + "ref/netcore50/ru/System.Diagnostics.Tracing.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/System.Diagnostics.Tracing.dll", + "ref/netstandard1.1/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/System.Diagnostics.Tracing.dll", + "ref/netstandard1.2/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/System.Diagnostics.Tracing.dll", + "ref/netstandard1.3/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/System.Diagnostics.Tracing.dll", + "ref/netstandard1.5/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/zh-hant/System.Diagnostics.Tracing.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Globalization/4.0.11": { + "sha512": "BG5Pd7hvytuDEaRLHgbdFiuB29oPiLEPjr3Z5S6xPgRGQzoRMv6QaZV+4RPbygXC80xkMa9wcNZFwzayQ4Zk1A==", + "type": "package", + "path": "System.Globalization/4.0.11", + "files": [ + "System.Globalization.4.0.11.nupkg.sha512", + "System.Globalization.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Globalization.dll", + "ref/netcore50/System.Globalization.xml", + "ref/netcore50/de/System.Globalization.xml", + "ref/netcore50/es/System.Globalization.xml", + "ref/netcore50/fr/System.Globalization.xml", + "ref/netcore50/it/System.Globalization.xml", + "ref/netcore50/ja/System.Globalization.xml", + "ref/netcore50/ko/System.Globalization.xml", + "ref/netcore50/ru/System.Globalization.xml", + "ref/netcore50/zh-hans/System.Globalization.xml", + "ref/netcore50/zh-hant/System.Globalization.xml", + "ref/netstandard1.0/System.Globalization.dll", + "ref/netstandard1.0/System.Globalization.xml", + "ref/netstandard1.0/de/System.Globalization.xml", + "ref/netstandard1.0/es/System.Globalization.xml", + "ref/netstandard1.0/fr/System.Globalization.xml", + "ref/netstandard1.0/it/System.Globalization.xml", + "ref/netstandard1.0/ja/System.Globalization.xml", + "ref/netstandard1.0/ko/System.Globalization.xml", + "ref/netstandard1.0/ru/System.Globalization.xml", + "ref/netstandard1.0/zh-hans/System.Globalization.xml", + "ref/netstandard1.0/zh-hant/System.Globalization.xml", + "ref/netstandard1.3/System.Globalization.dll", + "ref/netstandard1.3/System.Globalization.xml", + "ref/netstandard1.3/de/System.Globalization.xml", + "ref/netstandard1.3/es/System.Globalization.xml", + "ref/netstandard1.3/fr/System.Globalization.xml", + "ref/netstandard1.3/it/System.Globalization.xml", + "ref/netstandard1.3/ja/System.Globalization.xml", + "ref/netstandard1.3/ko/System.Globalization.xml", + "ref/netstandard1.3/ru/System.Globalization.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Globalization.Calendars/4.0.1": { + "sha512": "uBna2y72JXZ9GlK7nTVSQTNFLXWXL2SplVrMvT44iTmabZRynEj1LtN2Kejk537wn5RQtgB7V1PdfCdMChtyXg==", + "type": "package", + "path": "System.Globalization.Calendars/4.0.1", + "files": [ + "System.Globalization.Calendars.4.0.1.nupkg.sha512", + "System.Globalization.Calendars.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Globalization.Calendars.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Globalization.Calendars.dll", + "ref/netstandard1.3/System.Globalization.Calendars.dll", + "ref/netstandard1.3/System.Globalization.Calendars.xml", + "ref/netstandard1.3/de/System.Globalization.Calendars.xml", + "ref/netstandard1.3/es/System.Globalization.Calendars.xml", + "ref/netstandard1.3/fr/System.Globalization.Calendars.xml", + "ref/netstandard1.3/it/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ja/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ko/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ru/System.Globalization.Calendars.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.Calendars.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.Calendars.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO/4.1.0": { + "sha512": "stML5fQWSMwuKmQZFaQNuZPiO/P7MZ2kcbYPVeDzOJvnfnmjP1fhNzX25Z7g+qVAVeEzCis3fcAhUzkn1Nrw7g==", + "type": "package", + "path": "System.IO/4.1.0", + "files": [ + "System.IO.4.1.0.nupkg.sha512", + "System.IO.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.IO.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.IO.dll", + "ref/netcore50/System.IO.dll", + "ref/netcore50/System.IO.xml", + "ref/netcore50/de/System.IO.xml", + "ref/netcore50/es/System.IO.xml", + "ref/netcore50/fr/System.IO.xml", + "ref/netcore50/it/System.IO.xml", + "ref/netcore50/ja/System.IO.xml", + "ref/netcore50/ko/System.IO.xml", + "ref/netcore50/ru/System.IO.xml", + "ref/netcore50/zh-hans/System.IO.xml", + "ref/netcore50/zh-hant/System.IO.xml", + "ref/netstandard1.0/System.IO.dll", + "ref/netstandard1.0/System.IO.xml", + "ref/netstandard1.0/de/System.IO.xml", + "ref/netstandard1.0/es/System.IO.xml", + "ref/netstandard1.0/fr/System.IO.xml", + "ref/netstandard1.0/it/System.IO.xml", + "ref/netstandard1.0/ja/System.IO.xml", + "ref/netstandard1.0/ko/System.IO.xml", + "ref/netstandard1.0/ru/System.IO.xml", + "ref/netstandard1.0/zh-hans/System.IO.xml", + "ref/netstandard1.0/zh-hant/System.IO.xml", + "ref/netstandard1.3/System.IO.dll", + "ref/netstandard1.3/System.IO.xml", + "ref/netstandard1.3/de/System.IO.xml", + "ref/netstandard1.3/es/System.IO.xml", + "ref/netstandard1.3/fr/System.IO.xml", + "ref/netstandard1.3/it/System.IO.xml", + "ref/netstandard1.3/ja/System.IO.xml", + "ref/netstandard1.3/ko/System.IO.xml", + "ref/netstandard1.3/ru/System.IO.xml", + "ref/netstandard1.3/zh-hans/System.IO.xml", + "ref/netstandard1.3/zh-hant/System.IO.xml", + "ref/netstandard1.5/System.IO.dll", + "ref/netstandard1.5/System.IO.xml", + "ref/netstandard1.5/de/System.IO.xml", + "ref/netstandard1.5/es/System.IO.xml", + "ref/netstandard1.5/fr/System.IO.xml", + "ref/netstandard1.5/it/System.IO.xml", + "ref/netstandard1.5/ja/System.IO.xml", + "ref/netstandard1.5/ko/System.IO.xml", + "ref/netstandard1.5/ru/System.IO.xml", + "ref/netstandard1.5/zh-hans/System.IO.xml", + "ref/netstandard1.5/zh-hant/System.IO.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.Compression/4.1.0": { + "sha512": "mKlF002BhZoq3am8+ETvo+6CFdXSY1x+H48XsnIIR9JH1LWJrVHXNBE+gdrgbEVDCuJcBwxUTSXnJCQwoVY9JA==", + "type": "package", + "path": "System.IO.Compression/4.1.0", + "files": [ + "System.IO.Compression.4.1.0.nupkg.sha512", + "System.IO.Compression.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net46/System.IO.Compression.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net46/System.IO.Compression.dll", + "ref/netcore50/System.IO.Compression.dll", + "ref/netcore50/System.IO.Compression.xml", + "ref/netcore50/de/System.IO.Compression.xml", + "ref/netcore50/es/System.IO.Compression.xml", + "ref/netcore50/fr/System.IO.Compression.xml", + "ref/netcore50/it/System.IO.Compression.xml", + "ref/netcore50/ja/System.IO.Compression.xml", + "ref/netcore50/ko/System.IO.Compression.xml", + "ref/netcore50/ru/System.IO.Compression.xml", + "ref/netcore50/zh-hans/System.IO.Compression.xml", + "ref/netcore50/zh-hant/System.IO.Compression.xml", + "ref/netstandard1.1/System.IO.Compression.dll", + "ref/netstandard1.1/System.IO.Compression.xml", + "ref/netstandard1.1/de/System.IO.Compression.xml", + "ref/netstandard1.1/es/System.IO.Compression.xml", + "ref/netstandard1.1/fr/System.IO.Compression.xml", + "ref/netstandard1.1/it/System.IO.Compression.xml", + "ref/netstandard1.1/ja/System.IO.Compression.xml", + "ref/netstandard1.1/ko/System.IO.Compression.xml", + "ref/netstandard1.1/ru/System.IO.Compression.xml", + "ref/netstandard1.1/zh-hans/System.IO.Compression.xml", + "ref/netstandard1.1/zh-hant/System.IO.Compression.xml", + "ref/netstandard1.3/System.IO.Compression.dll", + "ref/netstandard1.3/System.IO.Compression.xml", + "ref/netstandard1.3/de/System.IO.Compression.xml", + "ref/netstandard1.3/es/System.IO.Compression.xml", + "ref/netstandard1.3/fr/System.IO.Compression.xml", + "ref/netstandard1.3/it/System.IO.Compression.xml", + "ref/netstandard1.3/ja/System.IO.Compression.xml", + "ref/netstandard1.3/ko/System.IO.Compression.xml", + "ref/netstandard1.3/ru/System.IO.Compression.xml", + "ref/netstandard1.3/zh-hans/System.IO.Compression.xml", + "ref/netstandard1.3/zh-hant/System.IO.Compression.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll", + "runtimes/win/lib/net46/System.IO.Compression.dll", + "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll" + ] + }, + "System.IO.Compression.ZipFile/4.0.1": { + "sha512": "Pt2BT4T1e1u+WUrxh8qUW8eqNM7rfkjxg4IeVLvD+EiDr9jcgMv1XgxxVvG1XkkHUHzS20M3BCJgul/WlKQeDw==", + "type": "package", + "path": "System.IO.Compression.ZipFile/4.0.1", + "files": [ + "System.IO.Compression.ZipFile.4.0.1.nupkg.sha512", + "System.IO.Compression.ZipFile.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.Compression.ZipFile.dll", + "lib/netstandard1.3/System.IO.Compression.ZipFile.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.Compression.ZipFile.dll", + "ref/netstandard1.3/System.IO.Compression.ZipFile.dll", + "ref/netstandard1.3/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/de/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/es/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/fr/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/it/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ja/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ko/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ru/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/zh-hans/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/zh-hant/System.IO.Compression.ZipFile.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.FileSystem/4.0.1": { + "sha512": "hWOEqQgS7o365aYBdX1jmFtlviNM4pa40J2iF3AhhK6Ejiv65OiYxchiqDNzVRf74qMjmB4pzmyS3BhzBzsRxA==", + "type": "package", + "path": "System.IO.FileSystem/4.0.1", + "files": [ + "System.IO.FileSystem.4.0.1.nupkg.sha512", + "System.IO.FileSystem.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.FileSystem.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.FileSystem.dll", + "ref/netstandard1.3/System.IO.FileSystem.dll", + "ref/netstandard1.3/System.IO.FileSystem.xml", + "ref/netstandard1.3/de/System.IO.FileSystem.xml", + "ref/netstandard1.3/es/System.IO.FileSystem.xml", + "ref/netstandard1.3/fr/System.IO.FileSystem.xml", + "ref/netstandard1.3/it/System.IO.FileSystem.xml", + "ref/netstandard1.3/ja/System.IO.FileSystem.xml", + "ref/netstandard1.3/ko/System.IO.FileSystem.xml", + "ref/netstandard1.3/ru/System.IO.FileSystem.xml", + "ref/netstandard1.3/zh-hans/System.IO.FileSystem.xml", + "ref/netstandard1.3/zh-hant/System.IO.FileSystem.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.FileSystem.Primitives/4.0.1": { + "sha512": "Btv+9SpIUSugh/AjSnU7HLvmkhAyLermMR0z1ylJY8S2qOnTHnIbCBg7lDnaGfAf5BV8isr9VdY1xA4DQ/T34g==", + "type": "package", + "path": "System.IO.FileSystem.Primitives/4.0.1", + "files": [ + "System.IO.FileSystem.Primitives.4.0.1.nupkg.sha512", + "System.IO.FileSystem.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.FileSystem.Primitives.dll", + "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.FileSystem.Primitives.dll", + "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll", + "ref/netstandard1.3/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/de/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/es/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/fr/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/it/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ja/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ko/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ru/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/zh-hans/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/zh-hant/System.IO.FileSystem.Primitives.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Linq/4.1.0": { + "sha512": "rq0EWQ5ZBqECsUovstOkYXZTfE9WqolLmoohImCCjYahxy45DNEJMPa2KNb9citrzZ1I/u16XLlU/IlJcUIkRQ==", + "type": "package", + "path": "System.Linq/4.1.0", + "files": [ + "System.Linq.4.1.0.nupkg.sha512", + "System.Linq.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Linq.dll", + "lib/netcore50/System.Linq.dll", + "lib/netstandard1.6/System.Linq.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Linq.dll", + "ref/netcore50/System.Linq.dll", + "ref/netcore50/System.Linq.xml", + "ref/netcore50/de/System.Linq.xml", + "ref/netcore50/es/System.Linq.xml", + "ref/netcore50/fr/System.Linq.xml", + "ref/netcore50/it/System.Linq.xml", + "ref/netcore50/ja/System.Linq.xml", + "ref/netcore50/ko/System.Linq.xml", + "ref/netcore50/ru/System.Linq.xml", + "ref/netcore50/zh-hans/System.Linq.xml", + "ref/netcore50/zh-hant/System.Linq.xml", + "ref/netstandard1.0/System.Linq.dll", + "ref/netstandard1.0/System.Linq.xml", + "ref/netstandard1.0/de/System.Linq.xml", + "ref/netstandard1.0/es/System.Linq.xml", + "ref/netstandard1.0/fr/System.Linq.xml", + "ref/netstandard1.0/it/System.Linq.xml", + "ref/netstandard1.0/ja/System.Linq.xml", + "ref/netstandard1.0/ko/System.Linq.xml", + "ref/netstandard1.0/ru/System.Linq.xml", + "ref/netstandard1.0/zh-hans/System.Linq.xml", + "ref/netstandard1.0/zh-hant/System.Linq.xml", + "ref/netstandard1.6/System.Linq.dll", + "ref/netstandard1.6/System.Linq.xml", + "ref/netstandard1.6/de/System.Linq.xml", + "ref/netstandard1.6/es/System.Linq.xml", + "ref/netstandard1.6/fr/System.Linq.xml", + "ref/netstandard1.6/it/System.Linq.xml", + "ref/netstandard1.6/ja/System.Linq.xml", + "ref/netstandard1.6/ko/System.Linq.xml", + "ref/netstandard1.6/ru/System.Linq.xml", + "ref/netstandard1.6/zh-hans/System.Linq.xml", + "ref/netstandard1.6/zh-hant/System.Linq.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Linq.Expressions/4.1.0": { + "sha512": "iu3b7MdQf7sxMs2bxEavbMHEswAt/hmX/fB2dGCfys/49JkFDypyt50Z1kibJHs+saRG0cZQospDQaX/mVCrIw==", + "type": "package", + "path": "System.Linq.Expressions/4.1.0", + "files": [ + "System.Linq.Expressions.4.1.0.nupkg.sha512", + "System.Linq.Expressions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Linq.Expressions.dll", + "lib/netcore50/System.Linq.Expressions.dll", + "lib/netstandard1.6/System.Linq.Expressions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Linq.Expressions.dll", + "ref/netcore50/System.Linq.Expressions.dll", + "ref/netcore50/System.Linq.Expressions.xml", + "ref/netcore50/de/System.Linq.Expressions.xml", + "ref/netcore50/es/System.Linq.Expressions.xml", + "ref/netcore50/fr/System.Linq.Expressions.xml", + "ref/netcore50/it/System.Linq.Expressions.xml", + "ref/netcore50/ja/System.Linq.Expressions.xml", + "ref/netcore50/ko/System.Linq.Expressions.xml", + "ref/netcore50/ru/System.Linq.Expressions.xml", + "ref/netcore50/zh-hans/System.Linq.Expressions.xml", + "ref/netcore50/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.0/System.Linq.Expressions.dll", + "ref/netstandard1.0/System.Linq.Expressions.xml", + "ref/netstandard1.0/de/System.Linq.Expressions.xml", + "ref/netstandard1.0/es/System.Linq.Expressions.xml", + "ref/netstandard1.0/fr/System.Linq.Expressions.xml", + "ref/netstandard1.0/it/System.Linq.Expressions.xml", + "ref/netstandard1.0/ja/System.Linq.Expressions.xml", + "ref/netstandard1.0/ko/System.Linq.Expressions.xml", + "ref/netstandard1.0/ru/System.Linq.Expressions.xml", + "ref/netstandard1.0/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.0/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.3/System.Linq.Expressions.dll", + "ref/netstandard1.3/System.Linq.Expressions.xml", + "ref/netstandard1.3/de/System.Linq.Expressions.xml", + "ref/netstandard1.3/es/System.Linq.Expressions.xml", + "ref/netstandard1.3/fr/System.Linq.Expressions.xml", + "ref/netstandard1.3/it/System.Linq.Expressions.xml", + "ref/netstandard1.3/ja/System.Linq.Expressions.xml", + "ref/netstandard1.3/ko/System.Linq.Expressions.xml", + "ref/netstandard1.3/ru/System.Linq.Expressions.xml", + "ref/netstandard1.3/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.3/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.6/System.Linq.Expressions.dll", + "ref/netstandard1.6/System.Linq.Expressions.xml", + "ref/netstandard1.6/de/System.Linq.Expressions.xml", + "ref/netstandard1.6/es/System.Linq.Expressions.xml", + "ref/netstandard1.6/fr/System.Linq.Expressions.xml", + "ref/netstandard1.6/it/System.Linq.Expressions.xml", + "ref/netstandard1.6/ja/System.Linq.Expressions.xml", + "ref/netstandard1.6/ko/System.Linq.Expressions.xml", + "ref/netstandard1.6/ru/System.Linq.Expressions.xml", + "ref/netstandard1.6/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.6/zh-hant/System.Linq.Expressions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Linq.Expressions.dll" + ] + }, + "System.Net.Http/4.1.0": { + "sha512": "wMNvi4GE97do1XQVc66AGqbkFotZlgBigP3ja48ucG/SA5wH3yHN+TCY+1p+c31blGrgkwrG9OlDkKG/C/3arg==", + "type": "package", + "path": "System.Net.Http/4.1.0", + "files": [ + "System.Net.Http.4.1.0.nupkg.sha512", + "System.Net.Http.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/Xamarinmac20/_._", + "lib/monoandroid10/_._", + "lib/monotouch10/_._", + "lib/net45/_._", + "lib/net46/System.Net.Http.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/Xamarinmac20/_._", + "ref/monoandroid10/_._", + "ref/monotouch10/_._", + "ref/net45/_._", + "ref/net46/System.Net.Http.dll", + "ref/net46/System.Net.Http.xml", + "ref/net46/de/System.Net.Http.xml", + "ref/net46/es/System.Net.Http.xml", + "ref/net46/fr/System.Net.Http.xml", + "ref/net46/it/System.Net.Http.xml", + "ref/net46/ja/System.Net.Http.xml", + "ref/net46/ko/System.Net.Http.xml", + "ref/net46/ru/System.Net.Http.xml", + "ref/net46/zh-hans/System.Net.Http.xml", + "ref/net46/zh-hant/System.Net.Http.xml", + "ref/netcore50/System.Net.Http.dll", + "ref/netcore50/System.Net.Http.xml", + "ref/netcore50/de/System.Net.Http.xml", + "ref/netcore50/es/System.Net.Http.xml", + "ref/netcore50/fr/System.Net.Http.xml", + "ref/netcore50/it/System.Net.Http.xml", + "ref/netcore50/ja/System.Net.Http.xml", + "ref/netcore50/ko/System.Net.Http.xml", + "ref/netcore50/ru/System.Net.Http.xml", + "ref/netcore50/zh-hans/System.Net.Http.xml", + "ref/netcore50/zh-hant/System.Net.Http.xml", + "ref/netstandard1.1/System.Net.Http.dll", + "ref/netstandard1.1/System.Net.Http.xml", + "ref/netstandard1.1/de/System.Net.Http.xml", + "ref/netstandard1.1/es/System.Net.Http.xml", + "ref/netstandard1.1/fr/System.Net.Http.xml", + "ref/netstandard1.1/it/System.Net.Http.xml", + "ref/netstandard1.1/ja/System.Net.Http.xml", + "ref/netstandard1.1/ko/System.Net.Http.xml", + "ref/netstandard1.1/ru/System.Net.Http.xml", + "ref/netstandard1.1/zh-hans/System.Net.Http.xml", + "ref/netstandard1.1/zh-hant/System.Net.Http.xml", + "ref/netstandard1.3/System.Net.Http.dll", + "ref/netstandard1.3/System.Net.Http.xml", + "ref/netstandard1.3/de/System.Net.Http.xml", + "ref/netstandard1.3/es/System.Net.Http.xml", + "ref/netstandard1.3/fr/System.Net.Http.xml", + "ref/netstandard1.3/it/System.Net.Http.xml", + "ref/netstandard1.3/ja/System.Net.Http.xml", + "ref/netstandard1.3/ko/System.Net.Http.xml", + "ref/netstandard1.3/ru/System.Net.Http.xml", + "ref/netstandard1.3/zh-hans/System.Net.Http.xml", + "ref/netstandard1.3/zh-hant/System.Net.Http.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Net.Http.dll", + "runtimes/win/lib/net46/System.Net.Http.dll", + "runtimes/win/lib/netcore50/System.Net.Http.dll", + "runtimes/win/lib/netstandard1.3/System.Net.Http.dll" + ] + }, + "System.Net.Primitives/4.0.11": { + "sha512": "5Jcsej4YESroN9n6N9aBBPQdZVgVTKiXJEs8+qUfEyzkspMkhsMGnjhzOXkHtJcCU4gV7bL+NrvWG0OUaKuqQA==", + "type": "package", + "path": "System.Net.Primitives/4.0.11", + "files": [ + "System.Net.Primitives.4.0.11.nupkg.sha512", + "System.Net.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Net.Primitives.dll", + "ref/netcore50/System.Net.Primitives.xml", + "ref/netcore50/de/System.Net.Primitives.xml", + "ref/netcore50/es/System.Net.Primitives.xml", + "ref/netcore50/fr/System.Net.Primitives.xml", + "ref/netcore50/it/System.Net.Primitives.xml", + "ref/netcore50/ja/System.Net.Primitives.xml", + "ref/netcore50/ko/System.Net.Primitives.xml", + "ref/netcore50/ru/System.Net.Primitives.xml", + "ref/netcore50/zh-hans/System.Net.Primitives.xml", + "ref/netcore50/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.0/System.Net.Primitives.dll", + "ref/netstandard1.0/System.Net.Primitives.xml", + "ref/netstandard1.0/de/System.Net.Primitives.xml", + "ref/netstandard1.0/es/System.Net.Primitives.xml", + "ref/netstandard1.0/fr/System.Net.Primitives.xml", + "ref/netstandard1.0/it/System.Net.Primitives.xml", + "ref/netstandard1.0/ja/System.Net.Primitives.xml", + "ref/netstandard1.0/ko/System.Net.Primitives.xml", + "ref/netstandard1.0/ru/System.Net.Primitives.xml", + "ref/netstandard1.0/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.0/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.1/System.Net.Primitives.dll", + "ref/netstandard1.1/System.Net.Primitives.xml", + "ref/netstandard1.1/de/System.Net.Primitives.xml", + "ref/netstandard1.1/es/System.Net.Primitives.xml", + "ref/netstandard1.1/fr/System.Net.Primitives.xml", + "ref/netstandard1.1/it/System.Net.Primitives.xml", + "ref/netstandard1.1/ja/System.Net.Primitives.xml", + "ref/netstandard1.1/ko/System.Net.Primitives.xml", + "ref/netstandard1.1/ru/System.Net.Primitives.xml", + "ref/netstandard1.1/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.1/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.3/System.Net.Primitives.dll", + "ref/netstandard1.3/System.Net.Primitives.xml", + "ref/netstandard1.3/de/System.Net.Primitives.xml", + "ref/netstandard1.3/es/System.Net.Primitives.xml", + "ref/netstandard1.3/fr/System.Net.Primitives.xml", + "ref/netstandard1.3/it/System.Net.Primitives.xml", + "ref/netstandard1.3/ja/System.Net.Primitives.xml", + "ref/netstandard1.3/ko/System.Net.Primitives.xml", + "ref/netstandard1.3/ru/System.Net.Primitives.xml", + "ref/netstandard1.3/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.3/zh-hant/System.Net.Primitives.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Net.Sockets/4.1.0": { + "sha512": "F271kv+fITuLEJwu2S3THxvWDNtyqJYJXPTs7odokdH57imZwXI/7nOLyzCgPj9/rWEdh7U6upLBlIwHaNPl0w==", + "type": "package", + "path": "System.Net.Sockets/4.1.0", + "files": [ + "System.Net.Sockets.4.1.0.nupkg.sha512", + "System.Net.Sockets.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Net.Sockets.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Net.Sockets.dll", + "ref/netstandard1.3/System.Net.Sockets.dll", + "ref/netstandard1.3/System.Net.Sockets.xml", + "ref/netstandard1.3/de/System.Net.Sockets.xml", + "ref/netstandard1.3/es/System.Net.Sockets.xml", + "ref/netstandard1.3/fr/System.Net.Sockets.xml", + "ref/netstandard1.3/it/System.Net.Sockets.xml", + "ref/netstandard1.3/ja/System.Net.Sockets.xml", + "ref/netstandard1.3/ko/System.Net.Sockets.xml", + "ref/netstandard1.3/ru/System.Net.Sockets.xml", + "ref/netstandard1.3/zh-hans/System.Net.Sockets.xml", + "ref/netstandard1.3/zh-hant/System.Net.Sockets.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.ObjectModel/4.0.12": { + "sha512": "n1UH+5IP0/L/3/y46Wct3lb9mQBAjHmf8DB0dWb4PH1gofcXbAk43Fygii+FcA/WgHrPdi0HIhqYLF9kG3PWQw==", + "type": "package", + "path": "System.ObjectModel/4.0.12", + "files": [ + "System.ObjectModel.4.0.12.nupkg.sha512", + "System.ObjectModel.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.ObjectModel.dll", + "lib/netstandard1.3/System.ObjectModel.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.ObjectModel.dll", + "ref/netcore50/System.ObjectModel.xml", + "ref/netcore50/de/System.ObjectModel.xml", + "ref/netcore50/es/System.ObjectModel.xml", + "ref/netcore50/fr/System.ObjectModel.xml", + "ref/netcore50/it/System.ObjectModel.xml", + "ref/netcore50/ja/System.ObjectModel.xml", + "ref/netcore50/ko/System.ObjectModel.xml", + "ref/netcore50/ru/System.ObjectModel.xml", + "ref/netcore50/zh-hans/System.ObjectModel.xml", + "ref/netcore50/zh-hant/System.ObjectModel.xml", + "ref/netstandard1.0/System.ObjectModel.dll", + "ref/netstandard1.0/System.ObjectModel.xml", + "ref/netstandard1.0/de/System.ObjectModel.xml", + "ref/netstandard1.0/es/System.ObjectModel.xml", + "ref/netstandard1.0/fr/System.ObjectModel.xml", + "ref/netstandard1.0/it/System.ObjectModel.xml", + "ref/netstandard1.0/ja/System.ObjectModel.xml", + "ref/netstandard1.0/ko/System.ObjectModel.xml", + "ref/netstandard1.0/ru/System.ObjectModel.xml", + "ref/netstandard1.0/zh-hans/System.ObjectModel.xml", + "ref/netstandard1.0/zh-hant/System.ObjectModel.xml", + "ref/netstandard1.3/System.ObjectModel.dll", + "ref/netstandard1.3/System.ObjectModel.xml", + "ref/netstandard1.3/de/System.ObjectModel.xml", + "ref/netstandard1.3/es/System.ObjectModel.xml", + "ref/netstandard1.3/fr/System.ObjectModel.xml", + "ref/netstandard1.3/it/System.ObjectModel.xml", + "ref/netstandard1.3/ja/System.ObjectModel.xml", + "ref/netstandard1.3/ko/System.ObjectModel.xml", + "ref/netstandard1.3/ru/System.ObjectModel.xml", + "ref/netstandard1.3/zh-hans/System.ObjectModel.xml", + "ref/netstandard1.3/zh-hant/System.ObjectModel.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection/4.1.0": { + "sha512": "acBbxohOI45FiZ3EjQuGnPs5zWzzbxFyW81zh/o6LWtCdA8XApsZR37VTqwpTMpDInVlhziswd6ut5vdo5G3uA==", + "type": "package", + "path": "System.Reflection/4.1.0", + "files": [ + "System.Reflection.4.1.0.nupkg.sha512", + "System.Reflection.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Reflection.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Reflection.dll", + "ref/netcore50/System.Reflection.dll", + "ref/netcore50/System.Reflection.xml", + "ref/netcore50/de/System.Reflection.xml", + "ref/netcore50/es/System.Reflection.xml", + "ref/netcore50/fr/System.Reflection.xml", + "ref/netcore50/it/System.Reflection.xml", + "ref/netcore50/ja/System.Reflection.xml", + "ref/netcore50/ko/System.Reflection.xml", + "ref/netcore50/ru/System.Reflection.xml", + "ref/netcore50/zh-hans/System.Reflection.xml", + "ref/netcore50/zh-hant/System.Reflection.xml", + "ref/netstandard1.0/System.Reflection.dll", + "ref/netstandard1.0/System.Reflection.xml", + "ref/netstandard1.0/de/System.Reflection.xml", + "ref/netstandard1.0/es/System.Reflection.xml", + "ref/netstandard1.0/fr/System.Reflection.xml", + "ref/netstandard1.0/it/System.Reflection.xml", + "ref/netstandard1.0/ja/System.Reflection.xml", + "ref/netstandard1.0/ko/System.Reflection.xml", + "ref/netstandard1.0/ru/System.Reflection.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.xml", + "ref/netstandard1.3/System.Reflection.dll", + "ref/netstandard1.3/System.Reflection.xml", + "ref/netstandard1.3/de/System.Reflection.xml", + "ref/netstandard1.3/es/System.Reflection.xml", + "ref/netstandard1.3/fr/System.Reflection.xml", + "ref/netstandard1.3/it/System.Reflection.xml", + "ref/netstandard1.3/ja/System.Reflection.xml", + "ref/netstandard1.3/ko/System.Reflection.xml", + "ref/netstandard1.3/ru/System.Reflection.xml", + "ref/netstandard1.3/zh-hans/System.Reflection.xml", + "ref/netstandard1.3/zh-hant/System.Reflection.xml", + "ref/netstandard1.5/System.Reflection.dll", + "ref/netstandard1.5/System.Reflection.xml", + "ref/netstandard1.5/de/System.Reflection.xml", + "ref/netstandard1.5/es/System.Reflection.xml", + "ref/netstandard1.5/fr/System.Reflection.xml", + "ref/netstandard1.5/it/System.Reflection.xml", + "ref/netstandard1.5/ja/System.Reflection.xml", + "ref/netstandard1.5/ko/System.Reflection.xml", + "ref/netstandard1.5/ru/System.Reflection.xml", + "ref/netstandard1.5/zh-hans/System.Reflection.xml", + "ref/netstandard1.5/zh-hant/System.Reflection.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection.Extensions/4.0.1": { + "sha512": "cermPUL6uL4XrW/O/2a5RRJ0yjRYL0JkcHLYr/kawTv06VILEtUc1K2/s87tgl1pAzHICOTjUCGfnT8Fp9fD/Q==", + "type": "package", + "path": "System.Reflection.Extensions/4.0.1", + "files": [ + "System.Reflection.Extensions.4.0.1.nupkg.sha512", + "System.Reflection.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Extensions.dll", + "ref/netcore50/System.Reflection.Extensions.xml", + "ref/netcore50/de/System.Reflection.Extensions.xml", + "ref/netcore50/es/System.Reflection.Extensions.xml", + "ref/netcore50/fr/System.Reflection.Extensions.xml", + "ref/netcore50/it/System.Reflection.Extensions.xml", + "ref/netcore50/ja/System.Reflection.Extensions.xml", + "ref/netcore50/ko/System.Reflection.Extensions.xml", + "ref/netcore50/ru/System.Reflection.Extensions.xml", + "ref/netcore50/zh-hans/System.Reflection.Extensions.xml", + "ref/netcore50/zh-hant/System.Reflection.Extensions.xml", + "ref/netstandard1.0/System.Reflection.Extensions.dll", + "ref/netstandard1.0/System.Reflection.Extensions.xml", + "ref/netstandard1.0/de/System.Reflection.Extensions.xml", + "ref/netstandard1.0/es/System.Reflection.Extensions.xml", + "ref/netstandard1.0/fr/System.Reflection.Extensions.xml", + "ref/netstandard1.0/it/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ja/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ko/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ru/System.Reflection.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection.Primitives/4.0.1": { + "sha512": "1oJO1aPEJGfMHRqLaFEUJ+nNRdoFzoRlUW+/uH+rJLF2PCwhk8vvdOq0niBBtE0KdzJ+CQpqRkMiT5/RV97E2w==", + "type": "package", + "path": "System.Reflection.Primitives/4.0.1", + "files": [ + "System.Reflection.Primitives.4.0.1.nupkg.sha512", + "System.Reflection.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Primitives.dll", + "ref/netcore50/System.Reflection.Primitives.xml", + "ref/netcore50/de/System.Reflection.Primitives.xml", + "ref/netcore50/es/System.Reflection.Primitives.xml", + "ref/netcore50/fr/System.Reflection.Primitives.xml", + "ref/netcore50/it/System.Reflection.Primitives.xml", + "ref/netcore50/ja/System.Reflection.Primitives.xml", + "ref/netcore50/ko/System.Reflection.Primitives.xml", + "ref/netcore50/ru/System.Reflection.Primitives.xml", + "ref/netcore50/zh-hans/System.Reflection.Primitives.xml", + "ref/netcore50/zh-hant/System.Reflection.Primitives.xml", + "ref/netstandard1.0/System.Reflection.Primitives.dll", + "ref/netstandard1.0/System.Reflection.Primitives.xml", + "ref/netstandard1.0/de/System.Reflection.Primitives.xml", + "ref/netstandard1.0/es/System.Reflection.Primitives.xml", + "ref/netstandard1.0/fr/System.Reflection.Primitives.xml", + "ref/netstandard1.0/it/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ja/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ko/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ru/System.Reflection.Primitives.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Primitives.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Primitives.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Resources.ResourceManager/4.0.1": { + "sha512": "xaX84sk4PU28JcNiQpdBoYaigtBaClqz7QsrG1LckwhFeMT02iz6Z3mn0mHTZyB4dVyfvRoSlc9N10IB1oK+Kw==", + "type": "package", + "path": "System.Resources.ResourceManager/4.0.1", + "files": [ + "System.Resources.ResourceManager.4.0.1.nupkg.sha512", + "System.Resources.ResourceManager.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Resources.ResourceManager.dll", + "ref/netcore50/System.Resources.ResourceManager.xml", + "ref/netcore50/de/System.Resources.ResourceManager.xml", + "ref/netcore50/es/System.Resources.ResourceManager.xml", + "ref/netcore50/fr/System.Resources.ResourceManager.xml", + "ref/netcore50/it/System.Resources.ResourceManager.xml", + "ref/netcore50/ja/System.Resources.ResourceManager.xml", + "ref/netcore50/ko/System.Resources.ResourceManager.xml", + "ref/netcore50/ru/System.Resources.ResourceManager.xml", + "ref/netcore50/zh-hans/System.Resources.ResourceManager.xml", + "ref/netcore50/zh-hant/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/System.Resources.ResourceManager.dll", + "ref/netstandard1.0/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/de/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/es/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/fr/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/it/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ja/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ko/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ru/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/zh-hans/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/zh-hant/System.Resources.ResourceManager.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime/4.1.0": { + "sha512": "1Ud4LqihmAwWwnrhy81NGHNd2Fnud09cbACJdEivcp87GSseJxlPV8CY0pyT5vP3a2zhgWJ0rSZozC7IcRiZ9A==", + "type": "package", + "path": "System.Runtime/4.1.0", + "files": [ + "System.Runtime.4.1.0.nupkg.sha512", + "System.Runtime.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.Extensions/4.1.0": { + "sha512": "VynET2OiDi8z7yQbZr91IzN14YmbslCV9o4bl546Q+eMnBZ1RsUSIEkX37ZGPIJk4DTc8XLdNc+zEOAa97nTZQ==", + "type": "package", + "path": "System.Runtime.Extensions/4.1.0", + "files": [ + "System.Runtime.Extensions.4.1.0.nupkg.sha512", + "System.Runtime.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.Extensions.dll", + "ref/netcore50/System.Runtime.Extensions.dll", + "ref/netcore50/System.Runtime.Extensions.xml", + "ref/netcore50/de/System.Runtime.Extensions.xml", + "ref/netcore50/es/System.Runtime.Extensions.xml", + "ref/netcore50/fr/System.Runtime.Extensions.xml", + "ref/netcore50/it/System.Runtime.Extensions.xml", + "ref/netcore50/ja/System.Runtime.Extensions.xml", + "ref/netcore50/ko/System.Runtime.Extensions.xml", + "ref/netcore50/ru/System.Runtime.Extensions.xml", + "ref/netcore50/zh-hans/System.Runtime.Extensions.xml", + "ref/netcore50/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.0/System.Runtime.Extensions.dll", + "ref/netstandard1.0/System.Runtime.Extensions.xml", + "ref/netstandard1.0/de/System.Runtime.Extensions.xml", + "ref/netstandard1.0/es/System.Runtime.Extensions.xml", + "ref/netstandard1.0/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.0/it/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.3/System.Runtime.Extensions.dll", + "ref/netstandard1.3/System.Runtime.Extensions.xml", + "ref/netstandard1.3/de/System.Runtime.Extensions.xml", + "ref/netstandard1.3/es/System.Runtime.Extensions.xml", + "ref/netstandard1.3/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.3/it/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.5/System.Runtime.Extensions.dll", + "ref/netstandard1.5/System.Runtime.Extensions.xml", + "ref/netstandard1.5/de/System.Runtime.Extensions.xml", + "ref/netstandard1.5/es/System.Runtime.Extensions.xml", + "ref/netstandard1.5/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.5/it/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.Handles/4.0.1": { + "sha512": "G08fRt9L/fqSc0aBAngQEhvKro1+JZ7TguKLaEgnFMH0daTLYlV2izB30XK3o5w40FQ+ugwX6WPTYdd49MGo3w==", + "type": "package", + "path": "System.Runtime.Handles/4.0.1", + "files": [ + "System.Runtime.Handles.4.0.1.nupkg.sha512", + "System.Runtime.Handles.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/netstandard1.3/System.Runtime.Handles.dll", + "ref/netstandard1.3/System.Runtime.Handles.xml", + "ref/netstandard1.3/de/System.Runtime.Handles.xml", + "ref/netstandard1.3/es/System.Runtime.Handles.xml", + "ref/netstandard1.3/fr/System.Runtime.Handles.xml", + "ref/netstandard1.3/it/System.Runtime.Handles.xml", + "ref/netstandard1.3/ja/System.Runtime.Handles.xml", + "ref/netstandard1.3/ko/System.Runtime.Handles.xml", + "ref/netstandard1.3/ru/System.Runtime.Handles.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.Handles.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.Handles.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.InteropServices/4.1.0": { + "sha512": "heyxg7dQryQ05Jtgo/aEolgrC+Lfp/qoDZO3uQZ/Qho/hlo+ebAE2u4ZosFVQYFDbayyKg+pyW8nzmAaYwoQng==", + "type": "package", + "path": "System.Runtime.InteropServices/4.1.0", + "files": [ + "System.Runtime.InteropServices.4.1.0.nupkg.sha512", + "System.Runtime.InteropServices.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.InteropServices.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.xml", + "ref/netcore50/de/System.Runtime.InteropServices.xml", + "ref/netcore50/es/System.Runtime.InteropServices.xml", + "ref/netcore50/fr/System.Runtime.InteropServices.xml", + "ref/netcore50/it/System.Runtime.InteropServices.xml", + "ref/netcore50/ja/System.Runtime.InteropServices.xml", + "ref/netcore50/ko/System.Runtime.InteropServices.xml", + "ref/netcore50/ru/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/System.Runtime.InteropServices.dll", + "ref/netstandard1.1/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/System.Runtime.InteropServices.dll", + "ref/netstandard1.2/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/System.Runtime.InteropServices.dll", + "ref/netstandard1.3/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/System.Runtime.InteropServices.dll", + "ref/netstandard1.5/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.InteropServices.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "sha512": "J/Sg8T0e7j90FSe/LmVbpaHTlg58t1OFAo5d4FLxAaGJNue9XYJIjd++W4p34+IC2W3LKQe4RlzT1caqybWJxg==", + "type": "package", + "path": "System.Runtime.InteropServices.RuntimeInformation/4.0.0", + "files": [ + "System.Runtime.InteropServices.RuntimeInformation.4.0.0.nupkg.sha512", + "System.Runtime.InteropServices.RuntimeInformation.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll" + ] + }, + "System.Runtime.Numerics/4.0.1": { + "sha512": "rU4bwtRdNv+diYtUL+cJE1b56M4A5/EahCjbDUnKIzcPPtqDh6mpESkvzrcqo3ZFEcREeHf+dBEekws3qu7QIA==", + "type": "package", + "path": "System.Runtime.Numerics/4.0.1", + "files": [ + "System.Runtime.Numerics.4.0.1.nupkg.sha512", + "System.Runtime.Numerics.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Runtime.Numerics.dll", + "lib/netstandard1.3/System.Runtime.Numerics.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Runtime.Numerics.dll", + "ref/netcore50/System.Runtime.Numerics.xml", + "ref/netcore50/de/System.Runtime.Numerics.xml", + "ref/netcore50/es/System.Runtime.Numerics.xml", + "ref/netcore50/fr/System.Runtime.Numerics.xml", + "ref/netcore50/it/System.Runtime.Numerics.xml", + "ref/netcore50/ja/System.Runtime.Numerics.xml", + "ref/netcore50/ko/System.Runtime.Numerics.xml", + "ref/netcore50/ru/System.Runtime.Numerics.xml", + "ref/netcore50/zh-hans/System.Runtime.Numerics.xml", + "ref/netcore50/zh-hant/System.Runtime.Numerics.xml", + "ref/netstandard1.1/System.Runtime.Numerics.dll", + "ref/netstandard1.1/System.Runtime.Numerics.xml", + "ref/netstandard1.1/de/System.Runtime.Numerics.xml", + "ref/netstandard1.1/es/System.Runtime.Numerics.xml", + "ref/netstandard1.1/fr/System.Runtime.Numerics.xml", + "ref/netstandard1.1/it/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ja/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ko/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ru/System.Runtime.Numerics.xml", + "ref/netstandard1.1/zh-hans/System.Runtime.Numerics.xml", + "ref/netstandard1.1/zh-hant/System.Runtime.Numerics.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Security.Cryptography.Algorithms/4.2.0": { + "sha512": "Q+9If3ar0UU82zKWgV/MK2z8kjQC6cyhnzmc1nQUqrb18rglA901NMX0WgOwEL1zyV5pc+q65/MwAK3inj/Dkg==", + "type": "package", + "path": "System.Security.Cryptography.Algorithms/4.2.0", + "files": [ + "System.Security.Cryptography.Algorithms.4.2.0.nupkg.sha512", + "System.Security.Cryptography.Algorithms.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Algorithms.dll", + "lib/net461/System.Security.Cryptography.Algorithms.dll", + "lib/net463/System.Security.Cryptography.Algorithms.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Algorithms.dll", + "ref/net461/System.Security.Cryptography.Algorithms.dll", + "ref/net463/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.3/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net463/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/netcore50/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll" + ] + }, + "System.Security.Cryptography.Encoding/4.0.0": { + "sha512": "YmX4E9nZpzApDgvucMQFnNJN67KW2f9/Z8kpAeZ96MVhnyyv1m7yI284CWvxCgNgtSHmqo8yf69P++gagTjAnw==", + "type": "package", + "path": "System.Security.Cryptography.Encoding/4.0.0", + "files": [ + "System.Security.Cryptography.Encoding.4.0.0.nupkg.sha512", + "System.Security.Cryptography.Encoding.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Encoding.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Encoding.dll", + "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll", + "ref/netstandard1.3/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/de/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/es/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/fr/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/it/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ja/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ko/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ru/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/zh-hans/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/zh-hant/System.Security.Cryptography.Encoding.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Encoding.dll", + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll" + ] + }, + "System.Security.Cryptography.Primitives/4.0.0": { + "sha512": "jQrQyxbgA2Lq7W4V7wYOdJKT38Va2goaRk3S++gq+ASphcYnixK+0vBZX5NAYN1lo5yLeKWmX0joFZ+/NzGPyA==", + "type": "package", + "path": "System.Security.Cryptography.Primitives/4.0.0", + "files": [ + "System.Security.Cryptography.Primitives.4.0.0.nupkg.sha512", + "System.Security.Cryptography.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Primitives.dll", + "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Primitives.dll", + "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Security.Cryptography.X509Certificates/4.1.0": { + "sha512": "RC039tuCfOiUGpBiUF3YQJVG0xqh81+uLffXFYffcT2jxNPEQvq/GiGn3PiKlXX6RB9ghYTS1HlB/eVSCwn+VA==", + "type": "package", + "path": "System.Security.Cryptography.X509Certificates/4.1.0", + "files": [ + "System.Security.Cryptography.X509Certificates.4.1.0.nupkg.sha512", + "System.Security.Cryptography.X509Certificates.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.X509Certificates.dll", + "lib/net461/System.Security.Cryptography.X509Certificates.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.X509Certificates.dll", + "ref/net461/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/de/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/es/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/fr/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/it/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ja/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ko/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ru/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/zh-hans/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/zh-hant/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/de/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/es/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/fr/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/it/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ja/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ko/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ru/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/zh-hans/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/zh-hant/System.Security.Cryptography.X509Certificates.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/netcore50/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll" + ] + }, + "System.Text.Encoding/4.0.11": { + "sha512": "LupgFp5ZDOXfBQpchrr0F6U3wIrDlDxGM3pO0SRldjVwZ2k3X6BzpLcB3/6tBYk4KvX4GJqf7/1XC0ND4B3vyA==", + "type": "package", + "path": "System.Text.Encoding/4.0.11", + "files": [ + "System.Text.Encoding.4.0.11.nupkg.sha512", + "System.Text.Encoding.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Text.Encoding.dll", + "ref/netcore50/System.Text.Encoding.xml", + "ref/netcore50/de/System.Text.Encoding.xml", + "ref/netcore50/es/System.Text.Encoding.xml", + "ref/netcore50/fr/System.Text.Encoding.xml", + "ref/netcore50/it/System.Text.Encoding.xml", + "ref/netcore50/ja/System.Text.Encoding.xml", + "ref/netcore50/ko/System.Text.Encoding.xml", + "ref/netcore50/ru/System.Text.Encoding.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.0/System.Text.Encoding.dll", + "ref/netstandard1.0/System.Text.Encoding.xml", + "ref/netstandard1.0/de/System.Text.Encoding.xml", + "ref/netstandard1.0/es/System.Text.Encoding.xml", + "ref/netstandard1.0/fr/System.Text.Encoding.xml", + "ref/netstandard1.0/it/System.Text.Encoding.xml", + "ref/netstandard1.0/ja/System.Text.Encoding.xml", + "ref/netstandard1.0/ko/System.Text.Encoding.xml", + "ref/netstandard1.0/ru/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.3/System.Text.Encoding.dll", + "ref/netstandard1.3/System.Text.Encoding.xml", + "ref/netstandard1.3/de/System.Text.Encoding.xml", + "ref/netstandard1.3/es/System.Text.Encoding.xml", + "ref/netstandard1.3/fr/System.Text.Encoding.xml", + "ref/netstandard1.3/it/System.Text.Encoding.xml", + "ref/netstandard1.3/ja/System.Text.Encoding.xml", + "ref/netstandard1.3/ko/System.Text.Encoding.xml", + "ref/netstandard1.3/ru/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Text.Encoding.Extensions/4.0.11": { + "sha512": "ztH5sHQkHT+7ttdsA8GucJbw2bu9EmRpKNHa43nKo29lzOTuXj7djjqTbTcVItc9wMhISTrH2qhW0typ9dK5Rg==", + "type": "package", + "path": "System.Text.Encoding.Extensions/4.0.11", + "files": [ + "System.Text.Encoding.Extensions.4.0.11.nupkg.sha512", + "System.Text.Encoding.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Text.Encoding.Extensions.dll", + "ref/netcore50/System.Text.Encoding.Extensions.xml", + "ref/netcore50/de/System.Text.Encoding.Extensions.xml", + "ref/netcore50/es/System.Text.Encoding.Extensions.xml", + "ref/netcore50/fr/System.Text.Encoding.Extensions.xml", + "ref/netcore50/it/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ja/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ko/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ru/System.Text.Encoding.Extensions.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/System.Text.Encoding.Extensions.dll", + "ref/netstandard1.0/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/de/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/es/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/fr/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/it/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ja/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ko/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ru/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/System.Text.Encoding.Extensions.dll", + "ref/netstandard1.3/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/de/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/es/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/fr/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/it/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ja/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ko/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ru/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Text.RegularExpressions/4.1.0": { + "sha512": "PZQnbOOaq5rKIC0rKCIG295sub5HachKiAvKNLuEXcah+3wqj+lPlx2UPHlr3gtvUPgR+ttw65Hq+je2wKBbTQ==", + "type": "package", + "path": "System.Text.RegularExpressions/4.1.0", + "files": [ + "System.Text.RegularExpressions.4.1.0.nupkg.sha512", + "System.Text.RegularExpressions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Text.RegularExpressions.dll", + "lib/netcore50/System.Text.RegularExpressions.dll", + "lib/netstandard1.6/System.Text.RegularExpressions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Text.RegularExpressions.dll", + "ref/netcore50/System.Text.RegularExpressions.dll", + "ref/netcore50/System.Text.RegularExpressions.xml", + "ref/netcore50/de/System.Text.RegularExpressions.xml", + "ref/netcore50/es/System.Text.RegularExpressions.xml", + "ref/netcore50/fr/System.Text.RegularExpressions.xml", + "ref/netcore50/it/System.Text.RegularExpressions.xml", + "ref/netcore50/ja/System.Text.RegularExpressions.xml", + "ref/netcore50/ko/System.Text.RegularExpressions.xml", + "ref/netcore50/ru/System.Text.RegularExpressions.xml", + "ref/netcore50/zh-hans/System.Text.RegularExpressions.xml", + "ref/netcore50/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/System.Text.RegularExpressions.dll", + "ref/netstandard1.0/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/System.Text.RegularExpressions.dll", + "ref/netstandard1.3/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/System.Text.RegularExpressions.dll", + "ref/netstandard1.6/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/zh-hant/System.Text.RegularExpressions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Threading/4.0.11": { + "sha512": "ntS2jSS6HblstY8rTvDeANFz3WOZk8KxGCvsPH6st+pdRglv+uoPQNgdO/+m7Dzy2YobEeXASSFYqwjkk69gUA==", + "type": "package", + "path": "System.Threading/4.0.11", + "files": [ + "System.Threading.4.0.11.nupkg.sha512", + "System.Threading.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Threading.dll", + "lib/netstandard1.3/System.Threading.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Threading.dll", + "ref/netcore50/System.Threading.xml", + "ref/netcore50/de/System.Threading.xml", + "ref/netcore50/es/System.Threading.xml", + "ref/netcore50/fr/System.Threading.xml", + "ref/netcore50/it/System.Threading.xml", + "ref/netcore50/ja/System.Threading.xml", + "ref/netcore50/ko/System.Threading.xml", + "ref/netcore50/ru/System.Threading.xml", + "ref/netcore50/zh-hans/System.Threading.xml", + "ref/netcore50/zh-hant/System.Threading.xml", + "ref/netstandard1.0/System.Threading.dll", + "ref/netstandard1.0/System.Threading.xml", + "ref/netstandard1.0/de/System.Threading.xml", + "ref/netstandard1.0/es/System.Threading.xml", + "ref/netstandard1.0/fr/System.Threading.xml", + "ref/netstandard1.0/it/System.Threading.xml", + "ref/netstandard1.0/ja/System.Threading.xml", + "ref/netstandard1.0/ko/System.Threading.xml", + "ref/netstandard1.0/ru/System.Threading.xml", + "ref/netstandard1.0/zh-hans/System.Threading.xml", + "ref/netstandard1.0/zh-hant/System.Threading.xml", + "ref/netstandard1.3/System.Threading.dll", + "ref/netstandard1.3/System.Threading.xml", + "ref/netstandard1.3/de/System.Threading.xml", + "ref/netstandard1.3/es/System.Threading.xml", + "ref/netstandard1.3/fr/System.Threading.xml", + "ref/netstandard1.3/it/System.Threading.xml", + "ref/netstandard1.3/ja/System.Threading.xml", + "ref/netstandard1.3/ko/System.Threading.xml", + "ref/netstandard1.3/ru/System.Threading.xml", + "ref/netstandard1.3/zh-hans/System.Threading.xml", + "ref/netstandard1.3/zh-hant/System.Threading.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Threading.dll" + ] + }, + "System.Threading.Tasks/4.0.11": { + "sha512": "fYfVT9v71GR40tJ0iv+QXOslOfJckOFj0AmXEYCONoJvIez4wZpR5NZYEhN3kvzuzs0j8MsYUMvB3X+N+jlkvw==", + "type": "package", + "path": "System.Threading.Tasks/4.0.11", + "files": [ + "System.Threading.Tasks.4.0.11.nupkg.sha512", + "System.Threading.Tasks.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Threading.Tasks.dll", + "ref/netcore50/System.Threading.Tasks.xml", + "ref/netcore50/de/System.Threading.Tasks.xml", + "ref/netcore50/es/System.Threading.Tasks.xml", + "ref/netcore50/fr/System.Threading.Tasks.xml", + "ref/netcore50/it/System.Threading.Tasks.xml", + "ref/netcore50/ja/System.Threading.Tasks.xml", + "ref/netcore50/ko/System.Threading.Tasks.xml", + "ref/netcore50/ru/System.Threading.Tasks.xml", + "ref/netcore50/zh-hans/System.Threading.Tasks.xml", + "ref/netcore50/zh-hant/System.Threading.Tasks.xml", + "ref/netstandard1.0/System.Threading.Tasks.dll", + "ref/netstandard1.0/System.Threading.Tasks.xml", + "ref/netstandard1.0/de/System.Threading.Tasks.xml", + "ref/netstandard1.0/es/System.Threading.Tasks.xml", + "ref/netstandard1.0/fr/System.Threading.Tasks.xml", + "ref/netstandard1.0/it/System.Threading.Tasks.xml", + "ref/netstandard1.0/ja/System.Threading.Tasks.xml", + "ref/netstandard1.0/ko/System.Threading.Tasks.xml", + "ref/netstandard1.0/ru/System.Threading.Tasks.xml", + "ref/netstandard1.0/zh-hans/System.Threading.Tasks.xml", + "ref/netstandard1.0/zh-hant/System.Threading.Tasks.xml", + "ref/netstandard1.3/System.Threading.Tasks.dll", + "ref/netstandard1.3/System.Threading.Tasks.xml", + "ref/netstandard1.3/de/System.Threading.Tasks.xml", + "ref/netstandard1.3/es/System.Threading.Tasks.xml", + "ref/netstandard1.3/fr/System.Threading.Tasks.xml", + "ref/netstandard1.3/it/System.Threading.Tasks.xml", + "ref/netstandard1.3/ja/System.Threading.Tasks.xml", + "ref/netstandard1.3/ko/System.Threading.Tasks.xml", + "ref/netstandard1.3/ru/System.Threading.Tasks.xml", + "ref/netstandard1.3/zh-hans/System.Threading.Tasks.xml", + "ref/netstandard1.3/zh-hant/System.Threading.Tasks.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Threading.Tasks.Extensions/4.0.0": { + "sha512": "Np6eqe8WPWE6HQ5RtVPiD7hZh+1wJiHkE0d0dJq4aqjWIbPfgzzKgld+VoiPA0IOdah+Mabrzv0v7iqLUrxWIw==", + "type": "package", + "path": "System.Threading.Tasks.Extensions/4.0.0", + "files": [ + "System.Threading.Tasks.Extensions.4.0.0.nupkg.sha512", + "System.Threading.Tasks.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.xml", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.xml" + ] + }, + "System.Threading.Timer/4.0.1": { + "sha512": "wiuoV9qeelaXTvF0iYkAPGuZ75fRT9cMbOKrMiTxVcTBa3ZVscsDo9PfjMXr7+DEvZxktz+l0jagFKLM1Njlsg==", + "type": "package", + "path": "System.Threading.Timer/4.0.1", + "files": [ + "System.Threading.Timer.4.0.1.nupkg.sha512", + "System.Threading.Timer.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net451/_._", + "lib/portable-net451+win81+wpa81/_._", + "lib/win81/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net451/_._", + "ref/netcore50/System.Threading.Timer.dll", + "ref/netcore50/System.Threading.Timer.xml", + "ref/netcore50/de/System.Threading.Timer.xml", + "ref/netcore50/es/System.Threading.Timer.xml", + "ref/netcore50/fr/System.Threading.Timer.xml", + "ref/netcore50/it/System.Threading.Timer.xml", + "ref/netcore50/ja/System.Threading.Timer.xml", + "ref/netcore50/ko/System.Threading.Timer.xml", + "ref/netcore50/ru/System.Threading.Timer.xml", + "ref/netcore50/zh-hans/System.Threading.Timer.xml", + "ref/netcore50/zh-hant/System.Threading.Timer.xml", + "ref/netstandard1.2/System.Threading.Timer.dll", + "ref/netstandard1.2/System.Threading.Timer.xml", + "ref/netstandard1.2/de/System.Threading.Timer.xml", + "ref/netstandard1.2/es/System.Threading.Timer.xml", + "ref/netstandard1.2/fr/System.Threading.Timer.xml", + "ref/netstandard1.2/it/System.Threading.Timer.xml", + "ref/netstandard1.2/ja/System.Threading.Timer.xml", + "ref/netstandard1.2/ko/System.Threading.Timer.xml", + "ref/netstandard1.2/ru/System.Threading.Timer.xml", + "ref/netstandard1.2/zh-hans/System.Threading.Timer.xml", + "ref/netstandard1.2/zh-hant/System.Threading.Timer.xml", + "ref/portable-net451+win81+wpa81/_._", + "ref/win81/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Xml.ReaderWriter/4.0.11": { + "sha512": "iKOPRXRAUrh54dxCkKEX7vKzG+ixfm4DyCVdKiI3otIuCq/ysNiH5unrWzWzkOumFJ1Sr/5eWXgJwZEmbIIoPg==", + "type": "package", + "path": "System.Xml.ReaderWriter/4.0.11", + "files": [ + "System.Xml.ReaderWriter.4.0.11.nupkg.sha512", + "System.Xml.ReaderWriter.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Xml.ReaderWriter.dll", + "lib/netstandard1.3/System.Xml.ReaderWriter.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Xml.ReaderWriter.dll", + "ref/netcore50/System.Xml.ReaderWriter.xml", + "ref/netcore50/de/System.Xml.ReaderWriter.xml", + "ref/netcore50/es/System.Xml.ReaderWriter.xml", + "ref/netcore50/fr/System.Xml.ReaderWriter.xml", + "ref/netcore50/it/System.Xml.ReaderWriter.xml", + "ref/netcore50/ja/System.Xml.ReaderWriter.xml", + "ref/netcore50/ko/System.Xml.ReaderWriter.xml", + "ref/netcore50/ru/System.Xml.ReaderWriter.xml", + "ref/netcore50/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netcore50/zh-hant/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/System.Xml.ReaderWriter.dll", + "ref/netstandard1.0/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/de/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/es/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/fr/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/it/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ja/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ko/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ru/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/zh-hant/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/System.Xml.ReaderWriter.dll", + "ref/netstandard1.3/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/de/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/es/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/fr/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/it/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ja/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ko/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ru/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/zh-hant/System.Xml.ReaderWriter.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Xml.XDocument/4.0.11": { + "sha512": "AKIdCYBb5MIJj4yG0ftHDPJoSTxLeTKYebn8D6haFTuKLoh3IEAmOFGdlvoE/xq2wLuYEAic81wJBWsZpsbGcQ==", + "type": "package", + "path": "System.Xml.XDocument/4.0.11", + "files": [ + "System.Xml.XDocument.4.0.11.nupkg.sha512", + "System.Xml.XDocument.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Xml.XDocument.dll", + "lib/netstandard1.3/System.Xml.XDocument.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Xml.XDocument.dll", + "ref/netcore50/System.Xml.XDocument.xml", + "ref/netcore50/de/System.Xml.XDocument.xml", + "ref/netcore50/es/System.Xml.XDocument.xml", + "ref/netcore50/fr/System.Xml.XDocument.xml", + "ref/netcore50/it/System.Xml.XDocument.xml", + "ref/netcore50/ja/System.Xml.XDocument.xml", + "ref/netcore50/ko/System.Xml.XDocument.xml", + "ref/netcore50/ru/System.Xml.XDocument.xml", + "ref/netcore50/zh-hans/System.Xml.XDocument.xml", + "ref/netcore50/zh-hant/System.Xml.XDocument.xml", + "ref/netstandard1.0/System.Xml.XDocument.dll", + "ref/netstandard1.0/System.Xml.XDocument.xml", + "ref/netstandard1.0/de/System.Xml.XDocument.xml", + "ref/netstandard1.0/es/System.Xml.XDocument.xml", + "ref/netstandard1.0/fr/System.Xml.XDocument.xml", + "ref/netstandard1.0/it/System.Xml.XDocument.xml", + "ref/netstandard1.0/ja/System.Xml.XDocument.xml", + "ref/netstandard1.0/ko/System.Xml.XDocument.xml", + "ref/netstandard1.0/ru/System.Xml.XDocument.xml", + "ref/netstandard1.0/zh-hans/System.Xml.XDocument.xml", + "ref/netstandard1.0/zh-hant/System.Xml.XDocument.xml", + "ref/netstandard1.3/System.Xml.XDocument.dll", + "ref/netstandard1.3/System.Xml.XDocument.xml", + "ref/netstandard1.3/de/System.Xml.XDocument.xml", + "ref/netstandard1.3/es/System.Xml.XDocument.xml", + "ref/netstandard1.3/fr/System.Xml.XDocument.xml", + "ref/netstandard1.3/it/System.Xml.XDocument.xml", + "ref/netstandard1.3/ja/System.Xml.XDocument.xml", + "ref/netstandard1.3/ko/System.Xml.XDocument.xml", + "ref/netstandard1.3/ru/System.Xml.XDocument.xml", + "ref/netstandard1.3/zh-hans/System.Xml.XDocument.xml", + "ref/netstandard1.3/zh-hant/System.Xml.XDocument.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + } + }, + "projectFileDependencyGroups": { + "": [], + ".NETStandard,Version=v1.5": [ + "NETStandard.Library >= 1.6.0", + "System.Linq.Expressions >= 4.1.0" + ] + }, + "tools": {}, + "projectFileToolGroups": {} +} \ No newline at end of file From 03cb75cc728454e314b8fdb6e141622cd23a1b6f Mon Sep 17 00:00:00 2001 From: Vladymyr L Date: Sat, 27 Oct 2018 22:11:34 +0300 Subject: [PATCH 4/4] update to dotnet core 2.1 --- .gitignore | 2 + .../CommandLineParserErrorFormatter.cs | 95 - .../FluentCommandLineBuilderT.cs | 38 - .../FluentCommandLineParser.cs | 316 -- .../FluentCommandLineParser.xproj | 21 - .../FluentCommandLineParserT.cs | 112 - .../ICommandLineOptionBuilderFluent.cs | 68 - .../ICommandLineOptionFluent.cs | 72 - .../ICommandLineOptionFormatter.cs | 44 - .../ICommandLineParserError.cs | 39 - .../ICommandLineParserErrorFormatter.cs | 48 - .../ICommandLineParserResult.cs | 70 - .../IFluentCommandLineBuilderT.cs | 37 - .../IFluentCommandLineParser.cs | 118 - .../IFluentCommandLineParserT.cs | 72 - .../IHelpCommandLineOptionFluent.cs | 80 - .../Internals/CommandLineOption.cs | 254 -- .../CommandLineOptionBuilderFluent.cs | 113 - .../Internals/CommandLineOptionFactory.cs | 71 - .../Internals/CommandLineOptionFormatter.cs | 139 - .../Internals/EmptyHelpCommandLineOption.cs | 55 - .../Errors/CommandLineParserErrorBase.cs | 50 - .../ExpectedOptionNotFoundParseError.cs | 44 - .../Errors/OptionSyntaxParseError.cs | 70 - .../Internals/Extensions/UsefulExtension.cs | 162 - .../Internals/HelpCommandLineOption.cs | 174 - .../Internals/ICommandLineOption.cs | 96 - .../Internals/ICommandLineOptionFactory.cs | 50 - .../Internals/ICommandLineOptionResult.cs | 34 - .../Internals/IHelpCommandLineOption.cs | 50 - .../Internals/IHelpCommandLineOptionResult.cs | 33 - .../Parsing/CommandLineOptionGrouper.cs | 148 - .../Parsing/CommandLineParserEngineMark2.cs | 154 - .../Parsing/CommandLineParserResult.cs | 107 - .../ICommandLineOptionParserFactory.cs | 42 - .../Parsing/ICommandLineParserEngine.cs | 39 - .../Internals/Parsing/OptionArgumentParser.cs | 101 - .../BoolCommandLineOptionParser.cs | 111 - .../CommandLineOptionParserFactory.cs | 231 -- .../DateTimeCommandLineOptionParser.cs | 64 - .../DoubleCommandLineOptionParser.cs | 55 - .../EnumCommandLineOptionParser.cs | 112 - .../EnumFlagCommandLineOptionParser.cs | 125 - .../OptionParsers/ICommandLineOptionParser.cs | 45 - .../Int32CommandLineOptionParser.cs | 55 - .../Int64CommandLineOptionParser.cs | 31 - .../ListCommandLineOptionParser.cs | 86 - .../NullableCommandLineOptionParser.cs | 62 - .../NullableEnumCommandLineOptionParser.cs | 83 - .../StringCommandLineOptionParser.cs | 62 - .../UriCommandLineOptionParser.cs | 70 - .../Internals/Parsing/ParsedOption.cs | 153 - .../Internals/Parsing/ParsedOptionFactory.cs | 71 - .../Internals/Parsing/ParserEngineResult.cs | 55 - .../Internals/SpecialCharacters.cs | 62 - .../Validators/CommandLineOptionValidator.cs | 60 - .../Validators/ICommandLineOptionValidator.cs | 37 - .../Validators/NoDuplicateOptionValidator.cs | 84 - .../Validators/OptionNameValidator.cs | 109 - .../InvalidOptionNameException.cs | 71 - .../OptionAlreadyExistsException.cs | 70 - .../OptionSyntaxException.cs | 38 - .../Properties/AssemblyInfo.cs | 19 - .../UnsupportedTypeException.cs | 38 - Core/FluentCommandLineParser/project.json | 23 - .../FluentCommandLineParser/project.lock.json | 3480 ----------------- .../CommandLineOptionFormatterTests.cs | 40 +- ...luentCommandLineParser.Tests.XUnit.msbuild | 17 - .../FluentCommandLineParser.Tests.csproj | 222 +- .../when_a_new_instance_is_created.cs | 8 +- .../with_a_parser_engine_that_is_null.cs | 2 +- .../returns_a_null_option.cs | 2 +- .../and_the_option_factory/throws_an_error.cs | 2 +- .../with_a_long_name_that_is_already_used.cs | 2 +- .../with_a_short_name_that_is_already_used.cs | 2 +- .../that_has_been_set_to_null.cs | 2 +- .../FluentCommandLineParserBuilderTests.cs | 4 +- .../FluentCommandLineParserMSpecTests.cs | 8 +- .../FluentCommandLineParserTests.cs | 671 ++-- .../Integration/BoolInlineDataAttribute.cs | 4 +- .../Integration/DoubleInlineDataAttribute.cs | 2 +- .../Integration/EnumInlineDataAttribute.cs | 2 +- .../Int32EnumInlineDataAttribute.cs | 2 +- .../Integration/Int32InlineDataAttribute.cs | 9 +- .../Integration/IntegrationTests.cs | 97 +- .../Integration/Lists/FlagTests.cs | 56 +- .../Integration/Lists/ListTests.cs | 118 +- .../Integration/NCrunchExcelDataAttribute.cs | 4 +- ...ShortOptionsAreParsedCorrectlyAttribute.cs | 39 +- .../Integration/StringInlineDataAttribute.cs | 2 +- .../Internals/AnonymousMock.cs | 4 +- .../CommandLineOptionFactoryTests.cs | 13 +- .../CommandLineOptionParserFactoryTests.cs | 53 +- .../Internals/CommandLineOptionTests.cs | 86 +- .../CommandLineParserEngineMark2TestsXUnit.cs | 119 +- .../ExpectedOptionNotFoundParseErrorTests.cs | 14 +- .../Internals/TestContextBase.cs | 4 +- .../Validators/OptionNameValidatorTests.cs | 24 +- .../CommandLineParserEngineTestContext.cs | 6 +- .../Properties/AssemblyInfo.cs | 53 - FluentCommandLineParser.Tests/UriTests.cs | 35 +- FluentCommandLineParser.Tests/app.config | 14 - FluentCommandLineParser.Tests/packages.config | 11 - FluentCommandLineParser.sln | 36 +- .../FluentCommandLineParser.csproj | 137 +- .../FluentCommandLineParser.nuspec | 23 - .../CommandLineOptionParserFactory.cs | 2 +- .../Properties/AssemblyInfo.cs | 55 - global.json | 2 +- 109 files changed, 781 insertions(+), 10007 deletions(-) delete mode 100644 Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs delete mode 100644 Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs delete mode 100644 Core/FluentCommandLineParser/FluentCommandLineParser.cs delete mode 100644 Core/FluentCommandLineParser/FluentCommandLineParser.xproj delete mode 100644 Core/FluentCommandLineParser/FluentCommandLineParserT.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineOptionFluent.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineParserError.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs delete mode 100644 Core/FluentCommandLineParser/ICommandLineParserResult.cs delete mode 100644 Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs delete mode 100644 Core/FluentCommandLineParser/IFluentCommandLineParser.cs delete mode 100644 Core/FluentCommandLineParser/IFluentCommandLineParserT.cs delete mode 100644 Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs delete mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs delete mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs delete mode 100644 Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs delete mode 100644 Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs delete mode 100644 Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs delete mode 100644 Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs delete mode 100644 Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs delete mode 100644 Core/FluentCommandLineParser/Internals/SpecialCharacters.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs delete mode 100644 Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs delete mode 100644 Core/FluentCommandLineParser/InvalidOptionNameException.cs delete mode 100644 Core/FluentCommandLineParser/OptionAlreadyExistsException.cs delete mode 100644 Core/FluentCommandLineParser/OptionSyntaxException.cs delete mode 100644 Core/FluentCommandLineParser/Properties/AssemblyInfo.cs delete mode 100644 Core/FluentCommandLineParser/UnsupportedTypeException.cs delete mode 100644 Core/FluentCommandLineParser/project.json delete mode 100644 Core/FluentCommandLineParser/project.lock.json delete mode 100644 FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.XUnit.msbuild delete mode 100644 FluentCommandLineParser.Tests/Properties/AssemblyInfo.cs delete mode 100644 FluentCommandLineParser.Tests/app.config delete mode 100644 FluentCommandLineParser.Tests/packages.config delete mode 100644 FluentCommandLineParser/FluentCommandLineParser.nuspec delete mode 100644 FluentCommandLineParser/Properties/AssemblyInfo.cs diff --git a/.gitignore b/.gitignore index 909dac9..f041c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,9 @@ _ReSharper.* bin obj packages/* +.idea/* !repositories.config packages/ _ncrunch* *.ncrunch* +project.lock.json diff --git a/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs b/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs deleted file mode 100644 index 5993a08..0000000 --- a/Core/FluentCommandLineParser/CommandLineParserErrorFormatter.cs +++ /dev/null @@ -1,95 +0,0 @@ -#region License -// CommandLineParserErrorFormatter.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; -using System.Text; -using Fclp.Internals.Errors; -using Fclp.Internals.Extensions; - -namespace Fclp -{ - /// - /// A simple parser error formatter designed to create error descriptions suitable for the console. - /// - public class CommandLineParserErrorFormatter : ICommandLineParserErrorFormatter - { - - /// - /// Formats the specified list of to a suitable for the end user. - /// - /// The errors to format. - /// A describing the specified errors. - public string Format(IEnumerable parserErrors) - { - if (parserErrors.IsNullOrEmpty()) return null; - - var builder = new StringBuilder(); - - foreach (var error in parserErrors) - { - builder.AppendLine(Format(error)); - } - - return builder.ToString(); - } - - /// - /// Formats the specified to a suitable for the end user. - /// - /// The error to format. This must not be null. - /// A describing the specified error. - public string Format(ICommandLineParserError parserError) - { - var optionSyntaxParseError = parserError as OptionSyntaxParseError; - if (optionSyntaxParseError != null) return FormatOptionSyntaxParseError(optionSyntaxParseError); - - var expectedOptionNotFoundError = parserError as ExpectedOptionNotFoundParseError; - if (expectedOptionNotFoundError != null) return FormatExpectedOptionNotFoundError(expectedOptionNotFoundError); - - return "unknown parse error."; - } - - private static string FormatOptionSyntaxParseError(OptionSyntaxParseError error) - { - return string.Format("Option '{0}' parse error: could not parse '{1}' to '{2}'.", - error.ParsedOption.RawKey, - error.ParsedOption.Value.RemoveAnyWrappingDoubleQuotes(), - error.Option.SetupType); - } - - private static string FormatExpectedOptionNotFoundError(ExpectedOptionNotFoundParseError error) - { - var optionText = GetOptionText(error); - return string.Format("Option '{0}' parse error. option is required but was not specified.", optionText); - } - - private static string GetOptionText(ICommandLineParserError error) - { - var optionText = error.Option.LongName.IsNullOrWhiteSpace() - ? error.Option.ShortName - : error.Option.ShortName + ":" + error.Option.LongName; - return optionText; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs b/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs deleted file mode 100644 index 2434795..0000000 --- a/Core/FluentCommandLineParser/FluentCommandLineBuilderT.cs +++ /dev/null @@ -1,38 +0,0 @@ -#region License -// FluentCommandLineBuilderT.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp -{ - /// - /// Parser that constructs and populates the specified type of object from command line arguments. - /// - /// The object type containing the argument properties to populate from parsed command line arguments. - [Obsolete("FluentCommandLineBuilder has been renamed to FluentCommandLineParser", false)] - public class FluentCommandLineBuilder : FluentCommandLineParser, IFluentCommandLineBuilder where TBuildType : new() - { - - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/FluentCommandLineParser.cs b/Core/FluentCommandLineParser/FluentCommandLineParser.cs deleted file mode 100644 index c8e6935..0000000 --- a/Core/FluentCommandLineParser/FluentCommandLineParser.cs +++ /dev/null @@ -1,316 +0,0 @@ -#region License -// FluentCommandLineParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using Fclp.Internals; -using Fclp.Internals.Errors; -using Fclp.Internals.Extensions; -using Fclp.Internals.Parsing; -using Fclp.Internals.Validators; - -namespace Fclp -{ - /// - /// A command line parser which provides methods and properties - /// to easily and fluently parse command line arguments. - /// - public class FluentCommandLineParser : IFluentCommandLineParser - { - /// - /// Initialises a new instance of the class. - /// - public FluentCommandLineParser() - { - IsCaseSensitive = true; - } - - /// - /// The type used for case sensitive comparisons. - /// - public const StringComparison CaseSensitiveComparison = StringComparison.CurrentCulture; - - /// - /// The type used for case in-sensitive comparisons. - /// - public const StringComparison IgnoreCaseComparison = StringComparison.CurrentCultureIgnoreCase; - - List _options; - ICommandLineOptionFactory _optionFactory; - ICommandLineParserEngine _parserEngine; - ICommandLineOptionFormatter _optionFormatter; - IHelpCommandLineOption _helpOption; - ICommandLineParserErrorFormatter _errorFormatter; - ICommandLineOptionValidator _optionValidator; - - /// - /// Gets or sets whether values that differ by case are considered different. - /// - public bool IsCaseSensitive - { - get { return StringComparison == CaseSensitiveComparison; } - set { StringComparison = value ? CaseSensitiveComparison : IgnoreCaseComparison; } - } - - /// - /// Gets the to use when matching values. - /// - internal StringComparison StringComparison { get; private set; } - - /// - /// Gets the list of Options - /// - public List Options - { - get { return _options ?? (_options = new List()); } - } - - /// - /// Gets or sets the default option formatter. - /// - public ICommandLineOptionFormatter OptionFormatter - { - get { return _optionFormatter ?? (_optionFormatter = new CommandLineOptionFormatter()); } - set { _optionFormatter = value; } - } - - /// - /// Gets or sets the default option formatter. - /// - public ICommandLineParserErrorFormatter ErrorFormatter - { - get { return _errorFormatter ?? (_errorFormatter = new CommandLineParserErrorFormatter()); } - set { _errorFormatter = value; } - } - - /// - /// Gets or sets the to use for creating . - /// - /// If this property is set to null then the default is returned. - public ICommandLineOptionFactory OptionFactory - { - get { return _optionFactory ?? (_optionFactory = new CommandLineOptionFactory()); } - set { _optionFactory = value; } - } - - /// - /// Gets or sets the used to validate each setup Option. - /// - public ICommandLineOptionValidator OptionValidator - { - get { return _optionValidator ?? (_optionValidator = new CommandLineOptionValidator(this)); } - set { _optionValidator = value; } - } - - /// - /// Gets or sets the to use for parsing the command line args. - /// - public ICommandLineParserEngine ParserEngine - { - get { return _parserEngine ?? (_parserEngine = new CommandLineParserEngineMark2()); } - set { _parserEngine = value; } - } - - /// - /// Gets or sets the option used for when help is detected in the command line args. - /// - public IHelpCommandLineOption HelpOption - { - get { return _helpOption ?? (_helpOption = new EmptyHelpCommandLineOption()); } - set { _helpOption = value; } - } - - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be null, empty or only whitespace. - /// The long name for the Option or null if not required. - /// - /// - /// A Option with the same name or name - /// already exists in the . - /// - public ICommandLineOptionFluent Setup(char shortOption, string longOption) - { -#if !NETCORE - return SetupInternal(shortOption.ToString(CultureInfo.InvariantCulture), longOption); -#else - return SetupInternal(shortOption.ToString(), longOption); -#endif - - } - - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name or name already exists in the . - /// - /// - /// Either or are not valid. must not be whitespace - /// or a control character. must not be null, empty or only whitespace. - /// - [Obsolete("Use new overload Setup(char, string) to specify both a short and long option name instead.")] - public ICommandLineOptionFluent Setup(string shortOption, string longOption) - { - return SetupInternal(shortOption, longOption); - } - - private ICommandLineOptionFluent SetupInternal(string shortOption, string longOption) - { - var argOption = this.OptionFactory.CreateOption(shortOption, longOption); - - if (argOption == null) - throw new InvalidOperationException("OptionFactory is producing unexpected results."); - - OptionValidator.Validate(argOption); - - this.Options.Add(argOption); - - return argOption; - } - - /// - /// Setup a new using the specified short Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// - /// - /// A Option with the same name already exists in the . - /// - public ICommandLineOptionFluent Setup(char shortOption) - { -#if !NETCORE - return SetupInternal(shortOption.ToString(CultureInfo.InvariantCulture), null); -#else - return SetupInternal(shortOption.ToString(), null); -#endif - } - - /// - /// Setup a new using the specified long Option name. - /// - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name already exists in the . - /// - public ICommandLineOptionFluent Setup(string longOption) - { - return SetupInternal(null, longOption); - } - - /// - /// Parses the specified T:System.String[] using the setup Options. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - public ICommandLineParserResult Parse(string[] args) - { - var parserEngineResult = this.ParserEngine.Parse(args); - var parsedOptions = parserEngineResult.ParsedOptions.ToList(); - - var result = new CommandLineParserResult { EmptyArgs = parsedOptions.IsNullOrEmpty() }; - - if (this.HelpOption.ShouldShowHelp(parsedOptions, StringComparison)) - { - result.HelpCalled = true; - this.HelpOption.ShowHelp(this.Options); - return result; - } - - foreach (var setupOption in this.Options) - { - /* - * Step 1. match the setup Option to one provided in the args by either long or short names - * Step 2. if the key has been matched then bind the value - * Step 3. if the key is not matched and it is required, then add a new error - * Step 4. the key is not matched and optional, bind the default value if available - */ - - // Step 1 - ICommandLineOption option = setupOption; - var match = parsedOptions.FirstOrDefault(pair => - pair.Key.Equals(option.ShortName, this.StringComparison) // tries to match the short name - || pair.Key.Equals(option.LongName, this.StringComparison)); // or else the long name - - if (match != null) // Step 2 - { - - try - { - option.Bind(match); - } - catch (OptionSyntaxException) - { - result.Errors.Add(new OptionSyntaxParseError(option, match)); - if (option.HasDefault) - option.BindDefault(); - } - - parsedOptions.Remove(match); - } - else - { - if (option.IsRequired) // Step 3 - result.Errors.Add(new ExpectedOptionNotFoundParseError(option)); - else if (option.HasDefault) - option.BindDefault(); // Step 4 - - result.UnMatchedOptions.Add(option); - } - } - - parsedOptions.ForEach(item => result.AdditionalOptionsFound.Add(new KeyValuePair(item.Key, item.Value))); - - result.ErrorText = ErrorFormatter.Format(result.Errors); - - return result; - } - - /// - /// Setup the help args. - /// - /// The help arguments to register. - public IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs) - { - var helpOption = this.OptionFactory.CreateHelpOption(helpArgs); - this.HelpOption = helpOption; - return helpOption; - } - - /// - /// Returns the Options that have been setup for this parser. - /// - IEnumerable IFluentCommandLineParser.Options - { - get { return Options; } - } - } -} diff --git a/Core/FluentCommandLineParser/FluentCommandLineParser.xproj b/Core/FluentCommandLineParser/FluentCommandLineParser.xproj deleted file mode 100644 index 7be6d5d..0000000 --- a/Core/FluentCommandLineParser/FluentCommandLineParser.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - 6caadcee-649e-4ed2-a7e6-bdb621776055 - FluentCommandLineParser - .\obj - .\bin\ - v4.5.2 - - - - 2.0 - - - diff --git a/Core/FluentCommandLineParser/FluentCommandLineParserT.cs b/Core/FluentCommandLineParser/FluentCommandLineParserT.cs deleted file mode 100644 index 5ec7821..0000000 --- a/Core/FluentCommandLineParser/FluentCommandLineParserT.cs +++ /dev/null @@ -1,112 +0,0 @@ -#region License -// FluentCommandLineParserT.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using Fclp.Internals; - -namespace Fclp -{ - /// - /// A command line parser which provides methods and properties - /// to easily and fluently parse command line arguments into - /// a predefined arguments object. - /// - /// The object type containing the argument properties to populate from parsed command line arguments. - public class FluentCommandLineParser : IFluentCommandLineParser where TBuildType : new() - { - /// - /// Gets the . - /// - public IFluentCommandLineParser Parser { get; private set; } - - /// - /// Gets the constructed object. - /// - public TBuildType Object { get; private set; } - - /// - /// Initialises a new instance of the class. - /// - public FluentCommandLineParser() - { - Object = new TBuildType(); - Parser = new FluentCommandLineParser(); - } - - /// - /// Sets up an Option for a write-able property on the type being built. - /// - public ICommandLineOptionBuilderFluent Setup(Expression> propertyPicker) - { - return new CommandLineOptionBuilderFluent(Parser, Object, propertyPicker); - } - - /// - /// Parses the specified T:System.String[] using the setup Options. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - public ICommandLineParserResult Parse(string[] args) - { - return Parser.Parse(args); - } - - /// - /// Setup the help args. - /// - /// The help arguments to register. - public IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs) - { - return Parser.SetupHelp(helpArgs); - } - - /// - /// Gets or sets whether values that differ by case are considered different. - /// - public bool IsCaseSensitive - { - get { return Parser.IsCaseSensitive; } - set { Parser.IsCaseSensitive = value; } - } - - /// - /// Gets or sets the option used for when help is detected in the command line args. - /// - public IHelpCommandLineOption HelpOption - { - get { return Parser.HelpOption; } - set { Parser.HelpOption = value; } - } - - /// - /// Returns the Options that have been setup for this parser. - /// - public IEnumerable Options - { - get { return Parser.Options; } - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs b/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs deleted file mode 100644 index 88fc507..0000000 --- a/Core/FluentCommandLineParser/ICommandLineOptionBuilderFluent.cs +++ /dev/null @@ -1,68 +0,0 @@ -#region License -// ICommandLineOptionBuilderFluent.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp -{ - /// - /// Defines the fluent interface for setting up a . - /// - public interface ICommandLineOptionBuilderFluent - { - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name or name already exists in the . - /// - /// - /// Either or are not valid. must not be whitespace - /// or a control character. must not be null, empty or only whitespace. - /// - ICommandLineOptionFluent As(char shortOption, string longOption); - - /// - /// Setup a new using the specified short Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// - /// if is invalid for a short option. - /// - /// A Option with the same name - /// already exists in the . - /// - ICommandLineOptionFluent As(char shortOption); - - /// - /// Setup a new using the specified long Option name. - /// - /// The long name for the Option. This must not be null, empty or only whitespace. - /// if is invalid for a long option. - /// - /// A Option with the same name already exists in the . - /// - ICommandLineOptionFluent As(string longOption); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs b/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs deleted file mode 100644 index 9d0a3b8..0000000 --- a/Core/FluentCommandLineParser/ICommandLineOptionFluent.cs +++ /dev/null @@ -1,72 +0,0 @@ -#region License -// ICommandLineOptionFluent.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; - -namespace Fclp -{ - /// - /// Provides the fluent interface for a object. - /// - public interface ICommandLineOptionFluent - { - /// - /// Adds the specified description to the . - /// - /// The representing the description to use. This should be localised text. - /// A . - ICommandLineOptionFluent WithDescription(string description); - - /// - /// Declares that this is required. - /// - /// A . - ICommandLineOptionFluent Required(); - - /// - /// Specifies the method to invoke when the . - /// is parsed. If a callback is not required either do not call it, or specify null. - /// Do no use this if you are using the Fluent Command Line Builder. - /// - /// The return callback to execute with the parsed value of the Option. - /// A . - ICommandLineOptionFluent Callback(Action callback); - - /// - /// Specifies the default value to use if no value is found whilst parsing this . - /// - /// The value to use. - /// A . - ICommandLineOptionFluent SetDefault(T value); - - /// - /// Specified the method to invoke with any addition arguments parsed with the Option. - /// If additional arguments are not required either do not call it, or specify null. - /// - /// The return callback to execute with the parsed addition arguments found for this Option. - /// A . - ICommandLineOptionFluent CaptureAdditionalArguments(Action> callback); - } -} diff --git a/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs b/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs deleted file mode 100644 index e0034cf..0000000 --- a/Core/FluentCommandLineParser/ICommandLineOptionFormatter.cs +++ /dev/null @@ -1,44 +0,0 @@ -#region License -// ICommandLineOptionFormatter.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using Fclp.Internals; - -namespace Fclp -{ - /// - /// Represents a formatter used to display command line options to the user. - /// - public interface ICommandLineOptionFormatter - { - /// - /// Formats the list of to be displayed to the user. - /// - /// The list of to format. - /// A representing the format - /// If is null. - string Format(IEnumerable options); - } -} diff --git a/Core/FluentCommandLineParser/ICommandLineParserError.cs b/Core/FluentCommandLineParser/ICommandLineParserError.cs deleted file mode 100644 index ca2ecdb..0000000 --- a/Core/FluentCommandLineParser/ICommandLineParserError.cs +++ /dev/null @@ -1,39 +0,0 @@ -#region License -// ICommandLineParserError.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using Fclp.Internals; - -namespace Fclp -{ - /// - /// Represents an error that has occurred whilst parsing a Option. - /// - public interface ICommandLineParserError - { - /// - /// Gets the this error belongs too. - /// - ICommandLineOption Option { get; } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs b/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs deleted file mode 100644 index 9ab6419..0000000 --- a/Core/FluentCommandLineParser/ICommandLineParserErrorFormatter.cs +++ /dev/null @@ -1,48 +0,0 @@ -#region License -// ICommandLineParserErrorFormatter.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; - -namespace Fclp -{ - /// - /// Represents a formatter used to format parser errors for display to the end user. - /// - public interface ICommandLineParserErrorFormatter - { - /// - /// Formats the specified to a suitable for the end user. - /// - /// The error to format. This must not be null. - /// A describing the specified error. - string Format(ICommandLineParserError parserError); - - /// - /// Formats the specified list of to a suitable for the end user. - /// - /// The errors to format. - /// A describing the specified errors. - string Format(IEnumerable parserErrors); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/ICommandLineParserResult.cs b/Core/FluentCommandLineParser/ICommandLineParserResult.cs deleted file mode 100644 index 309dfc5..0000000 --- a/Core/FluentCommandLineParser/ICommandLineParserResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -#region License -// ICommandLineParserResult.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; -using Fclp.Internals; - -namespace Fclp -{ - /// - /// Represents all the information gained from the result of a parse operation. - /// - public interface ICommandLineParserResult - { - /// - /// Gets whether the parse operation encountered any errors. - /// - bool HasErrors { get; } - - /// - /// Gets whether the help text was called. - /// - bool HelpCalled { get; } - - /// - /// Gets whether the parser was called with empty arguments. - /// - bool EmptyArgs { get; } - - /// - /// Gets any formatted error for this result. - /// - string ErrorText { get; } - - /// - /// Gets the errors which occurred during the parse operation. - /// - IEnumerable Errors { get; } - - /// - /// Contains a list of options that were specified in the args but not setup and therefore were not expected. - /// - IEnumerable> AdditionalOptionsFound { get; } - - /// - /// Contains all the setup options that were not matched during the parse operation. - /// - IEnumerable UnMatchedOptions { get; } - } -} diff --git a/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs b/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs deleted file mode 100644 index 739a872..0000000 --- a/Core/FluentCommandLineParser/IFluentCommandLineBuilderT.cs +++ /dev/null @@ -1,37 +0,0 @@ -#region License -// IFluentCommandLineBuilderT.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp -{ - /// - /// Parser that constructs and populates the specified type of object from command line arguments. - /// - [Obsolete("IFluentCommandLineBuilder has been renamed to IFluentCommandLineParser", false)] - public interface IFluentCommandLineBuilder : IFluentCommandLineParser where TBuildType : new() - { - - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/IFluentCommandLineParser.cs b/Core/FluentCommandLineParser/IFluentCommandLineParser.cs deleted file mode 100644 index cf623c9..0000000 --- a/Core/FluentCommandLineParser/IFluentCommandLineParser.cs +++ /dev/null @@ -1,118 +0,0 @@ -#region License -// IFluentCommandLineParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using Fclp.Internals; - -namespace Fclp -{ - /// - /// Represents a command line parser which provides methods and properties - /// to easily and fluently parse command line arguments. - /// - public interface IFluentCommandLineParser - { - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name or name already exists in the . - /// - /// - /// Either or are not valid. must not be whitespace - /// or a control character. must not be null, empty or only whitespace. - /// - ICommandLineOptionFluent Setup(char shortOption, string longOption); - - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name or name already exists in the . - /// - /// - /// Either or are not valid. must not be whitespace - /// or a control character. must not be null, empty or only whitespace. - /// - [Obsolete("Use new overload Setup(char, string) to specify both a short and long option name instead.")] - ICommandLineOptionFluent Setup(string shortOption, string longOption); - - /// - /// Setup a new using the specified short Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// - /// if is invalid for a short option. - /// - /// A Option with the same name - /// already exists in the . - /// - ICommandLineOptionFluent Setup(char shortOption); - - /// - /// Setup a new using the specified long Option name. - /// - /// The long name for the Option. This must not be null, empty or only whitespace. - /// if is invalid for a long option. - /// - /// A Option with the same name already exists in the . - /// - ICommandLineOptionFluent Setup(string longOption); - - /// - /// Setup the help args. - /// - /// The help arguments to register. - IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs); - - /// - /// Parses the specified T:System.String[] using the setup Options. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - ICommandLineParserResult Parse(string[] args); - - /// - /// Returns the Options that have been setup for this parser. - /// - IEnumerable Options { get; } - - /// - /// Gets or sets the help option for this parser. - /// - IHelpCommandLineOption HelpOption { get; set; } - - /// - /// Gets or sets whether values that differ by case are considered different. - /// - bool IsCaseSensitive { get; set; } - } -} diff --git a/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs b/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs deleted file mode 100644 index 3cd5443..0000000 --- a/Core/FluentCommandLineParser/IFluentCommandLineParserT.cs +++ /dev/null @@ -1,72 +0,0 @@ -#region License -// IFluentCommandLineParserT.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using Fclp.Internals; - -namespace Fclp -{ - /// - /// A command line parser which provides methods and properties - /// to easily and fluently parse command line arguments into - /// a predefined arguments object. - /// - public interface IFluentCommandLineParser where TBuildType : new() - { - /// - /// Gets the constructed object. - /// - TBuildType Object { get; } - - /// - /// Sets up an Option for a write-able property on the type being built. - /// - ICommandLineOptionBuilderFluent Setup(Expression> propertyPicker); - - /// - /// Parses the specified T:System.String[] using the setup Options. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - ICommandLineParserResult Parse(string[] args); - - /// - /// Setup the help args. - /// - /// The help arguments to register. - IHelpCommandLineOptionFluent SetupHelp(params string[] helpArgs); - - /// - /// Gets or sets whether values that differ by case are considered different. - /// - bool IsCaseSensitive { get; set; } - - /// - /// Returns the Options that have been setup for this parser. - /// - IEnumerable Options { get; } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs b/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs deleted file mode 100644 index c26ccf1..0000000 --- a/Core/FluentCommandLineParser/IHelpCommandLineOptionFluent.cs +++ /dev/null @@ -1,80 +0,0 @@ -#region License -// IHelpCommandLineOptionFluent.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp -{ - /// - /// Provides the fluent interface for setting up the help arguments. - /// - public interface IHelpCommandLineOptionFluent - { - /// - /// Specifies the method to invoke with the formatted command line options when any of the setup - /// help arguments are found. If a callback is not required either do not call it, or specify null. - /// - /// - /// The callback to execute with the formatted command line options. - /// - /// A . - /// - /// An example use of this would be to write the provided containing the formatted - /// options directly to the console. If you would like to use a custom formatter you can do so by providing - /// one using the method. - /// - IHelpCommandLineOptionFluent Callback(Action callback); - - /// - /// Specified the method to invoke when any of the setup help arguments are found. If a callback is not required - /// either do not call it, or specified null. - /// - /// - /// The callback to execute. If you have also setup the other help callback this will be called last. - /// - /// A . - IHelpCommandLineOptionFluent Callback(Action callback); - - /// - /// Registers a custom to use to generate the help text. - /// - /// The custom formatter to use. This must not be null. - /// A . - IHelpCommandLineOptionFluent WithCustomFormatter(ICommandLineOptionFormatter formatter); - - /// - /// Provides a custom header to be printed before the registered options. - /// - /// The header to use. - /// A . - IHelpCommandLineOptionFluent WithHeader(string header); - - /// - /// Specifies that if empty arguments are found then the behaviour should be the same as when any help arguments - /// are found. - /// - /// A . - IHelpCommandLineOptionFluent UseForEmptyArgs(); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOption.cs b/Core/FluentCommandLineParser/Internals/CommandLineOption.cs deleted file mode 100644 index 62ce2f4..0000000 --- a/Core/FluentCommandLineParser/Internals/CommandLineOption.cs +++ /dev/null @@ -1,254 +0,0 @@ -#region License -// CommandLineOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -#if !FEATURE_LEGACY_REFLECTION_API -using System.Reflection; -#endif -using Fclp.Internals.Extensions; -using Fclp.Internals.Parsing; -using Fclp.Internals.Parsing.OptionParsers; - -namespace Fclp.Internals -{ - /// - /// A command line Option - /// - /// The type of value this Option requires. - public class CommandLineOption : ICommandLineOptionResult - { -#region Constructors - - /// - /// Initialises a new instance of the class. - /// - /// The short name for this Option or null if not required. Either or must not be null, empty or contain only whitespace. - /// The long name for this Option or null if not required. Either or must not be null, empty or contain only whitespace. - /// The parser to use for this Option. - /// Thrown if both and are null, empty or contain only whitespace. - /// If is null. - public CommandLineOption(string shortName, string longName, ICommandLineOptionParser parser) - { - if (parser == null) throw new ArgumentNullException("parser"); - - this.ShortName = shortName; - this.LongName = longName; - this.Parser = parser; - } - -#endregion - -#region Properties - - /// - /// - /// Gets or sets the parser to use for this . - /// - ICommandLineOptionParser Parser { get; set; } - - /// - /// Gets the description set for this . - /// - public string Description { get; set; } - - internal Action ReturnCallback { get; set; } - - internal Action> AdditionalArgumentsCallback { get; set; } - - internal T Default { get; set; } - - /// - /// Gets whether this is required. - /// - public bool IsRequired { get; set; } - - /// - /// Gets the short name of this . - /// - public string ShortName { get; set; } - - /// - /// Gets the long name of this . - /// - public string LongName { get; set; } - - /// - /// Gets whether this has a default value setup. - /// - public bool HasDefault { get; set; } - - /// - /// Gets the setup for this option. - /// - public Type SetupType - { - get - { - var type = typeof (T); - -#if FEATURE_LEGACY_REFLECTION_API - var genericArgs = type.GetGenericArguments(); -#else - var genericArgs = type.GetTypeInfo().GetGenericArguments(); -#endif - return genericArgs.Any() ? genericArgs.First() : type; - } - } - - /// - /// Gets whether this has a long name. - /// - public bool HasLongName - { - get { return this.LongName.IsNullOrWhiteSpace() == false; } - } - - /// - /// Gets whether this has a short name. - /// - public bool HasShortName - { - get { return this.ShortName.IsNullOrWhiteSpace() == false; } - } - - /// - /// Gets whether this has a callback setup. - /// - public bool HasCallback - { - get { return this.ReturnCallback != null; } - } - - /// - /// Gets whether this has an additional arguments callback setup. - /// - public bool HasAdditionalArgumentsCallback - { - get { return this.AdditionalArgumentsCallback != null; } - } - -#endregion Properties - -#region Methods - - /// - /// Binds the specified to the Option. - /// - /// The to bind. - public void Bind(ParsedOption value) - { - if (this.Parser.CanParse(value) == false) throw new OptionSyntaxException(); - - this.Bind(this.Parser.Parse(value)); - - this.BindAnyAdditionalArgs(value); - } - - /// - /// Binds the default value for this if available. - /// - public void BindDefault() - { - if (this.HasDefault) - this.Bind(this.Default); - } - - void Bind(T value) - { - if (this.HasCallback) - this.ReturnCallback(value); - } - - void BindAnyAdditionalArgs(ParsedOption option) - { - if (!this.HasAdditionalArgumentsCallback) return; - - if (option.AdditionalValues.Any()) - { - this.AdditionalArgumentsCallback(option.AdditionalValues); - } - } - - /// - /// Adds the specified description to the . - /// - /// The representing the description to use. This should be localised text. - /// A . - public ICommandLineOptionFluent WithDescription(string description) - { - this.Description = description; - return this; - } - - /// - /// Declares that this is required and a value must be specified to fulfil it. - /// - /// A . - public ICommandLineOptionFluent Required() - { - this.IsRequired = true; - return this; - } - - /// - /// Specifies the method to invoke when the . - /// is parsed. If a callback is not required either do not call it, or specify null. - /// - /// The return callback to execute with the parsed value of the Option. - /// A . - public ICommandLineOptionFluent Callback(Action callback) - { - this.ReturnCallback = callback; - return this; - } - - /// - /// Specifies the default value to use if no value is found whilst parsing this . - /// - /// The value to use. - /// A . - public ICommandLineOptionFluent SetDefault(T value) - { - this.Default = value; - this.HasDefault = true; - return this; - } - - /// - /// Specified the method to invoke with any addition arguments parsed with the Option. - /// If additional arguments are not required either do not call it, or specify null. - /// - /// The return callback to execute with the parsed addition arguments found for this Option. - /// A . - public ICommandLineOptionFluent CaptureAdditionalArguments(Action> callback) - { - this.AdditionalArgumentsCallback = callback; - return this; - } - -#endregion Methods - } -} diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs deleted file mode 100644 index 5692001..0000000 --- a/Core/FluentCommandLineParser/Internals/CommandLineOptionBuilderFluent.cs +++ /dev/null @@ -1,113 +0,0 @@ -#region License -// CommandLineOptionBuilderFluent.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Linq.Expressions; -using System.Reflection; - -namespace Fclp.Internals -{ - /// - /// Wraps the Setup call of the fluent command line parser and defines the callback to setup the property parsed value. - /// - /// The type of object being populated. - /// The type of the property the value will be assigned too. - public class CommandLineOptionBuilderFluent : ICommandLineOptionBuilderFluent - { - private readonly IFluentCommandLineParser _parser; - private readonly TBuildType _buildObject; - private readonly Expression> _propertyPicker; - - /// - /// Initializes a new instance of the class. - /// - /// The parser. - /// The build object. - /// The property picker. - public CommandLineOptionBuilderFluent( - IFluentCommandLineParser parser, - TBuildType buildObject, - Expression> propertyPicker) - { - _parser = parser; - _buildObject = buildObject; - _propertyPicker = propertyPicker; - } - - /// - /// Setup a new using the specified short and long Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// The long name for the Option. This must not be null, empty or only whitespace. - /// - /// - /// A Option with the same name or name already exists in the . - /// - /// - /// Either or are not valid. must not be whitespace - /// or a control character. must not be null, empty or only whitespace. - /// - public ICommandLineOptionFluent As(char shortOption, string longOption) - { - return _parser.Setup(shortOption, longOption) - .Callback(AssignValueToPropertyCallback); - } - - /// - /// Setup a new using the specified short Option name. - /// - /// The short name for the Option. This must not be whitespace or a control character. - /// - /// if is invalid for a short option. - /// - /// A Option with the same name - /// already exists in the . - /// - public ICommandLineOptionFluent As(char shortOption) - { - return _parser.Setup(shortOption) - .Callback(AssignValueToPropertyCallback); - } - - /// - /// Setup a new using the specified long Option name. - /// - /// The long name for the Option. This must not be null, empty or only whitespace. - /// if is invalid for a long option. - /// - /// A Option with the same name already exists in the . - /// - public ICommandLineOptionFluent As(string longOption) - { - return _parser.Setup(longOption) - .Callback(AssignValueToPropertyCallback); - } - - private void AssignValueToPropertyCallback(TProperty value) - { - var prop = (PropertyInfo)((MemberExpression)_propertyPicker.Body).Member; - prop.SetValue(_buildObject, value, null); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs deleted file mode 100644 index b92da32..0000000 --- a/Core/FluentCommandLineParser/Internals/CommandLineOptionFactory.cs +++ /dev/null @@ -1,71 +0,0 @@ -#region License -// CommandLineOptionFactory.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using Fclp.Internals.Parsing; -using Fclp.Internals.Parsing.OptionParsers; - -namespace Fclp.Internals -{ - /// - /// Factory used to create command line Options - /// - public class CommandLineOptionFactory : ICommandLineOptionFactory - { - - ICommandLineOptionParserFactory _parserFactory; - - /// - /// Gets or sets the to use. - /// - /// If null a new instance of the will be returned. - public ICommandLineOptionParserFactory ParserFactory - { - get { return _parserFactory ?? (_parserFactory = new CommandLineOptionParserFactory()); } - set { _parserFactory = value; } - } - - /// - /// Creates a new . - /// - /// The type of to create. - /// The short name for this Option. This must not be null, empty or contain only whitespace. - /// The long name for this Option or null if not required. - /// Thrown if is null, empty or contains only whitespace. - /// A . - public ICommandLineOptionResult CreateOption(string shortName, string longName) - { - return new CommandLineOption(shortName, longName, this.ParserFactory.CreateParser()); - } - - /// - /// Create a new using the specified args. - /// - /// The args used to display the help option. - public IHelpCommandLineOptionResult CreateHelpOption(string[] helpArgs) - { - return new HelpCommandLineOption(helpArgs); - } - } -} diff --git a/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs b/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs deleted file mode 100644 index a52c932..0000000 --- a/Core/FluentCommandLineParser/Internals/CommandLineOptionFormatter.cs +++ /dev/null @@ -1,139 +0,0 @@ -#region License -// CommandLineOptionFormatter.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals -{ - /// - /// Simple default formatter used to display command line options to the user. - /// - public class CommandLineOptionFormatter : ICommandLineOptionFormatter - { - #region Constructors - - /// - /// Initialises a new instance of the class. - /// - public CommandLineOptionFormatter() - { - this.ValueText = "Value"; - this.DescriptionText = "Description"; - this.NoOptionsText = "No options have been setup"; - } - - #endregion - - /// - /// The text format used in this formatter. - /// - public const string TextFormat = "\t{0}\t\t{1}\n"; - - /// - /// If true, outputs a header line above the option list. If false, the header is omitted. Default is true. - /// - private bool ShowHeader - { - get { return Header != null; } - } - - /// - /// Gets or sets the header to display before the printed options. - /// - public string Header { get; set; } - - /// - /// Gets or sets the text to use as Value header. This should be localised for the end user. - /// - public string ValueText { get; set; } - - /// - /// Gets or sets the text to use as the Description header. This should be localised for the end user. - /// - public string DescriptionText { get; set; } - - /// - /// Gets or sets the text to use when there are no options. This should be localised for the end user. - /// - public string NoOptionsText { get; set; } - - /// - /// Formats the list of to be displayed to the user. - /// - /// The list of to format. - /// A representing the format - /// If is null. - public string Format(IEnumerable options) - { - if (options == null) throw new ArgumentNullException("options"); - - var list = options.ToList(); - - if (!list.Any()) return this.NoOptionsText; - - var sb = new StringBuilder(); - sb.AppendLine(); - - // add headers first - if (ShowHeader) - { - sb.AppendLine(Header); - sb.AppendLine(); - } - - var ordered = (from option in list - orderby option.ShortName.IsNullOrWhiteSpace() == false descending , option.ShortName - select option).ToList(); - - foreach (var cmdOption in ordered) - sb.AppendFormat(CultureInfo.CurrentUICulture, TextFormat, FormatValue(cmdOption), cmdOption.Description); - - return sb.ToString(); - } - - /// - /// Formats the short and long names into one . - /// - static string FormatValue(ICommandLineOption cmdOption) - { - if (cmdOption.ShortName.IsNullOrWhiteSpace()) - { - return cmdOption.LongName; - } - - if (cmdOption.LongName.IsNullOrWhiteSpace()) - { - return cmdOption.ShortName; - } - - return cmdOption.ShortName + ":" + cmdOption.LongName; - } - // string = [-|/]f[:|=| ]|[-|/|--]filename[:|=| ] value - } -} diff --git a/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs deleted file mode 100644 index 382c310..0000000 --- a/Core/FluentCommandLineParser/Internals/EmptyHelpCommandLineOption.cs +++ /dev/null @@ -1,55 +0,0 @@ -#region License -// EmptyHelpCommandLineOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using Fclp.Internals.Parsing; - -namespace Fclp.Internals -{ - /// - /// Help command line options used when there have been non setup. - /// - public class EmptyHelpCommandLineOption : IHelpCommandLineOption - { - /// - /// Always returns false. - /// - /// The command line args. - /// Type of the comparison. - /// - public bool ShouldShowHelp(IEnumerable commandLineArgs, StringComparison comparisonType) - { - return false; - } - - /// - /// Not supported. - /// - public void ShowHelp(IEnumerable options) - { - throw new NotSupportedException(); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs b/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs deleted file mode 100644 index 6855d03..0000000 --- a/Core/FluentCommandLineParser/Internals/Errors/CommandLineParserErrorBase.cs +++ /dev/null @@ -1,50 +0,0 @@ -#region License -// CommandLineParserErrorBase.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp.Internals.Errors -{ - /// - /// Contains error information regarding a failed parsing of a Option. - /// - public abstract class CommandLineParserErrorBase : ICommandLineParserError - { - /// - /// Initialises a new instance of the class. - /// - /// The this error relates too. This must not be null. - /// If is null. - protected CommandLineParserErrorBase(ICommandLineOption cmdOption) - { - if (cmdOption == null) throw new ArgumentNullException("cmdOption"); - this.Option = cmdOption; - } - - /// - /// Gets the this error belongs too. - /// - public virtual ICommandLineOption Option { get; private set; } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs b/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs deleted file mode 100644 index 3c27b6f..0000000 --- a/Core/FluentCommandLineParser/Internals/Errors/ExpectedOptionNotFoundParseError.cs +++ /dev/null @@ -1,44 +0,0 @@ -#region License -// ExpectedOptionNotFoundParseError.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp.Internals.Errors -{ - /// - /// Represents a parse error that has occurred because an expected Option was not found. - /// - public class ExpectedOptionNotFoundParseError : CommandLineParserErrorBase - { - /// - /// Initialises a new instance of the class. - /// - /// The this error relates too. This must not be null. - /// If is null. - public ExpectedOptionNotFoundParseError(ICommandLineOption cmdOption) : - base(cmdOption) - { - } - } -} diff --git a/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs b/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs deleted file mode 100644 index 67046b9..0000000 --- a/Core/FluentCommandLineParser/Internals/Errors/OptionSyntaxParseError.cs +++ /dev/null @@ -1,70 +0,0 @@ -#region License -// OptionSyntaxParseError.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using Fclp.Internals.Parsing; - -namespace Fclp.Internals.Errors -{ - /// - /// Represents a parse error that has occurred because the syntax was in an unexpected format. - /// - public class OptionSyntaxParseError : CommandLineParserErrorBase - { - /// - /// Gets the parsed option that caused the error. - /// - public ParsedOption ParsedOption { get; private set; } - - /// - /// Initialises a new instance of the class. - /// - /// The this error relates too. This must not be null. - /// The parsed option that caused the error. - /// If is null. - public OptionSyntaxParseError(ICommandLineOption cmdOption, ParsedOption parsedOption) : - base(cmdOption) - { - ParsedOption = parsedOption; - } - } - - /// - /// - /// - public class UnexpectedValueParseError : CommandLineParserErrorBase - { - /// - /// Initialises a new instance of the class. - /// - /// The this error relates too. This must not be null. - /// If is null. - public UnexpectedValueParseError(ICommandLineOption cmdOption) : - base(cmdOption) - { - } - - - } -} diff --git a/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs b/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs deleted file mode 100644 index c610aab..0000000 --- a/Core/FluentCommandLineParser/Internals/Extensions/UsefulExtension.cs +++ /dev/null @@ -1,162 +0,0 @@ -#region License -// UsefulExtension.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Fclp.Internals.Extensions -{ - /// - /// Contains some simple extension methods that are useful throughout the library. - /// - public static class UsefulExtension - { - /// - /// Indicates whether the specified is null, empty or contains only whitespace. - /// - /// - /// - /// This method mimics the String.IsNullOrWhiteSpace method available in .Net 4 framework. - public static bool IsNullOrWhiteSpace(this string value) - { - return string.IsNullOrEmpty(value) || string.IsNullOrEmpty(value.Trim()); - } - - /// - /// Indicates whether the specified is null or contains no elements. - /// - /// A to check. - /// true if is null or contains no elements; otherwise false. - public static bool IsNullOrEmpty(this IEnumerable enumerable) - { - return enumerable == null || enumerable.Any() == false; - } - - /// - /// Performs the specified action on each element of the . - /// - /// - /// A to iterate through all the available elements. - /// The delegate to execute with on each element of the specified . - /// if is null. - public static void ForEach(this IEnumerable enumerable, Action action) - { - foreach (var item in enumerable) - { - action(item); - } - } - - /// - /// Indicates whether the specified contains whitespace. - /// - /// The to examine. - /// true if contains at least one whitespace char; otherwise false. - public static bool ContainsWhitespace(this string value) - { - return string.IsNullOrEmpty(value) == false && value.Contains(" "); - } - - /// - /// Wraps the specified in double quotes. - /// - public static string WrapInDoubleQuotes(this string str) - { - return string.Format(@"""{0}""", str); - } - - /// - /// Removes and double quotes wrapping the specified . - /// - public static string RemoveAnyWrappingDoubleQuotes(this string str) - { - return str.IsNullOrWhiteSpace() - ? str - : str.TrimStart('"').TrimEnd('"'); - } - - /// - /// Wraps the specified in double quotes if it contains at least one whitespace character. - /// - /// The to examine and wrap. - public static string WrapInDoubleQuotesIfContainsWhitespace(this string str) - { - return str.ContainsWhitespace() && str.IsWrappedInDoubleQuotes() == false - ? str.WrapInDoubleQuotes() - : str; - } - - /// - /// Determines whether the specified starts and ends with a double quote. - /// - /// The to examine. - /// true if is wrapped in double quotes; otherwise false. - public static bool IsWrappedInDoubleQuotes(this string str) - { - return str.IsNullOrWhiteSpace() == false && str.StartsWith("\"") && str.EndsWith("\""); - } - - /// - /// Splits the specified when each whitespace char is encountered into a collection of substrings. - /// - /// The to split. - /// A collection of substrings taken from . - /// If the whitespace is wrapped in double quotes then it is ignored. - public static IEnumerable SplitOnWhitespace(this string value) - { - if (string.IsNullOrEmpty(value)) return null; - - char[] parmChars = value.ToCharArray(); - - bool inDoubleQuotes = false; - - for (int index = 0; index < parmChars.Length; index++) - { - if (parmChars[index] == '"') - inDoubleQuotes = !inDoubleQuotes; - - if (!inDoubleQuotes && parmChars[index] == ' ') - parmChars[index] = '\n'; - } - - return (new string(parmChars)).Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); - } - - /// - /// Elements at or default. - /// - /// - /// The items. - /// The index. - /// The default to use. - /// - public static T ElementAtOrDefault(this T[] items, int index, T defaultToUse) - { - return index >= 0 && index < items.Length - ? items[index] - : defaultToUse; - } - } -} diff --git a/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs deleted file mode 100644 index 71678f0..0000000 --- a/Core/FluentCommandLineParser/Internals/HelpCommandLineOption.cs +++ /dev/null @@ -1,174 +0,0 @@ -#region License -// HelpCommandLineOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using Fclp.Internals.Parsing; - -namespace Fclp.Internals -{ - /// - /// Represents a command line option that determines whether to show the help text. - /// - public class HelpCommandLineOption : IHelpCommandLineOptionResult - { - ICommandLineOptionFormatter _optionFormatter; - - /// - /// Initialises a new instance of class. - /// - /// The registered help arguments. - public HelpCommandLineOption(IEnumerable helpArgs) - { - HelpArgs = helpArgs ?? new List(); - } - - /// - /// Gets the registered help arguments. - /// - public IEnumerable HelpArgs { get; private set; } - - /// - /// Gets or sets the callback method. - /// - internal Action ReturnCallback { get; set; } - - private Action ReturnCallbackWithoutParser { get; set; } - - private bool ShouldUseForEmptyArgs { get; set; } - - /// - /// Gets or sets any header to display at the top of the printed options. - /// - public string Header { get; set; } - - /// - /// Gets or sets the to use to format the options. - /// - public ICommandLineOptionFormatter OptionFormatter - { - get { return _optionFormatter ?? (_optionFormatter = new CommandLineOptionFormatter { Header = this.Header }); } - set { _optionFormatter = value; } - } - - /// - /// Specifies the method to invoke with the formatted command line options when any of the setup - /// help arguments are found. If a callback is not required either do not call it, or specify null. - /// - /// - /// The callback to execute with the formatted command line options. - /// - /// A . - public IHelpCommandLineOptionFluent Callback(Action callback) - { - ReturnCallback = callback; - return this; - } - - /// - /// Specified the method to invoke when any of the setup help arguments are found. If a callback is not required - /// either do not call it, or specified null. - /// - /// - /// The callback to execute. If you have also setup the other help callback this will be called last. - /// - /// A . - public IHelpCommandLineOptionFluent Callback(Action callback) - { - ReturnCallbackWithoutParser = callback; - return this; - } - - /// - /// Registers a custom to use to generate the help text. - /// - /// The custom formatter to use. This must not be null. - public IHelpCommandLineOptionFluent WithCustomFormatter(ICommandLineOptionFormatter formatter) - { - this.OptionFormatter = formatter; - return this; - } - - - /// - /// Provides a custom header to be printed before the registered options. - /// - /// The header to use. - public IHelpCommandLineOptionFluent WithHeader(string header) - { - this.Header = header; - return this; - } - - /// - /// Specifies that if empty arguments are found then the behaviour should be the same as when any help arguments - /// are found. - /// - /// A . - public IHelpCommandLineOptionFluent UseForEmptyArgs() - { - this.ShouldUseForEmptyArgs = true; - return this; - } - - /// - /// Determines whether the help text should be shown. - /// - /// The parsed command line arguments - /// The type of comparison to use when comparing Option names. - /// - /// true if the parser operation should cease and should be called; otherwise false if the parse operation to continue. - /// - public bool ShouldShowHelp(IEnumerable parsedOptions, StringComparison comparisonType) - { - var parsed = parsedOptions != null ? parsedOptions.ToList() : new List(); - - if (parsed.Any() == false && ShouldUseForEmptyArgs) - { - return true; - } - - return this.HelpArgs.Any(helpArg => parsed.Any(cmdArg => helpArg.Equals(cmdArg.Key, comparisonType))); - } - - /// - /// Shows the help text for the specified registered options. - /// - /// The options to generate the help text for. - public void ShowHelp(IEnumerable options) - { - if (ReturnCallback != null) - { - var formattedOutput = this.OptionFormatter.Format(options); - this.ReturnCallback(formattedOutput); - } - - if (ReturnCallbackWithoutParser != null) - { - this.ReturnCallbackWithoutParser(); - } - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs deleted file mode 100644 index b7b6e78..0000000 --- a/Core/FluentCommandLineParser/Internals/ICommandLineOption.cs +++ /dev/null @@ -1,96 +0,0 @@ -#region License -// ICommandLineOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using Fclp.Internals.Parsing; - -namespace Fclp.Internals -{ - /// - /// Represents a setup command line Option - /// - public interface ICommandLineOption - { - /// - /// Gets whether this is required. - /// - bool IsRequired { get; } - - /// - /// Gets the description set for this . - /// - string Description { get; } - - /// - /// Binds the specified to this . - /// - /// The to bind. - void Bind(ParsedOption value); - - /// - /// Binds the default value for this if available. - /// - void BindDefault(); - - /// - /// Gets the short name of this . - /// - string ShortName { get; } - - /// - /// Gets the long name of this . - /// - string LongName { get; } - - /// - /// Gets whether this has a long name. - /// - bool HasLongName { get; } - - /// - /// Gets whether this has a short name. - /// - bool HasShortName { get; } - - /// - /// Gets whether this has a callback setup. - /// - bool HasCallback { get; } - - /// - /// Gets whether this has an additional arguments callback setup. - /// - bool HasAdditionalArgumentsCallback { get; } - - /// - /// Gets whether this has a default value setup. - /// - bool HasDefault { get; } - - /// - /// Gets the setup for this option. - /// - Type SetupType { get; } - } -} diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs deleted file mode 100644 index a76443c..0000000 --- a/Core/FluentCommandLineParser/Internals/ICommandLineOptionFactory.cs +++ /dev/null @@ -1,50 +0,0 @@ -#region License -// ICommandLineOptionFactory.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp.Internals -{ - /// - /// Represents a factory capable of creating command line Options. - /// - public interface ICommandLineOptionFactory - { - /// - /// Creates a new . - /// - /// The type of to create. - /// The short name for this Option. This must not be null, empty or contain only whitespace. - /// The long name for this Option or null if not required. - /// Thrown if is null, empty or contains only whitespace. - /// A . - ICommandLineOptionResult CreateOption(string shortName, string longName); - - /// - /// Create a new using the specified args. - /// - /// The args used to display the help option. - IHelpCommandLineOptionResult CreateHelpOption(string[] helpArgs); - } -} diff --git a/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs b/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs deleted file mode 100644 index 753d4b5..0000000 --- a/Core/FluentCommandLineParser/Internals/ICommandLineOptionResult.cs +++ /dev/null @@ -1,34 +0,0 @@ -#region License -// ICommandLineOptionResult.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals -{ - /// - /// Used to encapsulate both command Option interfaces which are returned from the factory. - /// - /// The type of Option. - public interface ICommandLineOptionResult : ICommandLineOption, ICommandLineOptionFluent - { - - } -} diff --git a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs deleted file mode 100644 index 9c58573..0000000 --- a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOption.cs +++ /dev/null @@ -1,50 +0,0 @@ -#region License -// IHelpCommandLineOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using Fclp.Internals.Parsing; - -namespace Fclp.Internals -{ - /// - /// Represents a command line option that determines whether to show the help text. - /// - public interface IHelpCommandLineOption - { - /// - /// Determines whether the help text should be shown. - /// - /// The parsed command line arguments - /// The type of comparison to use when comparing Option names. - /// true if the parser operation should cease and should be called; otherwise false if the parse operation to continue. - bool ShouldShowHelp(IEnumerable parsedOptions, StringComparison comparisonType); - - /// - /// Shows the help text for the specified registered options. - /// - /// The options to generate the help text for. - void ShowHelp(IEnumerable options); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs b/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs deleted file mode 100644 index 60ee4da..0000000 --- a/Core/FluentCommandLineParser/Internals/IHelpCommandLineOptionResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -#region License -// IHelpCommandLineOptionResult.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals -{ - /// - /// Used to encapsulate both help command option interfaces which are returned from the factory. - /// - public interface IHelpCommandLineOptionResult : IHelpCommandLineOption, IHelpCommandLineOptionFluent - { - - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs deleted file mode 100644 index d2303f1..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineOptionGrouper.cs +++ /dev/null @@ -1,148 +0,0 @@ -#region License -// CommandLineOptionGrouper.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing -{ - /// - /// Organises arguments into group defined by their associated Option. - /// - public class CommandLineOptionGrouper - { - private string[] _args; - private int _currentOptionLookupIndex; - private int[] _foundOptionLookup; - private int _currentOptionIndex; - - /// - /// Groups the specified arguments by the associated Option. - /// - public string[][] GroupArgumentsByOption(string[] args) - { - if (args.IsNullOrEmpty()) return new string[0][]; - - _args = args; - - _currentOptionIndex = -1; - _currentOptionLookupIndex = -1; - FindOptionIndexes(); - - var options = new List(); - - if (this.ArgsContainsOptions() == false) - { - options.Add(this.CreateGroupForCurrent()); - } - else - { - while (MoveToNextOption()) - { - options.Add(CreateGroupForCurrent()); - } - } - - return options.ToArray(); - } - - private string[] CreateGroupForCurrent() - { - var optionEndIndex = LookupTheNextOptionIndex(); - - optionEndIndex = optionEndIndex != -1 - ? optionEndIndex - 1 - : _args.Length - 1; - - var length = optionEndIndex - (_currentOptionIndex - 1); - - return _args.Skip(_currentOptionIndex) - .Take(length) - .ToArray(); - } - - private void FindOptionIndexes() - { - var indexes = new List(); - - for (int index = 0; index < _args.Length; index++) - { - string currentArg = _args[index]; - - if (IsEndOfOptionsKey(currentArg)) break; - if (IsAKey(currentArg) == false) continue; - - indexes.Add(index); - } - - _foundOptionLookup = indexes.ToArray(); - } - - private bool ArgsContainsOptions() - { - return _foundOptionLookup.Any(); - } - - private bool MoveToNextOption() - { - var nextIndex = LookupTheNextOptionIndex(); - if (nextIndex == -1) return false; - - _currentOptionLookupIndex += 1; - _currentOptionIndex = nextIndex; - - return true; - } - - private int LookupTheNextOptionIndex() - { - return _foundOptionLookup.ElementAtOrDefault(_currentOptionLookupIndex + 1, -1); - } - - /// - /// Gets whether the specified is a Option key. - /// - /// The to examine. - /// true if is a Option key; otherwise false. - static bool IsAKey(string arg) - { - return arg != null && SpecialCharacters.OptionPrefix.Any(arg.StartsWith); - } - - /// - /// Determines whether the specified string indicates the end of parsed options. - /// - static bool IsEndOfOptionsKey(string arg) - { -#if !NETCORE - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); -#else - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); -#endif - - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs deleted file mode 100644 index 2cc4e98..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserEngineMark2.cs +++ /dev/null @@ -1,154 +0,0 @@ -#region License -// CommandLineParserEngineMark2.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing -{ - /// - /// More advanced parser for transforming command line arguments into appropriate . - /// - public class CommandLineParserEngineMark2 : ICommandLineParserEngine - { - private readonly List _additionalArgumentsFound = new List(); - private readonly List _parsedOptions = new List(); - private readonly OptionArgumentParser _optionArgumentParser = new OptionArgumentParser(); - - /// - /// Parses the specified T:System.String[] into appropriate objects.. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - public ParserEngineResult Parse(string[] args) - { - args = args ?? new string[0]; - - var grouper = new CommandLineOptionGrouper(); - - foreach (var optionGroup in grouper.GroupArgumentsByOption(args)) - { - string rawKey = optionGroup.First(); - ParseGroupIntoOption(rawKey, optionGroup.Skip(1)); - } - - return new ParserEngineResult(_parsedOptions, _additionalArgumentsFound); - } - - private void ParseGroupIntoOption(string rawKey, IEnumerable optionGroup) - { - if (IsAKey(rawKey)) - { - var parsedOption = ParsedOptionFactory.Create(rawKey); - - TrimSuffix(parsedOption); - - _optionArgumentParser.ParseArguments(optionGroup, parsedOption); - - AddParsedOptionToList(parsedOption); - } - else - { - AddAdditionArgument(rawKey); - optionGroup.ForEach(AddAdditionArgument); - } - } - - private void AddParsedOptionToList(ParsedOption parsedOption) - { - if (ShortOptionNeedsToBeSplit(parsedOption)) - { - _parsedOptions.AddRange(CloneAndSplit(parsedOption)); - } - else - { - _parsedOptions.Add(parsedOption); - } - } - - private void AddAdditionArgument(string argument) - { - if (IsEndOfOptionsKey(argument) == false) - { - _additionalArgumentsFound.Add(argument); - } - } - - private static bool ShortOptionNeedsToBeSplit(ParsedOption parsedOption) - { - return PrefixIsShortOption(parsedOption.Prefix) && parsedOption.Key.Length > 1; - } - - private static IEnumerable CloneAndSplit(ParsedOption parsedOption) - { - return parsedOption.Key.Select(c => Clone(parsedOption, c)).ToList(); - } - - private static ParsedOption Clone(ParsedOption toClone, char c) - { - var clone = toClone.Clone(); - clone.Key = new string(new[] { c }); - return clone; - } - - private static bool PrefixIsShortOption(string key) - { - return SpecialCharacters.ShortOptionPrefix.Contains(key); - } - - private static void TrimSuffix(ParsedOption parsedOption) - { - if (parsedOption.HasSuffix) - { - parsedOption.Key = parsedOption.Key.TrimEnd(parsedOption.Suffix.ToCharArray()); - } - } - - /// - /// Gets whether the specified is a Option key. - /// - /// The to examine. - /// true if is a Option key; otherwise false. - static bool IsAKey(string arg) - { // TODO: push related special char operations into there own object - return arg != null - && SpecialCharacters.OptionPrefix.Any(arg.StartsWith) - && SpecialCharacters.OptionPrefix.Any(arg.Equals) == false; - } - - /// - /// Determines whether the specified string indicates the end of parsed options. - /// - static bool IsEndOfOptionsKey(string arg) - { -#if !NETCORE - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); -#else - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); -#endif - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs b/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs deleted file mode 100644 index 84e7bd4..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/CommandLineParserResult.cs +++ /dev/null @@ -1,107 +0,0 @@ -#region License -// CommandLineParserResult.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; -using System.Linq; - -namespace Fclp.Internals.Parsing -{ - /// - /// Contains all information about the result of a parse operation. - /// - public class CommandLineParserResult : ICommandLineParserResult - { - /// - /// Initialises a new instance of the class. - /// - public CommandLineParserResult() - { - this.Errors = new List(); - this.AdditionalOptionsFound = new List>(); - this.UnMatchedOptions = new List(); - } - - /// - /// Gets whether the parse operation encountered any errors or the help text was shown. - /// - public bool HasErrors - { - get { return this.Errors.Any(); } - } - - /// - /// - /// - internal IList Errors { get; set; } - - /// - /// Gets the errors which occurred during the parse operation. - /// - IEnumerable ICommandLineParserResult.Errors - { - get { return this.Errors; } - } - - /// - /// Contains a list of options that were specified in the args but not setup and therefore were not expected. - /// - IEnumerable> ICommandLineParserResult.AdditionalOptionsFound - { - get { return this.AdditionalOptionsFound; } - } - - /// - /// Contains a list of options that were specified in the args but not setup and therefore were not expected. - /// - public IList> AdditionalOptionsFound { get; set; } - - /// - /// Contains all the setup options that were not matched during the parse operation. - /// - IEnumerable ICommandLineParserResult.UnMatchedOptions - { - get { return this.UnMatchedOptions; } - } - - /// - /// Contains all the setup options that were not matched during the parse operation. - /// - public IList UnMatchedOptions { get; set; } - - /// - /// Gets whether the help text was called. - /// - public bool HelpCalled { get; set; } - - /// - /// Gets whether the parser was called with empty arguments. - /// - public bool EmptyArgs { get; set; } - - /// - /// Gets or sets the formatted error for this result. - /// - public string ErrorText { get; set; } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs deleted file mode 100644 index a3e6632..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineOptionParserFactory.cs +++ /dev/null @@ -1,42 +0,0 @@ -#region License -// ICommandLineOptionParserFactory.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using Fclp.Internals.Parsing.OptionParsers; - -namespace Fclp.Internals.Parsing -{ - /// - /// Represents a factory capable of creating . - /// - public interface ICommandLineOptionParserFactory - { - /// - /// Creates a to handle the specified type. - /// - /// The type of parser to create. - /// A suitable for the specified type. - /// If the specified type is not supported by this factory. - ICommandLineOptionParser CreateParser(); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs b/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs deleted file mode 100644 index da08938..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/ICommandLineParserEngine.cs +++ /dev/null @@ -1,39 +0,0 @@ -#region License -// ICommandLineParserEngine.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -namespace Fclp.Internals.Parsing -{ - /// - /// Responsible for parsing command line arguments into simple key and value pairs. - /// - public interface ICommandLineParserEngine - { - /// - /// Parses the specified T:System.String[] into key value pairs. - /// - /// The T:System.String[] to parse. - /// An representing the results of the parse operation. - ParserEngineResult Parse(string[] args); - } -} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs deleted file mode 100644 index 583d8d2..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionArgumentParser.cs +++ /dev/null @@ -1,101 +0,0 @@ -#region License -// OptionArgumentParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing -{ - /// - /// - /// - public class OptionArgumentParser - { - /// - /// Parses the values. - /// - /// The args. - /// The option. - public void ParseArguments(IEnumerable args, ParsedOption option) - { - if (SpecialCharacters.ValueAssignments.Any(option.Key.Contains)) - { - TryGetArgumentFromKey(option); - } - - var allArguments = new List(); - var additionalArguments = new List(); - - var otherArguments = CollectArgumentsUntilNextKey(args).ToList(); - - if (option.HasValue) allArguments.Add(option.Value); - - if (otherArguments.Any()) - { - allArguments.AddRange(otherArguments); - - if (otherArguments.Count() > 1) - { - additionalArguments.AddRange(otherArguments); - additionalArguments.RemoveAt(0); - } - } - - option.Value = allArguments.FirstOrDefault(); - option.Values = allArguments.ToArray(); - option.AdditionalValues = additionalArguments.ToArray(); - } - - private static void TryGetArgumentFromKey(ParsedOption option) - { - var split = option.Key.Split(SpecialCharacters.ValueAssignments, 2, StringSplitOptions.RemoveEmptyEntries); - - option.Key = split[0]; - option.Value = split.Length > 1 - ? split[1].WrapInDoubleQuotesIfContainsWhitespace() - : null; - } - - static IEnumerable CollectArgumentsUntilNextKey(IEnumerable args) - { - return from argument in args - where !IsEndOfOptionsKey(argument) - select argument.WrapInDoubleQuotesIfContainsWhitespace(); - } - - /// - /// Determines whether the specified string indicates the end of parsed options. - /// - static bool IsEndOfOptionsKey(string arg) - { -#if !NETCORE - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.InvariantCultureIgnoreCase); -#else - return string.Equals(arg, SpecialCharacters.EndOfOptionsKey, StringComparison.OrdinalIgnoreCase); -#endif - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs deleted file mode 100644 index 02dabaa..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/BoolCommandLineOptionParser.cs +++ /dev/null @@ -1,111 +0,0 @@ -#region License -// BoolCommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Linq; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - /// For types the value is optional. If no value is provided for the Option then true is returned. - public class BoolCommandLineOptionParser : ICommandLineOptionParser - { - /// - /// The recognised false argument values. - /// - private static readonly string[] recognisedFalseArgs = new[] { "off", "0" }; - - /// - /// The recognised true argument values (use these values to set a boolean arg to true) - /// - private static readonly string[] recognisedTrueArgs = new[] { "on", "1" }; - - /// - /// Parses the specified into a . - /// - /// - /// - /// A representing the parsed value. - /// The value is optional. If no value is provided then true is returned. - /// - public bool Parse(ParsedOption parsedOption) - { - if (parsedOption.Value.IsNullOrWhiteSpace()) - { - // for the suffix: - // "-" means the value should be false - // "+" or any other suffix means the value should be true. - // if we don't have a - return parsedOption.HasSuffix == false || parsedOption.Suffix != "-"; - } - - bool result; - TryParse(parsedOption, out result); - return result; - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - // if the key exists with no value then this translates as true. - // if the key exists but has a value then we must try to parse the value - bool result; - return TryParse(parsedOption, out result); - } - - private bool TryParse(ParsedOption parsedOption, out bool result) - { - if (parsedOption.Value.IsNullOrWhiteSpace()) - { - // for the suffix: - // "-" means the value should be false - // "+" or any other suffix means the value should be true. - // if we don't have a - result = parsedOption.HasSuffix == false || parsedOption.Suffix != "-"; - return true; - } - - if (recognisedTrueArgs.Contains(parsedOption.Value, StringComparer.OrdinalIgnoreCase)) - { - result = true; - return true; - } - - if (recognisedFalseArgs.Contains(parsedOption.Value, StringComparer.OrdinalIgnoreCase)) - { - result = false; - return true; - } - - return bool.TryParse(parsedOption.Value, out result); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs deleted file mode 100644 index b9d91b7..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs +++ /dev/null @@ -1,231 +0,0 @@ -#region License -// CommandLineOptionParserFactory.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Reflection; -using System.Collections.Generic; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// - /// - public class CommandLineOptionParserFactory : ICommandLineOptionParserFactory - { - /// - /// Initialises a new instance of the class. - /// - public CommandLineOptionParserFactory() - { - this.Parsers = new Dictionary(); - this.AddOrReplace(new BoolCommandLineOptionParser()); - this.AddOrReplace(new Int32CommandLineOptionParser()); - this.AddOrReplace(new Int64CommandLineOptionParser()); - this.AddOrReplace(new StringCommandLineOptionParser()); - this.AddOrReplace(new DateTimeCommandLineOptionParser()); - this.AddOrReplace(new DoubleCommandLineOptionParser()); - this.AddOrReplace(new UriCommandLineOptionParser()); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new ListCommandLineOptionParser(this)); - this.AddOrReplace(new NullableCommandLineOptionParser(this)); - this.AddOrReplace(new NullableCommandLineOptionParser(this)); - this.AddOrReplace(new NullableCommandLineOptionParser(this)); - this.AddOrReplace(new NullableCommandLineOptionParser(this)); - this.AddOrReplace(new NullableCommandLineOptionParser(this)); - } - - internal Dictionary Parsers { get; set; } - - /// - /// Adds the specified to this factories list of supported parsers. - /// If an existing parser has already been registered for the type then it will be replaced. - /// - /// The type which the will be returned for. - /// The parser to return for the specified type. - /// If is null. - public void AddOrReplace(ICommandLineOptionParser parser) - { - if (parser == null) throw new ArgumentNullException("parser"); - - var parserType = typeof(T); - - // remove existing - this.Parsers.Remove(parserType); - - this.Parsers.Add(parserType, parser); - } - - /// - /// Creates a to handle the specified type. - /// - /// The type of parser to create. - /// A suitable for the specified type. - /// If the specified type is not supported by this factory. - public ICommandLineOptionParser CreateParser() - { - var type = typeof(T); - - if (!this.Parsers.ContainsKey(type)) - { -#if !NETCORE - if (!TryAddAsSpecialParser(type)) -#else - if (!TryAddAsSpecialParser(type.GetTypeInfo())) -#endif - { - throw new UnsupportedTypeException(); - } - } - - return (ICommandLineOptionParser)this.Parsers[type]; - } - - /// - /// Attempts to add a special case parser, such as Enum or List{TEnum} parser. - /// - /// True if a special parser was added for the type; otherwise false. -#if !NETCORE - private bool TryAddAsSpecialParser(Type type) -#else - private bool TryAddAsSpecialParser(TypeInfo type) -#endif - { - - if (type.IsEnum) - { - -#if !NETCORE - bool hasFlags = typeof(T).IsDefined(typeof(FlagsAttribute), false); -#else - bool hasFlags = typeof(T).GetTypeInfo().IsDefined(typeof(FlagsAttribute), false); -#endif - Type enumParserType = hasFlags ? - typeof(EnumFlagCommandLineOptionParser) : - typeof(EnumCommandLineOptionParser); - - if (!this.Parsers.ContainsKey(enumParserType)) - { - if (hasFlags) - { - this.AddOrReplace(new EnumFlagCommandLineOptionParser()); - } - else - { - this.AddOrReplace(new EnumCommandLineOptionParser()); - } - - } - return true; - } - - if (type.IsGenericType) - { - var genericType = TryGetListGenericType(type); - - if (genericType != null) - { - if (genericType.IsEnum || IsNullableEnum(genericType)) - { -#if !NETCORE - var enumListParserType = typeof(ListCommandLineOptionParser<>).MakeGenericType(genericType); -#else - var enumListParserType = typeof(ListCommandLineOptionParser<>).MakeGenericType(genericType.GetType()); -#endif - var parser = (ICommandLineOptionParser)Activator.CreateInstance(enumListParserType, this); - -#if !NETCORE - if (!this.Parsers.ContainsKey(type)) -#else - if (!this.Parsers.ContainsKey(type.GetType())) -#endif - { - this.AddOrReplace(parser); - } - - return true; - } - } - } - - if (IsNullableEnum(type)) - { -#if !NETCORE - var underlyingType = Nullable.GetUnderlyingType(type); -#else - var underlyingType = Nullable.GetUnderlyingType(type.GetType()); -#endif - var nullableEnumParserType = typeof(NullableEnumCommandLineOptionParser<>).MakeGenericType(underlyingType); - var parser = (ICommandLineOptionParser)Activator.CreateInstance(nullableEnumParserType, this); -#if !NETCORE - if (!this.Parsers.ContainsKey(type)) -#else - if (!this.Parsers.ContainsKey(type.GetType())) -#endif - { - this.AddOrReplace(parser); - } - - return true; - } - - return false; - } - -#if !NETCORE - private static bool IsNullableEnum(Type t) - { - Type u = Nullable.GetUnderlyingType(t); - return (u != null) && u.IsEnum; - } -#else - private static bool IsNullableEnum(TypeInfo t) - { - Type u = Nullable.GetUnderlyingType(t.GetType()); - return (u != null) && u.GetTypeInfo().IsEnum; - } -#endif - - /// - /// Attemps to get the type of generic from a generic list. - /// -#if !NETCORE - private static Type TryGetListGenericType(Type type) -#else - private static TypeInfo TryGetListGenericType(TypeInfo type) -#endif - { - if (type.IsGenericType && type.GetGenericTypeDefinition() - == typeof(List<>)) - { - return type.GetGenericArguments()[0].GetTypeInfo(); - } - - return null; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs deleted file mode 100644 index f101cbb..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DateTimeCommandLineOptionParser.cs +++ /dev/null @@ -1,64 +0,0 @@ -#region License -// DateTimeCommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Globalization; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - public class DateTimeCommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Parses the specified into a . - /// - /// - /// - public DateTime Parse(ParsedOption parsedOption) - { - return DateTime.Parse(TrimAnyUnwantedCharacters(parsedOption.Value), CultureInfo.CurrentCulture); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - DateTime dtOut; - return DateTime.TryParse(TrimAnyUnwantedCharacters(parsedOption.Value), out dtOut); - } - - /// - /// Trim any unwanted characters such as any remaining double quotes that can come through. - /// - private static string TrimAnyUnwantedCharacters(string value) - { - return (value ?? string.Empty).Trim('"'); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs deleted file mode 100644 index a732008..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/DoubleCommandLineOptionParser.cs +++ /dev/null @@ -1,55 +0,0 @@ -#region License -// DoubleCommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Globalization; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - public class DoubleCommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Parses the specified into a . - /// - /// - /// - public double Parse(ParsedOption parsedOption) - { - return double.Parse(parsedOption.Value, CultureInfo.InvariantCulture); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - double result; - return double.TryParse(parsedOption.Value, System.Globalization.NumberStyles.Number, CultureInfo.InvariantCulture, out result); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs deleted file mode 100644 index 6878689..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumCommandLineOptionParser.cs +++ /dev/null @@ -1,112 +0,0 @@ -#region License -// EnumCommandLineOptionParser.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -#if NETCORE -using System.Reflection; -#endif -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - /// For types the value is optional. If no value is provided for the Option then true is returned. - /// /// The that will be parsed by this parser. - public class EnumCommandLineOptionParser : ICommandLineOptionParser - { - private readonly IList _all; - private readonly Dictionary _insensitiveNames; - private readonly Dictionary _values; - - /// - /// Initialises a new instance of the class. - /// - /// If {TEnum} is not a . - public EnumCommandLineOptionParser() - { - var type = typeof(TEnum); -#if !NETCORE - if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); -#else - if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); -#endif - - _all = Enum.GetValues(typeof(TEnum)).Cast().ToList(); - _insensitiveNames = _all.ToDictionary(k => Enum.GetName(typeof(TEnum), k).ToLowerInvariant()); - _values = _all.ToDictionary(k => Convert.ToInt32(k)); - } - - /// - /// Parses the specified into a . - /// - /// - /// - /// A representing the parsed value. - /// The value is optional. If no value is provided then true is returned. - /// - public TEnum Parse(ParsedOption parsedOption) - { - return (TEnum)Enum.Parse(typeof(TEnum), parsedOption.Value.ToLowerInvariant(), true); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - if (parsedOption.HasValue == false) return false; - if (parsedOption.Value.IsNullOrWhiteSpace()) return false; - return IsDefined(parsedOption.Value); - } - - /// - /// Determines whether the specified can be parsed into {TEnum}. - /// - /// The value to be parsed - /// true if can be parsed; otherwise false. - private bool IsDefined(string value) - { - int asInt; - return int.TryParse(value, out asInt) - ? IsDefined(asInt) - : _insensitiveNames.Keys.Contains(value.ToLowerInvariant()); - } - - /// - /// Determines whether the specified represents a {TEnum} value. - /// - /// The that represents a {TEnum} value. - /// true if represents a {TEnum} value; otherwise false. - private bool IsDefined(int value) - { - return _values.Keys.Contains(value); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs deleted file mode 100644 index 0b56787..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/EnumFlagCommandLineOptionParser.cs +++ /dev/null @@ -1,125 +0,0 @@ -#region License -// EnumCommandLineOptionParser.cs -// Copyright (c) 2014, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -#if NETCORE -using System.Reflection; -#endif -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - /// For types the value is optional. If no value is provided for the Option then true is returned. - /// /// The that will be parsed by this parser. - public class EnumFlagCommandLineOptionParser : ICommandLineOptionParser - { - private readonly IList _all; - private readonly Dictionary _insensitiveNames; - private readonly Dictionary _values; - - /// - /// Initialises a new instance of the class. - /// - /// If {TEnum} is not a . - public EnumFlagCommandLineOptionParser() - { - var type = typeof(TEnum); -#if !NETCORE - if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); - if (!type.IsDefined(typeof(FlagsAttribute), false)) throw new ArgumentException("T must have a System.FlagsAttribute'"); -#else - if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); - if (!type.GetTypeInfo().IsDefined(typeof(FlagsAttribute), false)) throw new ArgumentException("T must have a System.FlagsAttribute'"); -#endif - - _all = Enum.GetValues(typeof(TEnum)).Cast().ToList(); - _insensitiveNames = _all.ToDictionary(k => Enum.GetName(typeof(TEnum), k).ToLowerInvariant()); - _values = _all.ToDictionary(k => Convert.ToInt32(k)); - } - - /// - /// Parses the specified into a . - /// - /// - /// - /// A representing the parsed value. - /// The value is optional. If no value is provided then true is returned. - /// - public TEnum Parse(ParsedOption parsedOption) - { - int result = 0; - foreach (var value in parsedOption.Values) - { - result += (int)Enum.Parse(typeof(TEnum), value.ToLowerInvariant(), true); - } - return (TEnum)(object)result; - - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - if (parsedOption == null) return false; - if (parsedOption.HasValue == false) return false; - - return parsedOption.Values.All(value => - { - if (value.IsNullOrWhiteSpace()) return false; - return IsDefined(value); - }); - } - - /// - /// Determines whether the specified can be parsed into {TEnum}. - /// - /// The value to be parsed - /// true if can be parsed; otherwise false. - private bool IsDefined(string value) - { - int asInt; - return int.TryParse(value, out asInt) - ? IsDefined(asInt) - : _insensitiveNames.Keys.Contains(value.ToLowerInvariant()); - } - - /// - /// Determines whether the specified represents a {TEnum} value. - /// - /// The that represents a {TEnum} value. - /// true if represents a {TEnum} value; otherwise false. - private bool IsDefined(int value) - { - return _values.Keys.Contains(value); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs deleted file mode 100644 index 8115404..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ICommandLineOptionParser.cs +++ /dev/null @@ -1,45 +0,0 @@ -#region License -// ICommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Represents a parser for a Option that can convert a value into the required type. - /// - public interface ICommandLineOptionParser - { - /// - /// Parses the specified into the return type. - /// - /// - /// The parsed value. - T Parse(ParsedOption parsedOption); - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - bool CanParse(ParsedOption parsedOption); - } -} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs deleted file mode 100644 index 73abde3..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int32CommandLineOptionParser.cs +++ /dev/null @@ -1,55 +0,0 @@ -#region License -// Int32CommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Globalization; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - public class Int32CommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Converts the string representation of a number in a specified culture-specific format to its 32-bit signed integer equivalent. - /// - /// - /// - public int Parse(ParsedOption parsedOption) - { - return int.Parse(parsedOption.Value, CultureInfo.CurrentCulture); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - int result; - return int.TryParse(parsedOption.Value, out result); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs deleted file mode 100644 index a9cf8e5..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/Int64CommandLineOptionParser.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Globalization; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - public class Int64CommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Converts the string representation of a number in a specified culture-specific format to its 64-bit signed integer equivalent. - /// - /// - /// - public long Parse(ParsedOption parsedOption) - { - return long.Parse(parsedOption.Value, CultureInfo.CurrentCulture); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - long result; - return long.TryParse(parsedOption.Value, out result); - } - } -} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs deleted file mode 100644 index 441aaf0..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/ListCommandLineOptionParser.cs +++ /dev/null @@ -1,86 +0,0 @@ -#region License -// ListCommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; -using System.Linq; - -namespace Fclp.Internals.Parsing.OptionParsers -{ -/// -/// -/// -/// -public class ListCommandLineOptionParser : ICommandLineOptionParser> -{ - private readonly ICommandLineOptionParserFactory _parserFactory; - - /// - /// Initialises a new instance of the . - /// - /// - public ListCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) - { - _parserFactory = parserFactory; - } - - /// - /// Parses the specified into the return type. - /// - /// - /// The parsed value. - public List Parse(ParsedOption parsedOption) - { - var parser = _parserFactory.CreateParser(); - - return parsedOption.Values.Select(value => - { - var clone = parsedOption.Clone(); - clone.Value = value; - return parser.Parse(clone); - }).ToList(); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - if (parsedOption == null) return false; - if (parsedOption.HasValue == false) return false; - - var parser = _parserFactory.CreateParser(); - - return parsedOption.Values.All(value => - { - var clone = parsedOption.Clone(); - clone.Value = value; - clone.Values = new [] { value }; - clone.AdditionalValues = new string[0]; - return parser.CanParse(clone); - }); - } -} -} diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs deleted file mode 100644 index 3c00177..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableCommandLineOptionParser.cs +++ /dev/null @@ -1,62 +0,0 @@ -#region License -// NullableCommandLineOptionParser.cs -// Copyright (c) 2015, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to nullable types - /// - public class NullableCommandLineOptionParser : ICommandLineOptionParser where TNullableType : struct - { - private readonly ICommandLineOptionParserFactory _parserFactory; - - /// - /// Initialises a new instance of the . - /// - /// - public NullableCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) - { - _parserFactory = parserFactory; - } - - /// - /// Parses the specified into a nullable type. - /// - public TNullableType? Parse(ParsedOption parsedOption) - { - if (parsedOption.HasValue == false) return null; - var parser = _parserFactory.CreateParser(); - if (parser.CanParse(parsedOption) == false) return null; - return parser.Parse(parsedOption); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - public bool CanParse(ParsedOption parsedOption) - { - return true; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs deleted file mode 100644 index bedc34f..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/NullableEnumCommandLineOptionParser.cs +++ /dev/null @@ -1,83 +0,0 @@ -#region License -// ListTests.cs -// Copyright (c) 2015, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -#if NETCORE -using System.Reflection; -#endif - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// - /// - /// - public class NullableEnumCommandLineOptionParser : ICommandLineOptionParser where TEnum : struct - { - private readonly ICommandLineOptionParserFactory _parserFactory; - - /// - /// Initialises a new instance of the . - /// - /// - public NullableEnumCommandLineOptionParser(ICommandLineOptionParserFactory parserFactory) - { - var type = typeof(TEnum); - -#if !NETCORE - if (!type.IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); -#else - if (!type.GetTypeInfo().IsEnum) throw new ArgumentException(string.Format("T must be an System.Enum but is '{0}'", type)); -#endif - _parserFactory = parserFactory; - } - - /// - /// Parses the specified into the return type. - /// - /// - /// The parsed value. - public TEnum? Parse(ParsedOption parsedOption) - { - if (parsedOption.HasValue == false) return null; - var parser = _parserFactory.CreateParser(); - return parser.Parse(parsedOption); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - if (parsedOption == null) return false; - if (parsedOption.HasValue == false) return true; - - var parser = _parserFactory.CreateParser(); - - return parser.CanParse(parsedOption); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs deleted file mode 100644 index 92d6684..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/StringCommandLineOptionParser.cs +++ /dev/null @@ -1,62 +0,0 @@ -#region License -// StringCommandLineOptionParser.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Linq; -using Fclp.Internals.Extensions; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - public class StringCommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Parses the specified into a . - /// - /// - /// - public string Parse(ParsedOption parsedOption) - { - return parsedOption.Value.RemoveAnyWrappingDoubleQuotes(); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - if (parsedOption.Value.IsNullOrWhiteSpace()) return false; - if (parsedOption.HasValue == false) return false; - - string value = parsedOption.Value.Trim(); - - var items = value.SplitOnWhitespace(); - - return items.Count() == 1; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs b/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs deleted file mode 100644 index 0d5da43..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/OptionParsers/UriCommandLineOptionParser.cs +++ /dev/null @@ -1,70 +0,0 @@ -#region License -// UriCommandLineOptionParser.cs -// Copyright (c) 2015, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp.Internals.Parsing.OptionParsers -{ - /// - /// Parser used to convert to . - /// - /// For types the value is optional. If no value is provided for the Option then true is returned. - public class UriCommandLineOptionParser : ICommandLineOptionParser - { - /// - /// Parses the specified into a . - /// - /// - /// - /// A representing the parsed value. - /// The value is optional. If no value is provided then true is returned. - /// - public Uri Parse(ParsedOption parsedOption) - { - return new Uri(parsedOption.Value); - } - - /// - /// Determines whether the specified can be parsed by this . - /// - /// - /// true if the specified can be parsed by this ; otherwise false. - public bool CanParse(ParsedOption parsedOption) - { - try - { - new Uri(parsedOption.Value); - return true; - } - catch (ArgumentNullException) - { - return false; - } - catch (UriFormatException) - { - return false; - } - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs deleted file mode 100644 index f88c51e..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOption.cs +++ /dev/null @@ -1,153 +0,0 @@ -#region License -// ParsedOption.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals.Parsing -{ - /// - /// Contains information about a single parsed option and any value. - /// - public class ParsedOption - { - /// - /// Initialises a new instance of the class. - /// - /// The command line option key. - /// The value matched with the key. - public ParsedOption(string key, string value) - { - Key = key; - Value = value; - } - - /// - /// Initialises a new instance of the class. - /// - public ParsedOption() - { - } - - /// - /// Gets the raw key representing this option. - /// - public string RawKey { get; set; } - - /// - /// Gets or sets the command line option key. - /// - public string Key { get; set; } - - /// - /// Gets or sets the first value matched with the key. - /// - public string Value { get; set; } - - /// - /// Gets or sets all the values matched with this key. - /// - public string[] Values { get; set; } - - /// - /// Gets or sets the additional values matched with this key. - /// - public string[] AdditionalValues { get; set; } - - /// - /// Gets or sets the prefix for the key e.g. -, / or --. - /// - public string Prefix { get; set; } - - /// - /// Gets or sets any suffix for the key e.g. boolean arguments with +, -. - /// - public string Suffix { get; set; } - - /// - /// Gets whether this parsed option has a value set. - /// - public bool HasValue - { - get { return string.IsNullOrEmpty(Value) == false; } - } - - /// - /// Gets whether this parsed options has a suffix. - /// - public bool HasSuffix - { - get { return string.IsNullOrEmpty(Suffix) == false; } - } - - /// - /// Determines whether two specified objects have the same values. - /// - /// The other to compare. - /// true if they are equal; otherwise false. - protected bool Equals(ParsedOption other) - { - return string.Equals(Key, other.Key) && string.Equals(Value, other.Value); - } - - /// - /// Determines whether this is equal to the specified . - /// - /// The to compare. - /// true if they are equal; otherwise false. - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != this.GetType()) return false; - return Equals((ParsedOption) obj); - } - - /// - /// Returns the hashcode for this instance. - /// - /// - public override int GetHashCode() - { - unchecked - { - return ((Key != null ? Key.GetHashCode() : 0)*397) ^ (Value != null ? Value.GetHashCode() : 0); - } - } - - /// - /// Creates a clone of this option. - /// - /// - public ParsedOption Clone() - { - return new ParsedOption - { - Key = Key, - Prefix = Prefix, - Suffix = Suffix, - Value = Value, - AdditionalValues = AdditionalValues, - RawKey = RawKey, - Values = Values - }; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs deleted file mode 100644 index cb2af07..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/ParsedOptionFactory.cs +++ /dev/null @@ -1,71 +0,0 @@ -#region License -// ParsedOptionFactory.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Linq; - -namespace Fclp.Internals.Parsing -{ - /// - /// Factory used to created parsed option meta data. - /// - public static class ParsedOptionFactory - { - /// - /// Creates parsed option meta data for the specified raw key. - /// - public static ParsedOption Create(string rawKey) - { - var prefix = ExtractPrefix(rawKey); - - return new ParsedOption - { - RawKey = rawKey, - Prefix = prefix, - Key = rawKey.Remove(0, prefix.Length), - Suffix = ExtractSuffix(rawKey) - }; - } - - - /// - /// Extracts the key identifier from the specified . - /// - /// The to extract the key identifier from. - /// A representing the key identifier if found; otherwise null. - static string ExtractPrefix(string arg) - { - return arg != null ? SpecialCharacters.OptionPrefix.FirstOrDefault(arg.StartsWith) : null; - } - - /// - /// Extracts the key identifier from the specified . - /// - /// The to extract the key identifier from. - /// A representing the key identifier if found; otherwise null. - static string ExtractSuffix(string arg) - { - return arg != null ? SpecialCharacters.OptionSuffix.FirstOrDefault(arg.EndsWith) : null; - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs b/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs deleted file mode 100644 index 5c0884b..0000000 --- a/Core/FluentCommandLineParser/Internals/Parsing/ParserEngineResult.cs +++ /dev/null @@ -1,55 +0,0 @@ -#region License -// ParserEngineResult.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; - -namespace Fclp.Internals.Parsing -{ - /// - /// Contains the results of the parse operation - /// - public class ParserEngineResult - { - /// - /// Initialises a new instance of the class; - /// - /// The parsed options. - /// Any additional values that could not be translated into options. - public ParserEngineResult(IEnumerable parsedOptions, IEnumerable additionalValues) - { - ParsedOptions = parsedOptions ?? new List(); - AdditionalValues = additionalValues ?? new List(); - } - - /// - /// Gets the parsed options. - /// - public IEnumerable ParsedOptions { get; private set; } - - /// - /// Gets any additional values that could not be translated into options. - /// - public IEnumerable AdditionalValues { get; private set; } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs b/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs deleted file mode 100644 index a47e6bd..0000000 --- a/Core/FluentCommandLineParser/Internals/SpecialCharacters.cs +++ /dev/null @@ -1,62 +0,0 @@ -#region License -// SpecialCharacters.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals -{ - /// - /// Contains special characters used throughout the parser. - /// - public static class SpecialCharacters - { - /// - /// Characters used for value assignment. - /// - public static readonly char[] ValueAssignments = new[] { '=', ':' }; - - /// - /// Assign a name to the whitespace character. - /// - public const char Whitespace = ' '; - - /// - /// Characters that define the start of an option. - /// - public static readonly string[] OptionPrefix = new[] { "/", "--", "-" }; - - /// - /// Characters that have special meaning at the end of an option key. - /// - public static readonly string[] OptionSuffix = new[] { "+", "-" }; - - /// - /// Characters that define an explicit short option. - /// - public static readonly string[] ShortOptionPrefix = new[] { "-" }; - - /// - /// The key that indicates the end of any options. - /// Any following arguments should be treated as operands, even if they begin with the '-' character. - /// - public static readonly string EndOfOptionsKey = "--"; - } -} diff --git a/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs deleted file mode 100644 index 9ca3048..0000000 --- a/Core/FluentCommandLineParser/Internals/Validators/CommandLineOptionValidator.cs +++ /dev/null @@ -1,60 +0,0 @@ -#region License -// CommandLineOptionValidator.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System.Collections.Generic; - -namespace Fclp.Internals.Validators -{ - /// - /// Wrapping validator that executes all the individual validation rules. - /// - public class CommandLineOptionValidator : ICommandLineOptionValidator - { - private readonly IList _rules; - - /// - /// Initialises a new instance of the class. - /// - public CommandLineOptionValidator(IFluentCommandLineParser parser) - { - _rules = new List - { - new OptionNameValidator(), - new NoDuplicateOptionValidator(parser) - }; - } - - /// - /// Validates the specified against all the registered rules. - /// - /// The to validate. - public void Validate(ICommandLineOption commandLineOption) - { - foreach (var rule in _rules) - { - rule.Validate(commandLineOption); - } - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs deleted file mode 100644 index bb14a8b..0000000 --- a/Core/FluentCommandLineParser/Internals/Validators/ICommandLineOptionValidator.cs +++ /dev/null @@ -1,37 +0,0 @@ -#region License -// ICommandLineOptionValidator.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion -namespace Fclp.Internals.Validators -{ - /// - /// Represents a validator used to verify new setup command line options. - /// - public interface ICommandLineOptionValidator - { - /// - /// Verifies that the proposed new is a valid new Option. - /// - /// The to validate. This must not be null. - void Validate(ICommandLineOption commandLineOption); - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs deleted file mode 100644 index 051e4ca..0000000 --- a/Core/FluentCommandLineParser/Internals/Validators/NoDuplicateOptionValidator.cs +++ /dev/null @@ -1,84 +0,0 @@ -#region License -// NoDuplicateOptionValidator.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp.Internals.Validators -{ - /// - /// Validator used to ensure no there are duplicate Options setup. - /// - public class NoDuplicateOptionValidator : ICommandLineOptionValidator - { - private readonly IFluentCommandLineParser _parser; - - - - /// - /// Initialises a new instance of the class. - /// - /// The containing the setup options. This must not be null. - public NoDuplicateOptionValidator(IFluentCommandLineParser parser) - { - if (parser == null) throw new ArgumentNullException("parser"); - _parser = parser; - } - - /// - /// Gets the type used for duplicates. - /// - private StringComparison ComparisonType - { - get { return _parser.IsCaseSensitive ? StringComparison.CurrentCulture : StringComparison.CurrentCultureIgnoreCase; } - } - - /// - /// Verifies that the specified will not cause any duplication. - /// - /// The to validate. - public void Validate(ICommandLineOption commandLineOption) - { - foreach (var option in _parser.Options) - { - if (string.IsNullOrEmpty(commandLineOption.ShortName) == false) - { - ValuesAreEqual(commandLineOption.ShortName, option.ShortName); - } - - if (string.IsNullOrEmpty(commandLineOption.LongName) == false) - { - ValuesAreEqual(commandLineOption.LongName, option.LongName); - } - } - } - - private void ValuesAreEqual(string value, string otherValue) - { - if (string.Equals(value, otherValue, ComparisonType)) - { - throw new OptionAlreadyExistsException(value); - } - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs b/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs deleted file mode 100644 index 26bf4f8..0000000 --- a/Core/FluentCommandLineParser/Internals/Validators/OptionNameValidator.cs +++ /dev/null @@ -1,109 +0,0 @@ -#region License -// OptionNameValidator.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Globalization; -using System.Linq; - -namespace Fclp.Internals.Validators -{ - /// - /// Validator to ensure a new Option has a valid long name. - /// - public class OptionNameValidator : ICommandLineOptionValidator - { - private static readonly char[] ReservedChars = - SpecialCharacters.ValueAssignments.Union(new[] { SpecialCharacters.Whitespace }).ToArray(); - - /// - /// Verifies that the specified has a valid short/long name combination. - /// - /// The to validate. This must not be null. - /// if is null. - public void Validate(ICommandLineOption commandLineOption) - { - if (commandLineOption == null) throw new ArgumentNullException("commandLineOption"); - - ValidateShortName(commandLineOption.ShortName); - ValidateLongName(commandLineOption.LongName); - ValidateShortAndLongName(commandLineOption.ShortName, commandLineOption.LongName); - } - - private static void ValidateShortAndLongName(string shortName, string longName) - { - if (string.IsNullOrEmpty(shortName) && string.IsNullOrEmpty(longName)) - { - ThrowInvalid(string.Empty, "A short or long name must be provided."); - } - } - - private static void ValidateLongName(string longName) - { - if (string.IsNullOrEmpty(longName)) return; - - VerifyDoesNotContainsReservedChar(longName); - - if (longName.Length == 1) - { - ThrowInvalid(longName, "Long names must be longer than a single character. Single characters are reserved for short options only."); - } - } - - private static void ValidateShortName(string shortName) - { - if (string.IsNullOrEmpty(shortName)) return; - - if (shortName.Length > 1) - { - ThrowInvalid(shortName, "Short names must be a single character only."); - } - - VerifyDoesNotContainsReservedChar(shortName); - - if (char.IsControl(shortName, 0)) - { - ThrowInvalid(shortName, "The character '" + shortName + "' is not valid for a short name."); - } - } - - private static void VerifyDoesNotContainsReservedChar(string value) - { - if (string.IsNullOrEmpty(value)) return; - - foreach (char reservedChar in ReservedChars) - { - if (value.Contains(reservedChar)) - { - ThrowInvalid(value, "The character '" + reservedChar + "' is not valid within a short or long name."); - } - } - } - - private static void ThrowInvalid(string value, string message) - { - throw new InvalidOptionNameException( - string.Format(CultureInfo.InvariantCulture, "Invalid option name '{0}'. {1}", value, message)); - } - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/InvalidOptionNameException.cs b/Core/FluentCommandLineParser/InvalidOptionNameException.cs deleted file mode 100644 index 8ca8cdd..0000000 --- a/Core/FluentCommandLineParser/InvalidOptionNameException.cs +++ /dev/null @@ -1,71 +0,0 @@ -#region License -// InvalidOptionNameException.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -#if FEATURE_SERIALIZATION -using System.Runtime.Serialization; -#endif -namespace Fclp -{ - /// - /// Represents an error that has occurred because a specified Option name is invalid. - /// - public class InvalidOptionNameException : Exception - { - /// - /// Initializes a new instance of the class. - /// - public InvalidOptionNameException() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The message that describes the error. - public InvalidOptionNameException(string message) : base(message) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The error message that explains the reason for the exception. - /// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - public InvalidOptionNameException(string message, Exception innerException) : base(message, innerException) - { - } - -#if FEATURE_SERIALIZATION - /// - /// Initializes a new instance of the class. - /// - /// The that holds the serialized object data about the exception being thrown. - /// The that contains contextual information about the source or destination. - protected InvalidOptionNameException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } -#endif - } -} \ No newline at end of file diff --git a/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs b/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs deleted file mode 100644 index 167de94..0000000 --- a/Core/FluentCommandLineParser/OptionAlreadyExistsException.cs +++ /dev/null @@ -1,70 +0,0 @@ -#region License -// OptionAlreadyExistsException.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -#if FEATURE_SERIALIZATION -using System.Runtime.Serialization; -#endif -namespace Fclp -{ - /// - /// Represents an error that has occurred because a matching Option already exists in the parser. - /// - #if FEATURE_SERIALIZATION - [Serializable] - #endif - public class OptionAlreadyExistsException : Exception - { - /// - /// Initialises a new instance of the class. - /// - public OptionAlreadyExistsException() { } - - /// - /// Initialises a new instance of the class. - /// - /// - public OptionAlreadyExistsException(string optionName) : base(optionName) { } - - - #if FEATURE_SERIALIZATION - /// - /// Initialises a new instance of the class. - /// - /// - /// - public OptionAlreadyExistsException(SerializationInfo info, StreamingContext context) - : base(info, context) { } - #endif - - /// - /// Initialises a new instance of the class. - /// - /// - /// - public OptionAlreadyExistsException(string optionName, Exception innerException) - : base(optionName, innerException) { } - - } -} diff --git a/Core/FluentCommandLineParser/OptionSyntaxException.cs b/Core/FluentCommandLineParser/OptionSyntaxException.cs deleted file mode 100644 index eed0352..0000000 --- a/Core/FluentCommandLineParser/OptionSyntaxException.cs +++ /dev/null @@ -1,38 +0,0 @@ -#region License -// OptionSyntaxException.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp -{ - /// - /// Represents an error that has occurred because a Option syntax was in an unexpected format. - /// - #if FEATURE_SERIALIZATION - [Serializable] - #endif - public class OptionSyntaxException : Exception - { - } -} diff --git a/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs b/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs deleted file mode 100644 index a063968..0000000 --- a/Core/FluentCommandLineParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("FluentCommandLineParser")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6caadcee-649e-4ed2-a7e6-bdb621776055")] diff --git a/Core/FluentCommandLineParser/UnsupportedTypeException.cs b/Core/FluentCommandLineParser/UnsupportedTypeException.cs deleted file mode 100644 index 558bd66..0000000 --- a/Core/FluentCommandLineParser/UnsupportedTypeException.cs +++ /dev/null @@ -1,38 +0,0 @@ -#region License -// UnsupportedTypeException.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; - -namespace Fclp -{ - /// - /// Represents an error that has occurred because a specified type is unsupported. - /// - #if FEATURE_SERIALIZATION - [Serializable] - #endif - public class UnsupportedTypeException : Exception - { - } -} diff --git a/Core/FluentCommandLineParser/project.json b/Core/FluentCommandLineParser/project.json deleted file mode 100644 index 48556e8..0000000 --- a/Core/FluentCommandLineParser/project.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "version": "1.0.0-*", - - "dependencies": { - - }, - - "frameworks": { - "netstandard1.5": { - "imports": "dnxcore50", - "dependencies": { - "NETStandard.Library": "1.6.0", - "System.Linq.Expressions": "4.1.0" - }, - "buildOptions": { "define": [ "NETCORE" ] } - } - //, - //"net451": { - // "buildOptions": { "define": [ "FEATURE_LEGACY_REFLECTION_API" ] }, - // "dependencies": { "System.Linq.Expressions": "4.0.0" } - //} - } -} diff --git a/Core/FluentCommandLineParser/project.lock.json b/Core/FluentCommandLineParser/project.lock.json deleted file mode 100644 index 7658eba..0000000 --- a/Core/FluentCommandLineParser/project.lock.json +++ /dev/null @@ -1,3480 +0,0 @@ -{ - "locked": false, - "version": 2, - "targets": { - ".NETStandard,Version=v1.5": { - "Microsoft.NETCore.Platforms/1.0.1": { - "type": "package", - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/_._": {} - } - }, - "Microsoft.NETCore.Targets/1.0.1": { - "type": "package", - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/_._": {} - } - }, - "Microsoft.Win32.Primitives/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {} - } - }, - "NETStandard.Library/1.6.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.Win32.Primitives": "4.0.1", - "System.AppContext": "4.1.0", - "System.Collections": "4.0.11", - "System.Collections.Concurrent": "4.0.12", - "System.Console": "4.0.0", - "System.Diagnostics.Debug": "4.0.11", - "System.Diagnostics.Tools": "4.0.1", - "System.Diagnostics.Tracing": "4.1.0", - "System.Globalization": "4.0.11", - "System.Globalization.Calendars": "4.0.1", - "System.IO": "4.1.0", - "System.IO.Compression": "4.1.0", - "System.IO.Compression.ZipFile": "4.0.1", - "System.IO.FileSystem": "4.0.1", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.Net.Http": "4.1.0", - "System.Net.Primitives": "4.0.11", - "System.Net.Sockets": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.1.0", - "System.Reflection.Extensions": "4.0.1", - "System.Reflection.Primitives": "4.0.1", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.0.0", - "System.Runtime.Numerics": "4.0.1", - "System.Security.Cryptography.Algorithms": "4.2.0", - "System.Security.Cryptography.Encoding": "4.0.0", - "System.Security.Cryptography.Primitives": "4.0.0", - "System.Security.Cryptography.X509Certificates": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.0.11", - "System.Threading.Tasks": "4.0.11", - "System.Threading.Timer": "4.0.1", - "System.Xml.ReaderWriter": "4.0.11", - "System.Xml.XDocument": "4.0.11" - } - }, - "runtime.native.System/4.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1" - }, - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/_._": {} - } - }, - "runtime.native.System.IO.Compression/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1" - }, - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/_._": {} - } - }, - "runtime.native.System.Security.Cryptography/4.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1" - }, - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/_._": {} - } - }, - "System.AppContext/4.1.0": { - "type": "package", - "dependencies": { - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.AppContext.dll": {} - } - }, - "System.Buffers/4.0.0": { - "type": "package", - "dependencies": { - "System.Diagnostics.Debug": "4.0.11", - "System.Diagnostics.Tracing": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Threading": "4.0.11" - }, - "compile": { - "lib/netstandard1.1/_._": {} - }, - "runtime": { - "lib/netstandard1.1/System.Buffers.dll": {} - } - }, - "System.Collections/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Collections.dll": {} - } - }, - "System.Collections.Concurrent/4.0.12": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Diagnostics.Tracing": "4.1.0", - "System.Globalization": "4.0.11", - "System.Reflection": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.0.11", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Collections.Concurrent.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Collections.Concurrent.dll": {} - } - }, - "System.Console/4.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.IO": "4.1.0", - "System.Runtime": "4.1.0", - "System.Text.Encoding": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Console.dll": {} - } - }, - "System.Diagnostics.Debug/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Diagnostics.Debug.dll": {} - } - }, - "System.Diagnostics.DiagnosticSource/4.0.0": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Tracing": "4.1.0", - "System.Reflection": "4.1.0", - "System.Runtime": "4.1.0", - "System.Threading": "4.0.11" - }, - "compile": { - "lib/netstandard1.3/_._": {} - }, - "runtime": { - "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {} - } - }, - "System.Diagnostics.Tools/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.0/System.Diagnostics.Tools.dll": {} - } - }, - "System.Diagnostics.Tracing/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {} - } - }, - "System.Globalization/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Globalization.dll": {} - } - }, - "System.Globalization.Calendars/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Globalization": "4.0.11", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Globalization.Calendars.dll": {} - } - }, - "System.IO/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.5/System.IO.dll": {} - } - }, - "System.IO.Compression/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.IO": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Threading": "4.0.11", - "System.Threading.Tasks": "4.0.11", - "runtime.native.System": "4.0.0", - "runtime.native.System.IO.Compression": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.IO.Compression.dll": {} - }, - "runtimeTargets": { - "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll": { - "assetType": "runtime", - "rid": "unix" - }, - "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll": { - "assetType": "runtime", - "rid": "win" - } - } - }, - "System.IO.Compression.ZipFile/4.0.1": { - "type": "package", - "dependencies": { - "System.Buffers": "4.0.0", - "System.IO": "4.1.0", - "System.IO.Compression": "4.1.0", - "System.IO.FileSystem": "4.0.1", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.Encoding": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.IO.Compression.ZipFile.dll": {} - } - }, - "System.IO.FileSystem/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.IO": "4.1.0", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Text.Encoding": "4.0.11", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.IO.FileSystem.dll": {} - } - }, - "System.IO.FileSystem.Primitives/4.0.1": { - "type": "package", - "dependencies": { - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} - } - }, - "System.Linq/4.1.0": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.0/System.Linq.dll": {} - } - }, - "System.Linq.Expressions/4.1.0": { - "type": "package", - "dependencies": { - "System.Reflection": "4.1.0", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Linq.Expressions.dll": {} - } - }, - "System.Net.Http/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.Win32.Primitives": "4.0.1", - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Diagnostics.DiagnosticSource": "4.0.0", - "System.Diagnostics.Tracing": "4.1.0", - "System.Globalization": "4.0.11", - "System.IO": "4.1.0", - "System.IO.Compression": "4.1.0", - "System.Net.Primitives": "4.0.11", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0", - "System.Security.Cryptography.X509Certificates": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Threading": "4.0.11", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Net.Http.dll": {} - }, - "runtimeTargets": { - "runtimes/win/lib/netstandard1.3/System.Net.Http.dll": { - "assetType": "runtime", - "rid": "win" - } - } - }, - "System.Net.Primitives/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Handles": "4.0.1" - }, - "compile": { - "ref/netstandard1.3/System.Net.Primitives.dll": {} - } - }, - "System.Net.Sockets/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.IO": "4.1.0", - "System.Net.Primitives": "4.0.11", - "System.Runtime": "4.1.0", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Net.Sockets.dll": {} - } - }, - "System.ObjectModel/4.0.12": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Threading": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.ObjectModel.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.ObjectModel.dll": {} - } - }, - "System.Reflection/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.IO": "4.1.0", - "System.Reflection.Primitives": "4.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.5/System.Reflection.dll": {} - } - }, - "System.Reflection.Extensions/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Reflection": "4.1.0", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.0/System.Reflection.Extensions.dll": {} - } - }, - "System.Reflection.Primitives/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.0/System.Reflection.Primitives.dll": {} - } - }, - "System.Resources.ResourceManager/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Globalization": "4.0.11", - "System.Reflection": "4.1.0", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.0/System.Resources.ResourceManager.dll": {} - } - }, - "System.Runtime/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1" - }, - "compile": { - "ref/netstandard1.5/System.Runtime.dll": {} - } - }, - "System.Runtime.Extensions/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.5/System.Runtime.Extensions.dll": {} - } - }, - "System.Runtime.Handles/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Runtime.Handles.dll": {} - } - }, - "System.Runtime.InteropServices/4.1.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Reflection": "4.1.0", - "System.Reflection.Primitives": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Handles": "4.0.1" - }, - "compile": { - "ref/netstandard1.5/System.Runtime.InteropServices.dll": {} - } - }, - "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "System.Reflection": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Threading": "4.0.11", - "runtime.native.System": "4.0.0" - }, - "compile": { - "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": {} - }, - "runtimeTargets": { - "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { - "assetType": "runtime", - "rid": "unix" - }, - "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { - "assetType": "runtime", - "rid": "win" - } - } - }, - "System.Runtime.Numerics/4.0.1": { - "type": "package", - "dependencies": { - "System.Globalization": "4.0.11", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0" - }, - "compile": { - "ref/netstandard1.1/System.Runtime.Numerics.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Runtime.Numerics.dll": {} - } - }, - "System.Security.Cryptography.Algorithms/4.2.0": { - "type": "package", - "dependencies": { - "System.IO": "4.1.0", - "System.Runtime": "4.1.0", - "System.Security.Cryptography.Primitives": "4.0.0" - }, - "compile": { - "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll": {} - } - }, - "System.Security.Cryptography.Encoding/4.0.0": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "System.Collections": "4.0.11", - "System.Collections.Concurrent": "4.0.12", - "System.Linq": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Runtime.InteropServices": "4.1.0", - "System.Security.Cryptography.Primitives": "4.0.0", - "System.Text.Encoding": "4.0.11", - "runtime.native.System.Security.Cryptography": "4.0.0" - }, - "compile": { - "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {} - }, - "runtimeTargets": { - "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { - "assetType": "runtime", - "rid": "unix" - }, - "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { - "assetType": "runtime", - "rid": "win" - } - } - }, - "System.Security.Cryptography.Primitives/4.0.0": { - "type": "package", - "dependencies": { - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.0.11", - "System.IO": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Threading": "4.0.11", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} - } - }, - "System.Security.Cryptography.X509Certificates/4.1.0": { - "type": "package", - "dependencies": { - "System.Runtime": "4.1.0", - "System.Runtime.Handles": "4.0.1", - "System.Security.Cryptography.Algorithms": "4.2.0", - "System.Security.Cryptography.Encoding": "4.0.0" - }, - "compile": { - "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {} - } - }, - "System.Text.Encoding/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Text.Encoding.dll": {} - } - }, - "System.Text.Encoding.Extensions/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0", - "System.Text.Encoding": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {} - } - }, - "System.Text.RegularExpressions/4.1.0": { - "type": "package", - "dependencies": { - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Text.RegularExpressions.dll": {} - } - }, - "System.Threading/4.0.11": { - "type": "package", - "dependencies": { - "System.Runtime": "4.1.0", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Threading.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Threading.dll": {} - } - }, - "System.Threading.Tasks/4.0.11": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.3/System.Threading.Tasks.dll": {} - } - }, - "System.Threading.Tasks.Extensions/4.0.0": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Runtime": "4.1.0", - "System.Threading.Tasks": "4.0.11" - }, - "compile": { - "lib/netstandard1.0/_._": {} - }, - "runtime": { - "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {} - } - }, - "System.Threading.Timer/4.0.1": { - "type": "package", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1", - "Microsoft.NETCore.Targets": "1.0.1", - "System.Runtime": "4.1.0" - }, - "compile": { - "ref/netstandard1.2/System.Threading.Timer.dll": {} - } - }, - "System.Xml.ReaderWriter/4.0.11": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.0.11", - "System.IO": "4.1.0", - "System.IO.FileSystem": "4.0.1", - "System.IO.FileSystem.Primitives": "4.0.1", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.InteropServices": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Text.Encoding.Extensions": "4.0.11", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading.Tasks": "4.0.11", - "System.Threading.Tasks.Extensions": "4.0.0" - }, - "compile": { - "ref/netstandard1.3/System.Xml.ReaderWriter.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Xml.ReaderWriter.dll": {} - } - }, - "System.Xml.XDocument/4.0.11": { - "type": "package", - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Diagnostics.Tools": "4.0.1", - "System.Globalization": "4.0.11", - "System.IO": "4.1.0", - "System.Reflection": "4.1.0", - "System.Resources.ResourceManager": "4.0.1", - "System.Runtime": "4.1.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.Encoding": "4.0.11", - "System.Threading": "4.0.11", - "System.Xml.ReaderWriter": "4.0.11" - }, - "compile": { - "ref/netstandard1.3/System.Xml.XDocument.dll": {} - }, - "runtime": { - "lib/netstandard1.3/System.Xml.XDocument.dll": {} - } - } - } - }, - "libraries": { - "Microsoft.NETCore.Platforms/1.0.1": { - "sha512": "4L/w/J1TKV03QLqH86f7gftULX5hm1IqXU5XQ9P5GtuCdS+yXpi5AQ8RXXVZ1v3c38vP2GqnzDysLJ9EfqRTPQ==", - "type": "package", - "path": "Microsoft.NETCore.Platforms/1.0.1", - "files": [ - "Microsoft.NETCore.Platforms.1.0.1.nupkg.sha512", - "Microsoft.NETCore.Platforms.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/_._", - "runtime.json" - ] - }, - "Microsoft.NETCore.Targets/1.0.1": { - "sha512": "5Y6AzzxG3gg110XggFr2vSLOyxb7cFzhd8+oyf+VPgtrY+Nq5m4O048npNi5WiX+vLqs9fN4anb6QKbVviqBsQ==", - "type": "package", - "path": "Microsoft.NETCore.Targets/1.0.1", - "files": [ - "Microsoft.NETCore.Targets.1.0.1.nupkg.sha512", - "Microsoft.NETCore.Targets.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/_._", - "runtime.json" - ] - }, - "Microsoft.Win32.Primitives/4.0.1": { - "sha512": "nqi97Ue263Tx+n/GpA1dGiExv9nJGb5wkeoYlH0MvnkGZ6FoexKbcU+D0ChbU6EvDnsqUxyWgqqhAdbppbkOsQ==", - "type": "package", - "path": "Microsoft.Win32.Primitives/4.0.1", - "files": [ - "Microsoft.Win32.Primitives.4.0.1.nupkg.sha512", - "Microsoft.Win32.Primitives.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/Microsoft.Win32.Primitives.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/Microsoft.Win32.Primitives.dll", - "ref/netstandard1.3/Microsoft.Win32.Primitives.dll", - "ref/netstandard1.3/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/de/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/es/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/fr/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/it/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/ja/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/ko/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/ru/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/zh-hans/Microsoft.Win32.Primitives.xml", - "ref/netstandard1.3/zh-hant/Microsoft.Win32.Primitives.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "NETStandard.Library/1.6.0": { - "sha512": "MwHuvbxwJ1xB9Afd6WasYx5J7kfOn8CYGNSv31Ie0Wr2ZSKvuoRivdju3k4fQvZ6nlxXvASsush2VuVBKezdbw==", - "type": "package", - "path": "NETStandard.Library/1.6.0", - "files": [ - "NETStandard.Library.1.6.0.nupkg.sha512", - "NETStandard.Library.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt" - ] - }, - "runtime.native.System/4.0.0": { - "sha512": "yepfh3Y8eCy38yTAoxHuA/C7QjK2tDHvCJuLLSYeU8GVgqIOY7AGshGxwFRC+AxvNQADkwjlj/6FU4deOGNNQQ==", - "type": "package", - "path": "runtime.native.System/4.0.0", - "files": [ - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/_._", - "runtime.native.System.4.0.0.nupkg.sha512", - "runtime.native.System.nuspec" - ] - }, - "runtime.native.System.IO.Compression/4.1.0": { - "sha512": "B7sSouMGZqcM6l1UeVJEoh8kC6+EivSZvsf1LmbtAhPik/YNq/4QHUVkRWrZ2rKo9nfIdZ/GL3EtqNtO+I/SOg==", - "type": "package", - "path": "runtime.native.System.IO.Compression/4.1.0", - "files": [ - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/_._", - "runtime.native.System.IO.Compression.4.1.0.nupkg.sha512", - "runtime.native.System.IO.Compression.nuspec" - ] - }, - "runtime.native.System.Security.Cryptography/4.0.0": { - "sha512": "4ca/RWUp/xiR5LXZDFCdqJRFs8X3l0fq1CkNcknIZE675CuPF65PE5rmNDjgZrlFsFWrKxnq6stxda/KPUkNxw==", - "type": "package", - "path": "runtime.native.System.Security.Cryptography/4.0.0", - "files": [ - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/_._", - "runtime.native.System.Security.Cryptography.4.0.0.nupkg.sha512", - "runtime.native.System.Security.Cryptography.nuspec" - ] - }, - "System.AppContext/4.1.0": { - "sha512": "YliYZTf0dlY+GH5F1kBjReoPPqXUqJNuhEEd85g88aoeMRsrZNQZqK3qVWaQujl8zaM1pghBhiynXfj5W0X5nQ==", - "type": "package", - "path": "System.AppContext/4.1.0", - "files": [ - "System.AppContext.4.1.0.nupkg.sha512", - "System.AppContext.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.AppContext.dll", - "lib/net463/System.AppContext.dll", - "lib/netcore50/System.AppContext.dll", - "lib/netstandard1.6/System.AppContext.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.AppContext.dll", - "ref/net463/System.AppContext.dll", - "ref/netstandard/_._", - "ref/netstandard1.3/System.AppContext.dll", - "ref/netstandard1.3/System.AppContext.xml", - "ref/netstandard1.3/de/System.AppContext.xml", - "ref/netstandard1.3/es/System.AppContext.xml", - "ref/netstandard1.3/fr/System.AppContext.xml", - "ref/netstandard1.3/it/System.AppContext.xml", - "ref/netstandard1.3/ja/System.AppContext.xml", - "ref/netstandard1.3/ko/System.AppContext.xml", - "ref/netstandard1.3/ru/System.AppContext.xml", - "ref/netstandard1.3/zh-hans/System.AppContext.xml", - "ref/netstandard1.3/zh-hant/System.AppContext.xml", - "ref/netstandard1.6/System.AppContext.dll", - "ref/netstandard1.6/System.AppContext.xml", - "ref/netstandard1.6/de/System.AppContext.xml", - "ref/netstandard1.6/es/System.AppContext.xml", - "ref/netstandard1.6/fr/System.AppContext.xml", - "ref/netstandard1.6/it/System.AppContext.xml", - "ref/netstandard1.6/ja/System.AppContext.xml", - "ref/netstandard1.6/ko/System.AppContext.xml", - "ref/netstandard1.6/ru/System.AppContext.xml", - "ref/netstandard1.6/zh-hans/System.AppContext.xml", - "ref/netstandard1.6/zh-hant/System.AppContext.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/aot/lib/netcore50/System.AppContext.dll" - ] - }, - "System.Buffers/4.0.0": { - "sha512": "ZzXO4AkiHOKWZaYKky/JfkAdi8MHyqJU/VM1yyyLVDJXkxzdr/bB1KdFiAyyivLg+xse1WMFgPppiPIVheXWIw==", - "type": "package", - "path": "System.Buffers/4.0.0", - "files": [ - "System.Buffers.4.0.0.nupkg.sha512", - "System.Buffers.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.1/.xml", - "lib/netstandard1.1/System.Buffers.dll" - ] - }, - "System.Collections/4.0.11": { - "sha512": "mwplfsKawu6y513xLRRvP6akVQI4Qj+fip1cZmw3OXP+nMYSIHFviPSeQLZfu5xtr0OJ3qSD7wPENO2GdypOfQ==", - "type": "package", - "path": "System.Collections/4.0.11", - "files": [ - "System.Collections.4.0.11.nupkg.sha512", - "System.Collections.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Collections.dll", - "ref/netcore50/System.Collections.xml", - "ref/netcore50/de/System.Collections.xml", - "ref/netcore50/es/System.Collections.xml", - "ref/netcore50/fr/System.Collections.xml", - "ref/netcore50/it/System.Collections.xml", - "ref/netcore50/ja/System.Collections.xml", - "ref/netcore50/ko/System.Collections.xml", - "ref/netcore50/ru/System.Collections.xml", - "ref/netcore50/zh-hans/System.Collections.xml", - "ref/netcore50/zh-hant/System.Collections.xml", - "ref/netstandard1.0/System.Collections.dll", - "ref/netstandard1.0/System.Collections.xml", - "ref/netstandard1.0/de/System.Collections.xml", - "ref/netstandard1.0/es/System.Collections.xml", - "ref/netstandard1.0/fr/System.Collections.xml", - "ref/netstandard1.0/it/System.Collections.xml", - "ref/netstandard1.0/ja/System.Collections.xml", - "ref/netstandard1.0/ko/System.Collections.xml", - "ref/netstandard1.0/ru/System.Collections.xml", - "ref/netstandard1.0/zh-hans/System.Collections.xml", - "ref/netstandard1.0/zh-hant/System.Collections.xml", - "ref/netstandard1.3/System.Collections.dll", - "ref/netstandard1.3/System.Collections.xml", - "ref/netstandard1.3/de/System.Collections.xml", - "ref/netstandard1.3/es/System.Collections.xml", - "ref/netstandard1.3/fr/System.Collections.xml", - "ref/netstandard1.3/it/System.Collections.xml", - "ref/netstandard1.3/ja/System.Collections.xml", - "ref/netstandard1.3/ko/System.Collections.xml", - "ref/netstandard1.3/ru/System.Collections.xml", - "ref/netstandard1.3/zh-hans/System.Collections.xml", - "ref/netstandard1.3/zh-hant/System.Collections.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Collections.Concurrent/4.0.12": { - "sha512": "9mK7U6Ax9PZWf4H/UuCHOY3zg1lwE7EXSNJTyWXXPcKIGriC3ewZMZ9qRBf+M9xzaA2jd86bEd/JQ7fptdwMTg==", - "type": "package", - "path": "System.Collections.Concurrent/4.0.12", - "files": [ - "System.Collections.Concurrent.4.0.12.nupkg.sha512", - "System.Collections.Concurrent.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.Collections.Concurrent.dll", - "lib/netstandard1.3/System.Collections.Concurrent.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Collections.Concurrent.dll", - "ref/netcore50/System.Collections.Concurrent.xml", - "ref/netcore50/de/System.Collections.Concurrent.xml", - "ref/netcore50/es/System.Collections.Concurrent.xml", - "ref/netcore50/fr/System.Collections.Concurrent.xml", - "ref/netcore50/it/System.Collections.Concurrent.xml", - "ref/netcore50/ja/System.Collections.Concurrent.xml", - "ref/netcore50/ko/System.Collections.Concurrent.xml", - "ref/netcore50/ru/System.Collections.Concurrent.xml", - "ref/netcore50/zh-hans/System.Collections.Concurrent.xml", - "ref/netcore50/zh-hant/System.Collections.Concurrent.xml", - "ref/netstandard1.1/System.Collections.Concurrent.dll", - "ref/netstandard1.1/System.Collections.Concurrent.xml", - "ref/netstandard1.1/de/System.Collections.Concurrent.xml", - "ref/netstandard1.1/es/System.Collections.Concurrent.xml", - "ref/netstandard1.1/fr/System.Collections.Concurrent.xml", - "ref/netstandard1.1/it/System.Collections.Concurrent.xml", - "ref/netstandard1.1/ja/System.Collections.Concurrent.xml", - "ref/netstandard1.1/ko/System.Collections.Concurrent.xml", - "ref/netstandard1.1/ru/System.Collections.Concurrent.xml", - "ref/netstandard1.1/zh-hans/System.Collections.Concurrent.xml", - "ref/netstandard1.1/zh-hant/System.Collections.Concurrent.xml", - "ref/netstandard1.3/System.Collections.Concurrent.dll", - "ref/netstandard1.3/System.Collections.Concurrent.xml", - "ref/netstandard1.3/de/System.Collections.Concurrent.xml", - "ref/netstandard1.3/es/System.Collections.Concurrent.xml", - "ref/netstandard1.3/fr/System.Collections.Concurrent.xml", - "ref/netstandard1.3/it/System.Collections.Concurrent.xml", - "ref/netstandard1.3/ja/System.Collections.Concurrent.xml", - "ref/netstandard1.3/ko/System.Collections.Concurrent.xml", - "ref/netstandard1.3/ru/System.Collections.Concurrent.xml", - "ref/netstandard1.3/zh-hans/System.Collections.Concurrent.xml", - "ref/netstandard1.3/zh-hant/System.Collections.Concurrent.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Console/4.0.0": { - "sha512": "nOPtaHrRruntGbl1QQh9TwI3+fVAADecgAPMzrnrXasu9ArHEiH3ifjV2Hocf/RYYOWleOHm1Hdl5zwivIPGBw==", - "type": "package", - "path": "System.Console/4.0.0", - "files": [ - "System.Console.4.0.0.nupkg.sha512", - "System.Console.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Console.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Console.dll", - "ref/netstandard1.3/System.Console.dll", - "ref/netstandard1.3/System.Console.xml", - "ref/netstandard1.3/de/System.Console.xml", - "ref/netstandard1.3/es/System.Console.xml", - "ref/netstandard1.3/fr/System.Console.xml", - "ref/netstandard1.3/it/System.Console.xml", - "ref/netstandard1.3/ja/System.Console.xml", - "ref/netstandard1.3/ko/System.Console.xml", - "ref/netstandard1.3/ru/System.Console.xml", - "ref/netstandard1.3/zh-hans/System.Console.xml", - "ref/netstandard1.3/zh-hant/System.Console.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Diagnostics.Debug/4.0.11": { - "sha512": "83pJvRSUCL5y4dC2Q8wG7ItblNtguWXbC8pf/easfFsRr3IylY4nl/r1YMD+f3LHeheRFR31xaBinHr19Zk7fw==", - "type": "package", - "path": "System.Diagnostics.Debug/4.0.11", - "files": [ - "System.Diagnostics.Debug.4.0.11.nupkg.sha512", - "System.Diagnostics.Debug.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Diagnostics.Debug.dll", - "ref/netcore50/System.Diagnostics.Debug.xml", - "ref/netcore50/de/System.Diagnostics.Debug.xml", - "ref/netcore50/es/System.Diagnostics.Debug.xml", - "ref/netcore50/fr/System.Diagnostics.Debug.xml", - "ref/netcore50/it/System.Diagnostics.Debug.xml", - "ref/netcore50/ja/System.Diagnostics.Debug.xml", - "ref/netcore50/ko/System.Diagnostics.Debug.xml", - "ref/netcore50/ru/System.Diagnostics.Debug.xml", - "ref/netcore50/zh-hans/System.Diagnostics.Debug.xml", - "ref/netcore50/zh-hant/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/System.Diagnostics.Debug.dll", - "ref/netstandard1.0/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/de/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/es/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/fr/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/it/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/ja/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/ko/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/ru/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/zh-hans/System.Diagnostics.Debug.xml", - "ref/netstandard1.0/zh-hant/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/System.Diagnostics.Debug.dll", - "ref/netstandard1.3/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/de/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/es/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/fr/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/it/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/ja/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/ko/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/ru/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/zh-hans/System.Diagnostics.Debug.xml", - "ref/netstandard1.3/zh-hant/System.Diagnostics.Debug.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Diagnostics.DiagnosticSource/4.0.0": { - "sha512": "BC7VEwjFn4JP5nammI3FihCjXy78cNPOt7lMOjCLSol3EfpvM4kR9hO3vxXhhh+ljUsJZEytCGYWz97RVnPdHA==", - "type": "package", - "path": "System.Diagnostics.DiagnosticSource/4.0.0", - "files": [ - "System.Diagnostics.DiagnosticSource.4.0.0.nupkg.sha512", - "System.Diagnostics.DiagnosticSource.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/net46/System.Diagnostics.DiagnosticSource.dll", - "lib/net46/System.Diagnostics.DiagnosticSource.xml", - "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.dll", - "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.xml", - "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll", - "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.xml", - "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.dll", - "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.xml" - ] - }, - "System.Diagnostics.Tools/4.0.1": { - "sha512": "7q2sNlaOVvUgBFJvqzM7IZm5aJgSbGObJDZ2kQZFLjrAmpLf5GiDzlmHc539OkGnTRT3UvsFapHkkxM+awMCuQ==", - "type": "package", - "path": "System.Diagnostics.Tools/4.0.1", - "files": [ - "System.Diagnostics.Tools.4.0.1.nupkg.sha512", - "System.Diagnostics.Tools.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Diagnostics.Tools.dll", - "ref/netcore50/System.Diagnostics.Tools.xml", - "ref/netcore50/de/System.Diagnostics.Tools.xml", - "ref/netcore50/es/System.Diagnostics.Tools.xml", - "ref/netcore50/fr/System.Diagnostics.Tools.xml", - "ref/netcore50/it/System.Diagnostics.Tools.xml", - "ref/netcore50/ja/System.Diagnostics.Tools.xml", - "ref/netcore50/ko/System.Diagnostics.Tools.xml", - "ref/netcore50/ru/System.Diagnostics.Tools.xml", - "ref/netcore50/zh-hans/System.Diagnostics.Tools.xml", - "ref/netcore50/zh-hant/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/System.Diagnostics.Tools.dll", - "ref/netstandard1.0/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/de/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/es/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/fr/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/it/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/ja/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/ko/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/ru/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/zh-hans/System.Diagnostics.Tools.xml", - "ref/netstandard1.0/zh-hant/System.Diagnostics.Tools.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Diagnostics.Tracing/4.1.0": { - "sha512": "5wK1axG5QMGZuzZoc+j2Eh7EssfmKSE34yAVqu09df4u2KRGf18RzJbtJNLQ+hZ4rvRaJH26R0+zLk0u07sF7g==", - "type": "package", - "path": "System.Diagnostics.Tracing/4.1.0", - "files": [ - "System.Diagnostics.Tracing.4.1.0.nupkg.sha512", - "System.Diagnostics.Tracing.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.Diagnostics.Tracing.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.Diagnostics.Tracing.dll", - "ref/netcore50/System.Diagnostics.Tracing.dll", - "ref/netcore50/System.Diagnostics.Tracing.xml", - "ref/netcore50/de/System.Diagnostics.Tracing.xml", - "ref/netcore50/es/System.Diagnostics.Tracing.xml", - "ref/netcore50/fr/System.Diagnostics.Tracing.xml", - "ref/netcore50/it/System.Diagnostics.Tracing.xml", - "ref/netcore50/ja/System.Diagnostics.Tracing.xml", - "ref/netcore50/ko/System.Diagnostics.Tracing.xml", - "ref/netcore50/ru/System.Diagnostics.Tracing.xml", - "ref/netcore50/zh-hans/System.Diagnostics.Tracing.xml", - "ref/netcore50/zh-hant/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/System.Diagnostics.Tracing.dll", - "ref/netstandard1.1/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/de/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/es/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/fr/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/it/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/ja/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/ko/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/ru/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/zh-hans/System.Diagnostics.Tracing.xml", - "ref/netstandard1.1/zh-hant/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/System.Diagnostics.Tracing.dll", - "ref/netstandard1.2/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/de/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/es/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/fr/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/it/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/ja/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/ko/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/ru/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/zh-hans/System.Diagnostics.Tracing.xml", - "ref/netstandard1.2/zh-hant/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/System.Diagnostics.Tracing.dll", - "ref/netstandard1.3/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/de/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/es/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/fr/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/it/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/ja/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/ko/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/ru/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/zh-hans/System.Diagnostics.Tracing.xml", - "ref/netstandard1.3/zh-hant/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/System.Diagnostics.Tracing.dll", - "ref/netstandard1.5/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/de/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/es/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/fr/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/it/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/ja/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/ko/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/ru/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/zh-hans/System.Diagnostics.Tracing.xml", - "ref/netstandard1.5/zh-hant/System.Diagnostics.Tracing.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Globalization/4.0.11": { - "sha512": "BG5Pd7hvytuDEaRLHgbdFiuB29oPiLEPjr3Z5S6xPgRGQzoRMv6QaZV+4RPbygXC80xkMa9wcNZFwzayQ4Zk1A==", - "type": "package", - "path": "System.Globalization/4.0.11", - "files": [ - "System.Globalization.4.0.11.nupkg.sha512", - "System.Globalization.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Globalization.dll", - "ref/netcore50/System.Globalization.xml", - "ref/netcore50/de/System.Globalization.xml", - "ref/netcore50/es/System.Globalization.xml", - "ref/netcore50/fr/System.Globalization.xml", - "ref/netcore50/it/System.Globalization.xml", - "ref/netcore50/ja/System.Globalization.xml", - "ref/netcore50/ko/System.Globalization.xml", - "ref/netcore50/ru/System.Globalization.xml", - "ref/netcore50/zh-hans/System.Globalization.xml", - "ref/netcore50/zh-hant/System.Globalization.xml", - "ref/netstandard1.0/System.Globalization.dll", - "ref/netstandard1.0/System.Globalization.xml", - "ref/netstandard1.0/de/System.Globalization.xml", - "ref/netstandard1.0/es/System.Globalization.xml", - "ref/netstandard1.0/fr/System.Globalization.xml", - "ref/netstandard1.0/it/System.Globalization.xml", - "ref/netstandard1.0/ja/System.Globalization.xml", - "ref/netstandard1.0/ko/System.Globalization.xml", - "ref/netstandard1.0/ru/System.Globalization.xml", - "ref/netstandard1.0/zh-hans/System.Globalization.xml", - "ref/netstandard1.0/zh-hant/System.Globalization.xml", - "ref/netstandard1.3/System.Globalization.dll", - "ref/netstandard1.3/System.Globalization.xml", - "ref/netstandard1.3/de/System.Globalization.xml", - "ref/netstandard1.3/es/System.Globalization.xml", - "ref/netstandard1.3/fr/System.Globalization.xml", - "ref/netstandard1.3/it/System.Globalization.xml", - "ref/netstandard1.3/ja/System.Globalization.xml", - "ref/netstandard1.3/ko/System.Globalization.xml", - "ref/netstandard1.3/ru/System.Globalization.xml", - "ref/netstandard1.3/zh-hans/System.Globalization.xml", - "ref/netstandard1.3/zh-hant/System.Globalization.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Globalization.Calendars/4.0.1": { - "sha512": "uBna2y72JXZ9GlK7nTVSQTNFLXWXL2SplVrMvT44iTmabZRynEj1LtN2Kejk537wn5RQtgB7V1PdfCdMChtyXg==", - "type": "package", - "path": "System.Globalization.Calendars/4.0.1", - "files": [ - "System.Globalization.Calendars.4.0.1.nupkg.sha512", - "System.Globalization.Calendars.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Globalization.Calendars.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Globalization.Calendars.dll", - "ref/netstandard1.3/System.Globalization.Calendars.dll", - "ref/netstandard1.3/System.Globalization.Calendars.xml", - "ref/netstandard1.3/de/System.Globalization.Calendars.xml", - "ref/netstandard1.3/es/System.Globalization.Calendars.xml", - "ref/netstandard1.3/fr/System.Globalization.Calendars.xml", - "ref/netstandard1.3/it/System.Globalization.Calendars.xml", - "ref/netstandard1.3/ja/System.Globalization.Calendars.xml", - "ref/netstandard1.3/ko/System.Globalization.Calendars.xml", - "ref/netstandard1.3/ru/System.Globalization.Calendars.xml", - "ref/netstandard1.3/zh-hans/System.Globalization.Calendars.xml", - "ref/netstandard1.3/zh-hant/System.Globalization.Calendars.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.IO/4.1.0": { - "sha512": "stML5fQWSMwuKmQZFaQNuZPiO/P7MZ2kcbYPVeDzOJvnfnmjP1fhNzX25Z7g+qVAVeEzCis3fcAhUzkn1Nrw7g==", - "type": "package", - "path": "System.IO/4.1.0", - "files": [ - "System.IO.4.1.0.nupkg.sha512", - "System.IO.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.IO.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.IO.dll", - "ref/netcore50/System.IO.dll", - "ref/netcore50/System.IO.xml", - "ref/netcore50/de/System.IO.xml", - "ref/netcore50/es/System.IO.xml", - "ref/netcore50/fr/System.IO.xml", - "ref/netcore50/it/System.IO.xml", - "ref/netcore50/ja/System.IO.xml", - "ref/netcore50/ko/System.IO.xml", - "ref/netcore50/ru/System.IO.xml", - "ref/netcore50/zh-hans/System.IO.xml", - "ref/netcore50/zh-hant/System.IO.xml", - "ref/netstandard1.0/System.IO.dll", - "ref/netstandard1.0/System.IO.xml", - "ref/netstandard1.0/de/System.IO.xml", - "ref/netstandard1.0/es/System.IO.xml", - "ref/netstandard1.0/fr/System.IO.xml", - "ref/netstandard1.0/it/System.IO.xml", - "ref/netstandard1.0/ja/System.IO.xml", - "ref/netstandard1.0/ko/System.IO.xml", - "ref/netstandard1.0/ru/System.IO.xml", - "ref/netstandard1.0/zh-hans/System.IO.xml", - "ref/netstandard1.0/zh-hant/System.IO.xml", - "ref/netstandard1.3/System.IO.dll", - "ref/netstandard1.3/System.IO.xml", - "ref/netstandard1.3/de/System.IO.xml", - "ref/netstandard1.3/es/System.IO.xml", - "ref/netstandard1.3/fr/System.IO.xml", - "ref/netstandard1.3/it/System.IO.xml", - "ref/netstandard1.3/ja/System.IO.xml", - "ref/netstandard1.3/ko/System.IO.xml", - "ref/netstandard1.3/ru/System.IO.xml", - "ref/netstandard1.3/zh-hans/System.IO.xml", - "ref/netstandard1.3/zh-hant/System.IO.xml", - "ref/netstandard1.5/System.IO.dll", - "ref/netstandard1.5/System.IO.xml", - "ref/netstandard1.5/de/System.IO.xml", - "ref/netstandard1.5/es/System.IO.xml", - "ref/netstandard1.5/fr/System.IO.xml", - "ref/netstandard1.5/it/System.IO.xml", - "ref/netstandard1.5/ja/System.IO.xml", - "ref/netstandard1.5/ko/System.IO.xml", - "ref/netstandard1.5/ru/System.IO.xml", - "ref/netstandard1.5/zh-hans/System.IO.xml", - "ref/netstandard1.5/zh-hant/System.IO.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.IO.Compression/4.1.0": { - "sha512": "mKlF002BhZoq3am8+ETvo+6CFdXSY1x+H48XsnIIR9JH1LWJrVHXNBE+gdrgbEVDCuJcBwxUTSXnJCQwoVY9JA==", - "type": "package", - "path": "System.IO.Compression/4.1.0", - "files": [ - "System.IO.Compression.4.1.0.nupkg.sha512", - "System.IO.Compression.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net46/System.IO.Compression.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net46/System.IO.Compression.dll", - "ref/netcore50/System.IO.Compression.dll", - "ref/netcore50/System.IO.Compression.xml", - "ref/netcore50/de/System.IO.Compression.xml", - "ref/netcore50/es/System.IO.Compression.xml", - "ref/netcore50/fr/System.IO.Compression.xml", - "ref/netcore50/it/System.IO.Compression.xml", - "ref/netcore50/ja/System.IO.Compression.xml", - "ref/netcore50/ko/System.IO.Compression.xml", - "ref/netcore50/ru/System.IO.Compression.xml", - "ref/netcore50/zh-hans/System.IO.Compression.xml", - "ref/netcore50/zh-hant/System.IO.Compression.xml", - "ref/netstandard1.1/System.IO.Compression.dll", - "ref/netstandard1.1/System.IO.Compression.xml", - "ref/netstandard1.1/de/System.IO.Compression.xml", - "ref/netstandard1.1/es/System.IO.Compression.xml", - "ref/netstandard1.1/fr/System.IO.Compression.xml", - "ref/netstandard1.1/it/System.IO.Compression.xml", - "ref/netstandard1.1/ja/System.IO.Compression.xml", - "ref/netstandard1.1/ko/System.IO.Compression.xml", - "ref/netstandard1.1/ru/System.IO.Compression.xml", - "ref/netstandard1.1/zh-hans/System.IO.Compression.xml", - "ref/netstandard1.1/zh-hant/System.IO.Compression.xml", - "ref/netstandard1.3/System.IO.Compression.dll", - "ref/netstandard1.3/System.IO.Compression.xml", - "ref/netstandard1.3/de/System.IO.Compression.xml", - "ref/netstandard1.3/es/System.IO.Compression.xml", - "ref/netstandard1.3/fr/System.IO.Compression.xml", - "ref/netstandard1.3/it/System.IO.Compression.xml", - "ref/netstandard1.3/ja/System.IO.Compression.xml", - "ref/netstandard1.3/ko/System.IO.Compression.xml", - "ref/netstandard1.3/ru/System.IO.Compression.xml", - "ref/netstandard1.3/zh-hans/System.IO.Compression.xml", - "ref/netstandard1.3/zh-hant/System.IO.Compression.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll", - "runtimes/win/lib/net46/System.IO.Compression.dll", - "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll" - ] - }, - "System.IO.Compression.ZipFile/4.0.1": { - "sha512": "Pt2BT4T1e1u+WUrxh8qUW8eqNM7rfkjxg4IeVLvD+EiDr9jcgMv1XgxxVvG1XkkHUHzS20M3BCJgul/WlKQeDw==", - "type": "package", - "path": "System.IO.Compression.ZipFile/4.0.1", - "files": [ - "System.IO.Compression.ZipFile.4.0.1.nupkg.sha512", - "System.IO.Compression.ZipFile.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.IO.Compression.ZipFile.dll", - "lib/netstandard1.3/System.IO.Compression.ZipFile.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.IO.Compression.ZipFile.dll", - "ref/netstandard1.3/System.IO.Compression.ZipFile.dll", - "ref/netstandard1.3/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/de/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/es/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/fr/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/it/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/ja/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/ko/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/ru/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/zh-hans/System.IO.Compression.ZipFile.xml", - "ref/netstandard1.3/zh-hant/System.IO.Compression.ZipFile.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.IO.FileSystem/4.0.1": { - "sha512": "hWOEqQgS7o365aYBdX1jmFtlviNM4pa40J2iF3AhhK6Ejiv65OiYxchiqDNzVRf74qMjmB4pzmyS3BhzBzsRxA==", - "type": "package", - "path": "System.IO.FileSystem/4.0.1", - "files": [ - "System.IO.FileSystem.4.0.1.nupkg.sha512", - "System.IO.FileSystem.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.IO.FileSystem.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.IO.FileSystem.dll", - "ref/netstandard1.3/System.IO.FileSystem.dll", - "ref/netstandard1.3/System.IO.FileSystem.xml", - "ref/netstandard1.3/de/System.IO.FileSystem.xml", - "ref/netstandard1.3/es/System.IO.FileSystem.xml", - "ref/netstandard1.3/fr/System.IO.FileSystem.xml", - "ref/netstandard1.3/it/System.IO.FileSystem.xml", - "ref/netstandard1.3/ja/System.IO.FileSystem.xml", - "ref/netstandard1.3/ko/System.IO.FileSystem.xml", - "ref/netstandard1.3/ru/System.IO.FileSystem.xml", - "ref/netstandard1.3/zh-hans/System.IO.FileSystem.xml", - "ref/netstandard1.3/zh-hant/System.IO.FileSystem.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.IO.FileSystem.Primitives/4.0.1": { - "sha512": "Btv+9SpIUSugh/AjSnU7HLvmkhAyLermMR0z1ylJY8S2qOnTHnIbCBg7lDnaGfAf5BV8isr9VdY1xA4DQ/T34g==", - "type": "package", - "path": "System.IO.FileSystem.Primitives/4.0.1", - "files": [ - "System.IO.FileSystem.Primitives.4.0.1.nupkg.sha512", - "System.IO.FileSystem.Primitives.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.IO.FileSystem.Primitives.dll", - "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.IO.FileSystem.Primitives.dll", - "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll", - "ref/netstandard1.3/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/de/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/es/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/fr/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/it/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/ja/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/ko/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/ru/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/zh-hans/System.IO.FileSystem.Primitives.xml", - "ref/netstandard1.3/zh-hant/System.IO.FileSystem.Primitives.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Linq/4.1.0": { - "sha512": "rq0EWQ5ZBqECsUovstOkYXZTfE9WqolLmoohImCCjYahxy45DNEJMPa2KNb9citrzZ1I/u16XLlU/IlJcUIkRQ==", - "type": "package", - "path": "System.Linq/4.1.0", - "files": [ - "System.Linq.4.1.0.nupkg.sha512", - "System.Linq.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net463/System.Linq.dll", - "lib/netcore50/System.Linq.dll", - "lib/netstandard1.6/System.Linq.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net463/System.Linq.dll", - "ref/netcore50/System.Linq.dll", - "ref/netcore50/System.Linq.xml", - "ref/netcore50/de/System.Linq.xml", - "ref/netcore50/es/System.Linq.xml", - "ref/netcore50/fr/System.Linq.xml", - "ref/netcore50/it/System.Linq.xml", - "ref/netcore50/ja/System.Linq.xml", - "ref/netcore50/ko/System.Linq.xml", - "ref/netcore50/ru/System.Linq.xml", - "ref/netcore50/zh-hans/System.Linq.xml", - "ref/netcore50/zh-hant/System.Linq.xml", - "ref/netstandard1.0/System.Linq.dll", - "ref/netstandard1.0/System.Linq.xml", - "ref/netstandard1.0/de/System.Linq.xml", - "ref/netstandard1.0/es/System.Linq.xml", - "ref/netstandard1.0/fr/System.Linq.xml", - "ref/netstandard1.0/it/System.Linq.xml", - "ref/netstandard1.0/ja/System.Linq.xml", - "ref/netstandard1.0/ko/System.Linq.xml", - "ref/netstandard1.0/ru/System.Linq.xml", - "ref/netstandard1.0/zh-hans/System.Linq.xml", - "ref/netstandard1.0/zh-hant/System.Linq.xml", - "ref/netstandard1.6/System.Linq.dll", - "ref/netstandard1.6/System.Linq.xml", - "ref/netstandard1.6/de/System.Linq.xml", - "ref/netstandard1.6/es/System.Linq.xml", - "ref/netstandard1.6/fr/System.Linq.xml", - "ref/netstandard1.6/it/System.Linq.xml", - "ref/netstandard1.6/ja/System.Linq.xml", - "ref/netstandard1.6/ko/System.Linq.xml", - "ref/netstandard1.6/ru/System.Linq.xml", - "ref/netstandard1.6/zh-hans/System.Linq.xml", - "ref/netstandard1.6/zh-hant/System.Linq.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Linq.Expressions/4.1.0": { - "sha512": "iu3b7MdQf7sxMs2bxEavbMHEswAt/hmX/fB2dGCfys/49JkFDypyt50Z1kibJHs+saRG0cZQospDQaX/mVCrIw==", - "type": "package", - "path": "System.Linq.Expressions/4.1.0", - "files": [ - "System.Linq.Expressions.4.1.0.nupkg.sha512", - "System.Linq.Expressions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net463/System.Linq.Expressions.dll", - "lib/netcore50/System.Linq.Expressions.dll", - "lib/netstandard1.6/System.Linq.Expressions.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net463/System.Linq.Expressions.dll", - "ref/netcore50/System.Linq.Expressions.dll", - "ref/netcore50/System.Linq.Expressions.xml", - "ref/netcore50/de/System.Linq.Expressions.xml", - "ref/netcore50/es/System.Linq.Expressions.xml", - "ref/netcore50/fr/System.Linq.Expressions.xml", - "ref/netcore50/it/System.Linq.Expressions.xml", - "ref/netcore50/ja/System.Linq.Expressions.xml", - "ref/netcore50/ko/System.Linq.Expressions.xml", - "ref/netcore50/ru/System.Linq.Expressions.xml", - "ref/netcore50/zh-hans/System.Linq.Expressions.xml", - "ref/netcore50/zh-hant/System.Linq.Expressions.xml", - "ref/netstandard1.0/System.Linq.Expressions.dll", - "ref/netstandard1.0/System.Linq.Expressions.xml", - "ref/netstandard1.0/de/System.Linq.Expressions.xml", - "ref/netstandard1.0/es/System.Linq.Expressions.xml", - "ref/netstandard1.0/fr/System.Linq.Expressions.xml", - "ref/netstandard1.0/it/System.Linq.Expressions.xml", - "ref/netstandard1.0/ja/System.Linq.Expressions.xml", - "ref/netstandard1.0/ko/System.Linq.Expressions.xml", - "ref/netstandard1.0/ru/System.Linq.Expressions.xml", - "ref/netstandard1.0/zh-hans/System.Linq.Expressions.xml", - "ref/netstandard1.0/zh-hant/System.Linq.Expressions.xml", - "ref/netstandard1.3/System.Linq.Expressions.dll", - "ref/netstandard1.3/System.Linq.Expressions.xml", - "ref/netstandard1.3/de/System.Linq.Expressions.xml", - "ref/netstandard1.3/es/System.Linq.Expressions.xml", - "ref/netstandard1.3/fr/System.Linq.Expressions.xml", - "ref/netstandard1.3/it/System.Linq.Expressions.xml", - "ref/netstandard1.3/ja/System.Linq.Expressions.xml", - "ref/netstandard1.3/ko/System.Linq.Expressions.xml", - "ref/netstandard1.3/ru/System.Linq.Expressions.xml", - "ref/netstandard1.3/zh-hans/System.Linq.Expressions.xml", - "ref/netstandard1.3/zh-hant/System.Linq.Expressions.xml", - "ref/netstandard1.6/System.Linq.Expressions.dll", - "ref/netstandard1.6/System.Linq.Expressions.xml", - "ref/netstandard1.6/de/System.Linq.Expressions.xml", - "ref/netstandard1.6/es/System.Linq.Expressions.xml", - "ref/netstandard1.6/fr/System.Linq.Expressions.xml", - "ref/netstandard1.6/it/System.Linq.Expressions.xml", - "ref/netstandard1.6/ja/System.Linq.Expressions.xml", - "ref/netstandard1.6/ko/System.Linq.Expressions.xml", - "ref/netstandard1.6/ru/System.Linq.Expressions.xml", - "ref/netstandard1.6/zh-hans/System.Linq.Expressions.xml", - "ref/netstandard1.6/zh-hant/System.Linq.Expressions.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/aot/lib/netcore50/System.Linq.Expressions.dll" - ] - }, - "System.Net.Http/4.1.0": { - "sha512": "wMNvi4GE97do1XQVc66AGqbkFotZlgBigP3ja48ucG/SA5wH3yHN+TCY+1p+c31blGrgkwrG9OlDkKG/C/3arg==", - "type": "package", - "path": "System.Net.Http/4.1.0", - "files": [ - "System.Net.Http.4.1.0.nupkg.sha512", - "System.Net.Http.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/Xamarinmac20/_._", - "lib/monoandroid10/_._", - "lib/monotouch10/_._", - "lib/net45/_._", - "lib/net46/System.Net.Http.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/Xamarinmac20/_._", - "ref/monoandroid10/_._", - "ref/monotouch10/_._", - "ref/net45/_._", - "ref/net46/System.Net.Http.dll", - "ref/net46/System.Net.Http.xml", - "ref/net46/de/System.Net.Http.xml", - "ref/net46/es/System.Net.Http.xml", - "ref/net46/fr/System.Net.Http.xml", - "ref/net46/it/System.Net.Http.xml", - "ref/net46/ja/System.Net.Http.xml", - "ref/net46/ko/System.Net.Http.xml", - "ref/net46/ru/System.Net.Http.xml", - "ref/net46/zh-hans/System.Net.Http.xml", - "ref/net46/zh-hant/System.Net.Http.xml", - "ref/netcore50/System.Net.Http.dll", - "ref/netcore50/System.Net.Http.xml", - "ref/netcore50/de/System.Net.Http.xml", - "ref/netcore50/es/System.Net.Http.xml", - "ref/netcore50/fr/System.Net.Http.xml", - "ref/netcore50/it/System.Net.Http.xml", - "ref/netcore50/ja/System.Net.Http.xml", - "ref/netcore50/ko/System.Net.Http.xml", - "ref/netcore50/ru/System.Net.Http.xml", - "ref/netcore50/zh-hans/System.Net.Http.xml", - "ref/netcore50/zh-hant/System.Net.Http.xml", - "ref/netstandard1.1/System.Net.Http.dll", - "ref/netstandard1.1/System.Net.Http.xml", - "ref/netstandard1.1/de/System.Net.Http.xml", - "ref/netstandard1.1/es/System.Net.Http.xml", - "ref/netstandard1.1/fr/System.Net.Http.xml", - "ref/netstandard1.1/it/System.Net.Http.xml", - "ref/netstandard1.1/ja/System.Net.Http.xml", - "ref/netstandard1.1/ko/System.Net.Http.xml", - "ref/netstandard1.1/ru/System.Net.Http.xml", - "ref/netstandard1.1/zh-hans/System.Net.Http.xml", - "ref/netstandard1.1/zh-hant/System.Net.Http.xml", - "ref/netstandard1.3/System.Net.Http.dll", - "ref/netstandard1.3/System.Net.Http.xml", - "ref/netstandard1.3/de/System.Net.Http.xml", - "ref/netstandard1.3/es/System.Net.Http.xml", - "ref/netstandard1.3/fr/System.Net.Http.xml", - "ref/netstandard1.3/it/System.Net.Http.xml", - "ref/netstandard1.3/ja/System.Net.Http.xml", - "ref/netstandard1.3/ko/System.Net.Http.xml", - "ref/netstandard1.3/ru/System.Net.Http.xml", - "ref/netstandard1.3/zh-hans/System.Net.Http.xml", - "ref/netstandard1.3/zh-hant/System.Net.Http.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/unix/lib/netstandard1.6/System.Net.Http.dll", - "runtimes/win/lib/net46/System.Net.Http.dll", - "runtimes/win/lib/netcore50/System.Net.Http.dll", - "runtimes/win/lib/netstandard1.3/System.Net.Http.dll" - ] - }, - "System.Net.Primitives/4.0.11": { - "sha512": "5Jcsej4YESroN9n6N9aBBPQdZVgVTKiXJEs8+qUfEyzkspMkhsMGnjhzOXkHtJcCU4gV7bL+NrvWG0OUaKuqQA==", - "type": "package", - "path": "System.Net.Primitives/4.0.11", - "files": [ - "System.Net.Primitives.4.0.11.nupkg.sha512", - "System.Net.Primitives.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Net.Primitives.dll", - "ref/netcore50/System.Net.Primitives.xml", - "ref/netcore50/de/System.Net.Primitives.xml", - "ref/netcore50/es/System.Net.Primitives.xml", - "ref/netcore50/fr/System.Net.Primitives.xml", - "ref/netcore50/it/System.Net.Primitives.xml", - "ref/netcore50/ja/System.Net.Primitives.xml", - "ref/netcore50/ko/System.Net.Primitives.xml", - "ref/netcore50/ru/System.Net.Primitives.xml", - "ref/netcore50/zh-hans/System.Net.Primitives.xml", - "ref/netcore50/zh-hant/System.Net.Primitives.xml", - "ref/netstandard1.0/System.Net.Primitives.dll", - "ref/netstandard1.0/System.Net.Primitives.xml", - "ref/netstandard1.0/de/System.Net.Primitives.xml", - "ref/netstandard1.0/es/System.Net.Primitives.xml", - "ref/netstandard1.0/fr/System.Net.Primitives.xml", - "ref/netstandard1.0/it/System.Net.Primitives.xml", - "ref/netstandard1.0/ja/System.Net.Primitives.xml", - "ref/netstandard1.0/ko/System.Net.Primitives.xml", - "ref/netstandard1.0/ru/System.Net.Primitives.xml", - "ref/netstandard1.0/zh-hans/System.Net.Primitives.xml", - "ref/netstandard1.0/zh-hant/System.Net.Primitives.xml", - "ref/netstandard1.1/System.Net.Primitives.dll", - "ref/netstandard1.1/System.Net.Primitives.xml", - "ref/netstandard1.1/de/System.Net.Primitives.xml", - "ref/netstandard1.1/es/System.Net.Primitives.xml", - "ref/netstandard1.1/fr/System.Net.Primitives.xml", - "ref/netstandard1.1/it/System.Net.Primitives.xml", - "ref/netstandard1.1/ja/System.Net.Primitives.xml", - "ref/netstandard1.1/ko/System.Net.Primitives.xml", - "ref/netstandard1.1/ru/System.Net.Primitives.xml", - "ref/netstandard1.1/zh-hans/System.Net.Primitives.xml", - "ref/netstandard1.1/zh-hant/System.Net.Primitives.xml", - "ref/netstandard1.3/System.Net.Primitives.dll", - "ref/netstandard1.3/System.Net.Primitives.xml", - "ref/netstandard1.3/de/System.Net.Primitives.xml", - "ref/netstandard1.3/es/System.Net.Primitives.xml", - "ref/netstandard1.3/fr/System.Net.Primitives.xml", - "ref/netstandard1.3/it/System.Net.Primitives.xml", - "ref/netstandard1.3/ja/System.Net.Primitives.xml", - "ref/netstandard1.3/ko/System.Net.Primitives.xml", - "ref/netstandard1.3/ru/System.Net.Primitives.xml", - "ref/netstandard1.3/zh-hans/System.Net.Primitives.xml", - "ref/netstandard1.3/zh-hant/System.Net.Primitives.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Net.Sockets/4.1.0": { - "sha512": "F271kv+fITuLEJwu2S3THxvWDNtyqJYJXPTs7odokdH57imZwXI/7nOLyzCgPj9/rWEdh7U6upLBlIwHaNPl0w==", - "type": "package", - "path": "System.Net.Sockets/4.1.0", - "files": [ - "System.Net.Sockets.4.1.0.nupkg.sha512", - "System.Net.Sockets.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Net.Sockets.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Net.Sockets.dll", - "ref/netstandard1.3/System.Net.Sockets.dll", - "ref/netstandard1.3/System.Net.Sockets.xml", - "ref/netstandard1.3/de/System.Net.Sockets.xml", - "ref/netstandard1.3/es/System.Net.Sockets.xml", - "ref/netstandard1.3/fr/System.Net.Sockets.xml", - "ref/netstandard1.3/it/System.Net.Sockets.xml", - "ref/netstandard1.3/ja/System.Net.Sockets.xml", - "ref/netstandard1.3/ko/System.Net.Sockets.xml", - "ref/netstandard1.3/ru/System.Net.Sockets.xml", - "ref/netstandard1.3/zh-hans/System.Net.Sockets.xml", - "ref/netstandard1.3/zh-hant/System.Net.Sockets.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.ObjectModel/4.0.12": { - "sha512": "n1UH+5IP0/L/3/y46Wct3lb9mQBAjHmf8DB0dWb4PH1gofcXbAk43Fygii+FcA/WgHrPdi0HIhqYLF9kG3PWQw==", - "type": "package", - "path": "System.ObjectModel/4.0.12", - "files": [ - "System.ObjectModel.4.0.12.nupkg.sha512", - "System.ObjectModel.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.ObjectModel.dll", - "lib/netstandard1.3/System.ObjectModel.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.ObjectModel.dll", - "ref/netcore50/System.ObjectModel.xml", - "ref/netcore50/de/System.ObjectModel.xml", - "ref/netcore50/es/System.ObjectModel.xml", - "ref/netcore50/fr/System.ObjectModel.xml", - "ref/netcore50/it/System.ObjectModel.xml", - "ref/netcore50/ja/System.ObjectModel.xml", - "ref/netcore50/ko/System.ObjectModel.xml", - "ref/netcore50/ru/System.ObjectModel.xml", - "ref/netcore50/zh-hans/System.ObjectModel.xml", - "ref/netcore50/zh-hant/System.ObjectModel.xml", - "ref/netstandard1.0/System.ObjectModel.dll", - "ref/netstandard1.0/System.ObjectModel.xml", - "ref/netstandard1.0/de/System.ObjectModel.xml", - "ref/netstandard1.0/es/System.ObjectModel.xml", - "ref/netstandard1.0/fr/System.ObjectModel.xml", - "ref/netstandard1.0/it/System.ObjectModel.xml", - "ref/netstandard1.0/ja/System.ObjectModel.xml", - "ref/netstandard1.0/ko/System.ObjectModel.xml", - "ref/netstandard1.0/ru/System.ObjectModel.xml", - "ref/netstandard1.0/zh-hans/System.ObjectModel.xml", - "ref/netstandard1.0/zh-hant/System.ObjectModel.xml", - "ref/netstandard1.3/System.ObjectModel.dll", - "ref/netstandard1.3/System.ObjectModel.xml", - "ref/netstandard1.3/de/System.ObjectModel.xml", - "ref/netstandard1.3/es/System.ObjectModel.xml", - "ref/netstandard1.3/fr/System.ObjectModel.xml", - "ref/netstandard1.3/it/System.ObjectModel.xml", - "ref/netstandard1.3/ja/System.ObjectModel.xml", - "ref/netstandard1.3/ko/System.ObjectModel.xml", - "ref/netstandard1.3/ru/System.ObjectModel.xml", - "ref/netstandard1.3/zh-hans/System.ObjectModel.xml", - "ref/netstandard1.3/zh-hant/System.ObjectModel.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Reflection/4.1.0": { - "sha512": "acBbxohOI45FiZ3EjQuGnPs5zWzzbxFyW81zh/o6LWtCdA8XApsZR37VTqwpTMpDInVlhziswd6ut5vdo5G3uA==", - "type": "package", - "path": "System.Reflection/4.1.0", - "files": [ - "System.Reflection.4.1.0.nupkg.sha512", - "System.Reflection.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.Reflection.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.Reflection.dll", - "ref/netcore50/System.Reflection.dll", - "ref/netcore50/System.Reflection.xml", - "ref/netcore50/de/System.Reflection.xml", - "ref/netcore50/es/System.Reflection.xml", - "ref/netcore50/fr/System.Reflection.xml", - "ref/netcore50/it/System.Reflection.xml", - "ref/netcore50/ja/System.Reflection.xml", - "ref/netcore50/ko/System.Reflection.xml", - "ref/netcore50/ru/System.Reflection.xml", - "ref/netcore50/zh-hans/System.Reflection.xml", - "ref/netcore50/zh-hant/System.Reflection.xml", - "ref/netstandard1.0/System.Reflection.dll", - "ref/netstandard1.0/System.Reflection.xml", - "ref/netstandard1.0/de/System.Reflection.xml", - "ref/netstandard1.0/es/System.Reflection.xml", - "ref/netstandard1.0/fr/System.Reflection.xml", - "ref/netstandard1.0/it/System.Reflection.xml", - "ref/netstandard1.0/ja/System.Reflection.xml", - "ref/netstandard1.0/ko/System.Reflection.xml", - "ref/netstandard1.0/ru/System.Reflection.xml", - "ref/netstandard1.0/zh-hans/System.Reflection.xml", - "ref/netstandard1.0/zh-hant/System.Reflection.xml", - "ref/netstandard1.3/System.Reflection.dll", - "ref/netstandard1.3/System.Reflection.xml", - "ref/netstandard1.3/de/System.Reflection.xml", - "ref/netstandard1.3/es/System.Reflection.xml", - "ref/netstandard1.3/fr/System.Reflection.xml", - "ref/netstandard1.3/it/System.Reflection.xml", - "ref/netstandard1.3/ja/System.Reflection.xml", - "ref/netstandard1.3/ko/System.Reflection.xml", - "ref/netstandard1.3/ru/System.Reflection.xml", - "ref/netstandard1.3/zh-hans/System.Reflection.xml", - "ref/netstandard1.3/zh-hant/System.Reflection.xml", - "ref/netstandard1.5/System.Reflection.dll", - "ref/netstandard1.5/System.Reflection.xml", - "ref/netstandard1.5/de/System.Reflection.xml", - "ref/netstandard1.5/es/System.Reflection.xml", - "ref/netstandard1.5/fr/System.Reflection.xml", - "ref/netstandard1.5/it/System.Reflection.xml", - "ref/netstandard1.5/ja/System.Reflection.xml", - "ref/netstandard1.5/ko/System.Reflection.xml", - "ref/netstandard1.5/ru/System.Reflection.xml", - "ref/netstandard1.5/zh-hans/System.Reflection.xml", - "ref/netstandard1.5/zh-hant/System.Reflection.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Reflection.Extensions/4.0.1": { - "sha512": "cermPUL6uL4XrW/O/2a5RRJ0yjRYL0JkcHLYr/kawTv06VILEtUc1K2/s87tgl1pAzHICOTjUCGfnT8Fp9fD/Q==", - "type": "package", - "path": "System.Reflection.Extensions/4.0.1", - "files": [ - "System.Reflection.Extensions.4.0.1.nupkg.sha512", - "System.Reflection.Extensions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Reflection.Extensions.dll", - "ref/netcore50/System.Reflection.Extensions.xml", - "ref/netcore50/de/System.Reflection.Extensions.xml", - "ref/netcore50/es/System.Reflection.Extensions.xml", - "ref/netcore50/fr/System.Reflection.Extensions.xml", - "ref/netcore50/it/System.Reflection.Extensions.xml", - "ref/netcore50/ja/System.Reflection.Extensions.xml", - "ref/netcore50/ko/System.Reflection.Extensions.xml", - "ref/netcore50/ru/System.Reflection.Extensions.xml", - "ref/netcore50/zh-hans/System.Reflection.Extensions.xml", - "ref/netcore50/zh-hant/System.Reflection.Extensions.xml", - "ref/netstandard1.0/System.Reflection.Extensions.dll", - "ref/netstandard1.0/System.Reflection.Extensions.xml", - "ref/netstandard1.0/de/System.Reflection.Extensions.xml", - "ref/netstandard1.0/es/System.Reflection.Extensions.xml", - "ref/netstandard1.0/fr/System.Reflection.Extensions.xml", - "ref/netstandard1.0/it/System.Reflection.Extensions.xml", - "ref/netstandard1.0/ja/System.Reflection.Extensions.xml", - "ref/netstandard1.0/ko/System.Reflection.Extensions.xml", - "ref/netstandard1.0/ru/System.Reflection.Extensions.xml", - "ref/netstandard1.0/zh-hans/System.Reflection.Extensions.xml", - "ref/netstandard1.0/zh-hant/System.Reflection.Extensions.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Reflection.Primitives/4.0.1": { - "sha512": "1oJO1aPEJGfMHRqLaFEUJ+nNRdoFzoRlUW+/uH+rJLF2PCwhk8vvdOq0niBBtE0KdzJ+CQpqRkMiT5/RV97E2w==", - "type": "package", - "path": "System.Reflection.Primitives/4.0.1", - "files": [ - "System.Reflection.Primitives.4.0.1.nupkg.sha512", - "System.Reflection.Primitives.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Reflection.Primitives.dll", - "ref/netcore50/System.Reflection.Primitives.xml", - "ref/netcore50/de/System.Reflection.Primitives.xml", - "ref/netcore50/es/System.Reflection.Primitives.xml", - "ref/netcore50/fr/System.Reflection.Primitives.xml", - "ref/netcore50/it/System.Reflection.Primitives.xml", - "ref/netcore50/ja/System.Reflection.Primitives.xml", - "ref/netcore50/ko/System.Reflection.Primitives.xml", - "ref/netcore50/ru/System.Reflection.Primitives.xml", - "ref/netcore50/zh-hans/System.Reflection.Primitives.xml", - "ref/netcore50/zh-hant/System.Reflection.Primitives.xml", - "ref/netstandard1.0/System.Reflection.Primitives.dll", - "ref/netstandard1.0/System.Reflection.Primitives.xml", - "ref/netstandard1.0/de/System.Reflection.Primitives.xml", - "ref/netstandard1.0/es/System.Reflection.Primitives.xml", - "ref/netstandard1.0/fr/System.Reflection.Primitives.xml", - "ref/netstandard1.0/it/System.Reflection.Primitives.xml", - "ref/netstandard1.0/ja/System.Reflection.Primitives.xml", - "ref/netstandard1.0/ko/System.Reflection.Primitives.xml", - "ref/netstandard1.0/ru/System.Reflection.Primitives.xml", - "ref/netstandard1.0/zh-hans/System.Reflection.Primitives.xml", - "ref/netstandard1.0/zh-hant/System.Reflection.Primitives.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Resources.ResourceManager/4.0.1": { - "sha512": "xaX84sk4PU28JcNiQpdBoYaigtBaClqz7QsrG1LckwhFeMT02iz6Z3mn0mHTZyB4dVyfvRoSlc9N10IB1oK+Kw==", - "type": "package", - "path": "System.Resources.ResourceManager/4.0.1", - "files": [ - "System.Resources.ResourceManager.4.0.1.nupkg.sha512", - "System.Resources.ResourceManager.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Resources.ResourceManager.dll", - "ref/netcore50/System.Resources.ResourceManager.xml", - "ref/netcore50/de/System.Resources.ResourceManager.xml", - "ref/netcore50/es/System.Resources.ResourceManager.xml", - "ref/netcore50/fr/System.Resources.ResourceManager.xml", - "ref/netcore50/it/System.Resources.ResourceManager.xml", - "ref/netcore50/ja/System.Resources.ResourceManager.xml", - "ref/netcore50/ko/System.Resources.ResourceManager.xml", - "ref/netcore50/ru/System.Resources.ResourceManager.xml", - "ref/netcore50/zh-hans/System.Resources.ResourceManager.xml", - "ref/netcore50/zh-hant/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/System.Resources.ResourceManager.dll", - "ref/netstandard1.0/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/de/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/es/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/fr/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/it/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/ja/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/ko/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/ru/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/zh-hans/System.Resources.ResourceManager.xml", - "ref/netstandard1.0/zh-hant/System.Resources.ResourceManager.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Runtime/4.1.0": { - "sha512": "1Ud4LqihmAwWwnrhy81NGHNd2Fnud09cbACJdEivcp87GSseJxlPV8CY0pyT5vP3a2zhgWJ0rSZozC7IcRiZ9A==", - "type": "package", - "path": "System.Runtime/4.1.0", - "files": [ - "System.Runtime.4.1.0.nupkg.sha512", - "System.Runtime.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.Runtime.dll", - "lib/portable-net45+win8+wp80+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.Runtime.dll", - "ref/netcore50/System.Runtime.dll", - "ref/netcore50/System.Runtime.xml", - "ref/netcore50/de/System.Runtime.xml", - "ref/netcore50/es/System.Runtime.xml", - "ref/netcore50/fr/System.Runtime.xml", - "ref/netcore50/it/System.Runtime.xml", - "ref/netcore50/ja/System.Runtime.xml", - "ref/netcore50/ko/System.Runtime.xml", - "ref/netcore50/ru/System.Runtime.xml", - "ref/netcore50/zh-hans/System.Runtime.xml", - "ref/netcore50/zh-hant/System.Runtime.xml", - "ref/netstandard1.0/System.Runtime.dll", - "ref/netstandard1.0/System.Runtime.xml", - "ref/netstandard1.0/de/System.Runtime.xml", - "ref/netstandard1.0/es/System.Runtime.xml", - "ref/netstandard1.0/fr/System.Runtime.xml", - "ref/netstandard1.0/it/System.Runtime.xml", - "ref/netstandard1.0/ja/System.Runtime.xml", - "ref/netstandard1.0/ko/System.Runtime.xml", - "ref/netstandard1.0/ru/System.Runtime.xml", - "ref/netstandard1.0/zh-hans/System.Runtime.xml", - "ref/netstandard1.0/zh-hant/System.Runtime.xml", - "ref/netstandard1.2/System.Runtime.dll", - "ref/netstandard1.2/System.Runtime.xml", - "ref/netstandard1.2/de/System.Runtime.xml", - "ref/netstandard1.2/es/System.Runtime.xml", - "ref/netstandard1.2/fr/System.Runtime.xml", - "ref/netstandard1.2/it/System.Runtime.xml", - "ref/netstandard1.2/ja/System.Runtime.xml", - "ref/netstandard1.2/ko/System.Runtime.xml", - "ref/netstandard1.2/ru/System.Runtime.xml", - "ref/netstandard1.2/zh-hans/System.Runtime.xml", - "ref/netstandard1.2/zh-hant/System.Runtime.xml", - "ref/netstandard1.3/System.Runtime.dll", - "ref/netstandard1.3/System.Runtime.xml", - "ref/netstandard1.3/de/System.Runtime.xml", - "ref/netstandard1.3/es/System.Runtime.xml", - "ref/netstandard1.3/fr/System.Runtime.xml", - "ref/netstandard1.3/it/System.Runtime.xml", - "ref/netstandard1.3/ja/System.Runtime.xml", - "ref/netstandard1.3/ko/System.Runtime.xml", - "ref/netstandard1.3/ru/System.Runtime.xml", - "ref/netstandard1.3/zh-hans/System.Runtime.xml", - "ref/netstandard1.3/zh-hant/System.Runtime.xml", - "ref/netstandard1.5/System.Runtime.dll", - "ref/netstandard1.5/System.Runtime.xml", - "ref/netstandard1.5/de/System.Runtime.xml", - "ref/netstandard1.5/es/System.Runtime.xml", - "ref/netstandard1.5/fr/System.Runtime.xml", - "ref/netstandard1.5/it/System.Runtime.xml", - "ref/netstandard1.5/ja/System.Runtime.xml", - "ref/netstandard1.5/ko/System.Runtime.xml", - "ref/netstandard1.5/ru/System.Runtime.xml", - "ref/netstandard1.5/zh-hans/System.Runtime.xml", - "ref/netstandard1.5/zh-hant/System.Runtime.xml", - "ref/portable-net45+win8+wp80+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Runtime.Extensions/4.1.0": { - "sha512": "VynET2OiDi8z7yQbZr91IzN14YmbslCV9o4bl546Q+eMnBZ1RsUSIEkX37ZGPIJk4DTc8XLdNc+zEOAa97nTZQ==", - "type": "package", - "path": "System.Runtime.Extensions/4.1.0", - "files": [ - "System.Runtime.Extensions.4.1.0.nupkg.sha512", - "System.Runtime.Extensions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.Runtime.Extensions.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.Runtime.Extensions.dll", - "ref/netcore50/System.Runtime.Extensions.dll", - "ref/netcore50/System.Runtime.Extensions.xml", - "ref/netcore50/de/System.Runtime.Extensions.xml", - "ref/netcore50/es/System.Runtime.Extensions.xml", - "ref/netcore50/fr/System.Runtime.Extensions.xml", - "ref/netcore50/it/System.Runtime.Extensions.xml", - "ref/netcore50/ja/System.Runtime.Extensions.xml", - "ref/netcore50/ko/System.Runtime.Extensions.xml", - "ref/netcore50/ru/System.Runtime.Extensions.xml", - "ref/netcore50/zh-hans/System.Runtime.Extensions.xml", - "ref/netcore50/zh-hant/System.Runtime.Extensions.xml", - "ref/netstandard1.0/System.Runtime.Extensions.dll", - "ref/netstandard1.0/System.Runtime.Extensions.xml", - "ref/netstandard1.0/de/System.Runtime.Extensions.xml", - "ref/netstandard1.0/es/System.Runtime.Extensions.xml", - "ref/netstandard1.0/fr/System.Runtime.Extensions.xml", - "ref/netstandard1.0/it/System.Runtime.Extensions.xml", - "ref/netstandard1.0/ja/System.Runtime.Extensions.xml", - "ref/netstandard1.0/ko/System.Runtime.Extensions.xml", - "ref/netstandard1.0/ru/System.Runtime.Extensions.xml", - "ref/netstandard1.0/zh-hans/System.Runtime.Extensions.xml", - "ref/netstandard1.0/zh-hant/System.Runtime.Extensions.xml", - "ref/netstandard1.3/System.Runtime.Extensions.dll", - "ref/netstandard1.3/System.Runtime.Extensions.xml", - "ref/netstandard1.3/de/System.Runtime.Extensions.xml", - "ref/netstandard1.3/es/System.Runtime.Extensions.xml", - "ref/netstandard1.3/fr/System.Runtime.Extensions.xml", - "ref/netstandard1.3/it/System.Runtime.Extensions.xml", - "ref/netstandard1.3/ja/System.Runtime.Extensions.xml", - "ref/netstandard1.3/ko/System.Runtime.Extensions.xml", - "ref/netstandard1.3/ru/System.Runtime.Extensions.xml", - "ref/netstandard1.3/zh-hans/System.Runtime.Extensions.xml", - "ref/netstandard1.3/zh-hant/System.Runtime.Extensions.xml", - "ref/netstandard1.5/System.Runtime.Extensions.dll", - "ref/netstandard1.5/System.Runtime.Extensions.xml", - "ref/netstandard1.5/de/System.Runtime.Extensions.xml", - "ref/netstandard1.5/es/System.Runtime.Extensions.xml", - "ref/netstandard1.5/fr/System.Runtime.Extensions.xml", - "ref/netstandard1.5/it/System.Runtime.Extensions.xml", - "ref/netstandard1.5/ja/System.Runtime.Extensions.xml", - "ref/netstandard1.5/ko/System.Runtime.Extensions.xml", - "ref/netstandard1.5/ru/System.Runtime.Extensions.xml", - "ref/netstandard1.5/zh-hans/System.Runtime.Extensions.xml", - "ref/netstandard1.5/zh-hant/System.Runtime.Extensions.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Runtime.Handles/4.0.1": { - "sha512": "G08fRt9L/fqSc0aBAngQEhvKro1+JZ7TguKLaEgnFMH0daTLYlV2izB30XK3o5w40FQ+ugwX6WPTYdd49MGo3w==", - "type": "package", - "path": "System.Runtime.Handles/4.0.1", - "files": [ - "System.Runtime.Handles.4.0.1.nupkg.sha512", - "System.Runtime.Handles.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/_._", - "ref/netstandard1.3/System.Runtime.Handles.dll", - "ref/netstandard1.3/System.Runtime.Handles.xml", - "ref/netstandard1.3/de/System.Runtime.Handles.xml", - "ref/netstandard1.3/es/System.Runtime.Handles.xml", - "ref/netstandard1.3/fr/System.Runtime.Handles.xml", - "ref/netstandard1.3/it/System.Runtime.Handles.xml", - "ref/netstandard1.3/ja/System.Runtime.Handles.xml", - "ref/netstandard1.3/ko/System.Runtime.Handles.xml", - "ref/netstandard1.3/ru/System.Runtime.Handles.xml", - "ref/netstandard1.3/zh-hans/System.Runtime.Handles.xml", - "ref/netstandard1.3/zh-hant/System.Runtime.Handles.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Runtime.InteropServices/4.1.0": { - "sha512": "heyxg7dQryQ05Jtgo/aEolgrC+Lfp/qoDZO3uQZ/Qho/hlo+ebAE2u4ZosFVQYFDbayyKg+pyW8nzmAaYwoQng==", - "type": "package", - "path": "System.Runtime.InteropServices/4.1.0", - "files": [ - "System.Runtime.InteropServices.4.1.0.nupkg.sha512", - "System.Runtime.InteropServices.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net462/System.Runtime.InteropServices.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net462/System.Runtime.InteropServices.dll", - "ref/netcore50/System.Runtime.InteropServices.dll", - "ref/netcore50/System.Runtime.InteropServices.xml", - "ref/netcore50/de/System.Runtime.InteropServices.xml", - "ref/netcore50/es/System.Runtime.InteropServices.xml", - "ref/netcore50/fr/System.Runtime.InteropServices.xml", - "ref/netcore50/it/System.Runtime.InteropServices.xml", - "ref/netcore50/ja/System.Runtime.InteropServices.xml", - "ref/netcore50/ko/System.Runtime.InteropServices.xml", - "ref/netcore50/ru/System.Runtime.InteropServices.xml", - "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml", - "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/System.Runtime.InteropServices.dll", - "ref/netstandard1.1/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/de/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/es/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/fr/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/it/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/ja/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/ko/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/ru/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/zh-hans/System.Runtime.InteropServices.xml", - "ref/netstandard1.1/zh-hant/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/System.Runtime.InteropServices.dll", - "ref/netstandard1.2/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/de/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/es/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/fr/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/it/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/ja/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/ko/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/ru/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/zh-hans/System.Runtime.InteropServices.xml", - "ref/netstandard1.2/zh-hant/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/System.Runtime.InteropServices.dll", - "ref/netstandard1.3/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/de/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/es/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/fr/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/it/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/ja/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/ko/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/ru/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/zh-hans/System.Runtime.InteropServices.xml", - "ref/netstandard1.3/zh-hant/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/System.Runtime.InteropServices.dll", - "ref/netstandard1.5/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/de/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/es/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/fr/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/it/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/ja/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/ko/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/ru/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/zh-hans/System.Runtime.InteropServices.xml", - "ref/netstandard1.5/zh-hant/System.Runtime.InteropServices.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { - "sha512": "J/Sg8T0e7j90FSe/LmVbpaHTlg58t1OFAo5d4FLxAaGJNue9XYJIjd++W4p34+IC2W3LKQe4RlzT1caqybWJxg==", - "type": "package", - "path": "System.Runtime.InteropServices.RuntimeInformation/4.0.0", - "files": [ - "System.Runtime.InteropServices.RuntimeInformation.4.0.0.nupkg.sha512", - "System.Runtime.InteropServices.RuntimeInformation.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", - "lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll", - "lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", - "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", - "runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", - "runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", - "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll" - ] - }, - "System.Runtime.Numerics/4.0.1": { - "sha512": "rU4bwtRdNv+diYtUL+cJE1b56M4A5/EahCjbDUnKIzcPPtqDh6mpESkvzrcqo3ZFEcREeHf+dBEekws3qu7QIA==", - "type": "package", - "path": "System.Runtime.Numerics/4.0.1", - "files": [ - "System.Runtime.Numerics.4.0.1.nupkg.sha512", - "System.Runtime.Numerics.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.Runtime.Numerics.dll", - "lib/netstandard1.3/System.Runtime.Numerics.dll", - "lib/portable-net45+win8+wpa81/_._", - "lib/win8/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Runtime.Numerics.dll", - "ref/netcore50/System.Runtime.Numerics.xml", - "ref/netcore50/de/System.Runtime.Numerics.xml", - "ref/netcore50/es/System.Runtime.Numerics.xml", - "ref/netcore50/fr/System.Runtime.Numerics.xml", - "ref/netcore50/it/System.Runtime.Numerics.xml", - "ref/netcore50/ja/System.Runtime.Numerics.xml", - "ref/netcore50/ko/System.Runtime.Numerics.xml", - "ref/netcore50/ru/System.Runtime.Numerics.xml", - "ref/netcore50/zh-hans/System.Runtime.Numerics.xml", - "ref/netcore50/zh-hant/System.Runtime.Numerics.xml", - "ref/netstandard1.1/System.Runtime.Numerics.dll", - "ref/netstandard1.1/System.Runtime.Numerics.xml", - "ref/netstandard1.1/de/System.Runtime.Numerics.xml", - "ref/netstandard1.1/es/System.Runtime.Numerics.xml", - "ref/netstandard1.1/fr/System.Runtime.Numerics.xml", - "ref/netstandard1.1/it/System.Runtime.Numerics.xml", - "ref/netstandard1.1/ja/System.Runtime.Numerics.xml", - "ref/netstandard1.1/ko/System.Runtime.Numerics.xml", - "ref/netstandard1.1/ru/System.Runtime.Numerics.xml", - "ref/netstandard1.1/zh-hans/System.Runtime.Numerics.xml", - "ref/netstandard1.1/zh-hant/System.Runtime.Numerics.xml", - "ref/portable-net45+win8+wpa81/_._", - "ref/win8/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Security.Cryptography.Algorithms/4.2.0": { - "sha512": "Q+9If3ar0UU82zKWgV/MK2z8kjQC6cyhnzmc1nQUqrb18rglA901NMX0WgOwEL1zyV5pc+q65/MwAK3inj/Dkg==", - "type": "package", - "path": "System.Security.Cryptography.Algorithms/4.2.0", - "files": [ - "System.Security.Cryptography.Algorithms.4.2.0.nupkg.sha512", - "System.Security.Cryptography.Algorithms.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Security.Cryptography.Algorithms.dll", - "lib/net461/System.Security.Cryptography.Algorithms.dll", - "lib/net463/System.Security.Cryptography.Algorithms.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Security.Cryptography.Algorithms.dll", - "ref/net461/System.Security.Cryptography.Algorithms.dll", - "ref/net463/System.Security.Cryptography.Algorithms.dll", - "ref/netstandard1.3/System.Security.Cryptography.Algorithms.dll", - "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll", - "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll", - "runtimes/win/lib/net46/System.Security.Cryptography.Algorithms.dll", - "runtimes/win/lib/net461/System.Security.Cryptography.Algorithms.dll", - "runtimes/win/lib/net463/System.Security.Cryptography.Algorithms.dll", - "runtimes/win/lib/netcore50/System.Security.Cryptography.Algorithms.dll", - "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll" - ] - }, - "System.Security.Cryptography.Encoding/4.0.0": { - "sha512": "YmX4E9nZpzApDgvucMQFnNJN67KW2f9/Z8kpAeZ96MVhnyyv1m7yI284CWvxCgNgtSHmqo8yf69P++gagTjAnw==", - "type": "package", - "path": "System.Security.Cryptography.Encoding/4.0.0", - "files": [ - "System.Security.Cryptography.Encoding.4.0.0.nupkg.sha512", - "System.Security.Cryptography.Encoding.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Security.Cryptography.Encoding.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Security.Cryptography.Encoding.dll", - "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll", - "ref/netstandard1.3/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/de/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/es/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/fr/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/it/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/ja/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/ko/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/ru/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/zh-hans/System.Security.Cryptography.Encoding.xml", - "ref/netstandard1.3/zh-hant/System.Security.Cryptography.Encoding.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll", - "runtimes/win/lib/net46/System.Security.Cryptography.Encoding.dll", - "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll" - ] - }, - "System.Security.Cryptography.Primitives/4.0.0": { - "sha512": "jQrQyxbgA2Lq7W4V7wYOdJKT38Va2goaRk3S++gq+ASphcYnixK+0vBZX5NAYN1lo5yLeKWmX0joFZ+/NzGPyA==", - "type": "package", - "path": "System.Security.Cryptography.Primitives/4.0.0", - "files": [ - "System.Security.Cryptography.Primitives.4.0.0.nupkg.sha512", - "System.Security.Cryptography.Primitives.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Security.Cryptography.Primitives.dll", - "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Security.Cryptography.Primitives.dll", - "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Security.Cryptography.X509Certificates/4.1.0": { - "sha512": "RC039tuCfOiUGpBiUF3YQJVG0xqh81+uLffXFYffcT2jxNPEQvq/GiGn3PiKlXX6RB9ghYTS1HlB/eVSCwn+VA==", - "type": "package", - "path": "System.Security.Cryptography.X509Certificates/4.1.0", - "files": [ - "System.Security.Cryptography.X509Certificates.4.1.0.nupkg.sha512", - "System.Security.Cryptography.X509Certificates.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net46/System.Security.Cryptography.X509Certificates.dll", - "lib/net461/System.Security.Cryptography.X509Certificates.dll", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net46/System.Security.Cryptography.X509Certificates.dll", - "ref/net461/System.Security.Cryptography.X509Certificates.dll", - "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.dll", - "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/de/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/es/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/fr/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/it/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/ja/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/ko/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/ru/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/zh-hans/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.3/zh-hant/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll", - "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/de/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/es/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/fr/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/it/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/ja/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/ko/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/ru/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/zh-hans/System.Security.Cryptography.X509Certificates.xml", - "ref/netstandard1.4/zh-hant/System.Security.Cryptography.X509Certificates.xml", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll", - "runtimes/win/lib/net46/System.Security.Cryptography.X509Certificates.dll", - "runtimes/win/lib/net461/System.Security.Cryptography.X509Certificates.dll", - "runtimes/win/lib/netcore50/System.Security.Cryptography.X509Certificates.dll", - "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll" - ] - }, - "System.Text.Encoding/4.0.11": { - "sha512": "LupgFp5ZDOXfBQpchrr0F6U3wIrDlDxGM3pO0SRldjVwZ2k3X6BzpLcB3/6tBYk4KvX4GJqf7/1XC0ND4B3vyA==", - "type": "package", - "path": "System.Text.Encoding/4.0.11", - "files": [ - "System.Text.Encoding.4.0.11.nupkg.sha512", - "System.Text.Encoding.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Text.Encoding.dll", - "ref/netcore50/System.Text.Encoding.xml", - "ref/netcore50/de/System.Text.Encoding.xml", - "ref/netcore50/es/System.Text.Encoding.xml", - "ref/netcore50/fr/System.Text.Encoding.xml", - "ref/netcore50/it/System.Text.Encoding.xml", - "ref/netcore50/ja/System.Text.Encoding.xml", - "ref/netcore50/ko/System.Text.Encoding.xml", - "ref/netcore50/ru/System.Text.Encoding.xml", - "ref/netcore50/zh-hans/System.Text.Encoding.xml", - "ref/netcore50/zh-hant/System.Text.Encoding.xml", - "ref/netstandard1.0/System.Text.Encoding.dll", - "ref/netstandard1.0/System.Text.Encoding.xml", - "ref/netstandard1.0/de/System.Text.Encoding.xml", - "ref/netstandard1.0/es/System.Text.Encoding.xml", - "ref/netstandard1.0/fr/System.Text.Encoding.xml", - "ref/netstandard1.0/it/System.Text.Encoding.xml", - "ref/netstandard1.0/ja/System.Text.Encoding.xml", - "ref/netstandard1.0/ko/System.Text.Encoding.xml", - "ref/netstandard1.0/ru/System.Text.Encoding.xml", - "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml", - "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml", - "ref/netstandard1.3/System.Text.Encoding.dll", - "ref/netstandard1.3/System.Text.Encoding.xml", - "ref/netstandard1.3/de/System.Text.Encoding.xml", - "ref/netstandard1.3/es/System.Text.Encoding.xml", - "ref/netstandard1.3/fr/System.Text.Encoding.xml", - "ref/netstandard1.3/it/System.Text.Encoding.xml", - "ref/netstandard1.3/ja/System.Text.Encoding.xml", - "ref/netstandard1.3/ko/System.Text.Encoding.xml", - "ref/netstandard1.3/ru/System.Text.Encoding.xml", - "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml", - "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Text.Encoding.Extensions/4.0.11": { - "sha512": "ztH5sHQkHT+7ttdsA8GucJbw2bu9EmRpKNHa43nKo29lzOTuXj7djjqTbTcVItc9wMhISTrH2qhW0typ9dK5Rg==", - "type": "package", - "path": "System.Text.Encoding.Extensions/4.0.11", - "files": [ - "System.Text.Encoding.Extensions.4.0.11.nupkg.sha512", - "System.Text.Encoding.Extensions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Text.Encoding.Extensions.dll", - "ref/netcore50/System.Text.Encoding.Extensions.xml", - "ref/netcore50/de/System.Text.Encoding.Extensions.xml", - "ref/netcore50/es/System.Text.Encoding.Extensions.xml", - "ref/netcore50/fr/System.Text.Encoding.Extensions.xml", - "ref/netcore50/it/System.Text.Encoding.Extensions.xml", - "ref/netcore50/ja/System.Text.Encoding.Extensions.xml", - "ref/netcore50/ko/System.Text.Encoding.Extensions.xml", - "ref/netcore50/ru/System.Text.Encoding.Extensions.xml", - "ref/netcore50/zh-hans/System.Text.Encoding.Extensions.xml", - "ref/netcore50/zh-hant/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/System.Text.Encoding.Extensions.dll", - "ref/netstandard1.0/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/de/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/es/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/fr/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/it/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/ja/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/ko/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/ru/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/zh-hans/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.0/zh-hant/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/System.Text.Encoding.Extensions.dll", - "ref/netstandard1.3/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/de/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/es/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/fr/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/it/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/ja/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/ko/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/ru/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/zh-hans/System.Text.Encoding.Extensions.xml", - "ref/netstandard1.3/zh-hant/System.Text.Encoding.Extensions.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Text.RegularExpressions/4.1.0": { - "sha512": "PZQnbOOaq5rKIC0rKCIG295sub5HachKiAvKNLuEXcah+3wqj+lPlx2UPHlr3gtvUPgR+ttw65Hq+je2wKBbTQ==", - "type": "package", - "path": "System.Text.RegularExpressions/4.1.0", - "files": [ - "System.Text.RegularExpressions.4.1.0.nupkg.sha512", - "System.Text.RegularExpressions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/net463/System.Text.RegularExpressions.dll", - "lib/netcore50/System.Text.RegularExpressions.dll", - "lib/netstandard1.6/System.Text.RegularExpressions.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/net463/System.Text.RegularExpressions.dll", - "ref/netcore50/System.Text.RegularExpressions.dll", - "ref/netcore50/System.Text.RegularExpressions.xml", - "ref/netcore50/de/System.Text.RegularExpressions.xml", - "ref/netcore50/es/System.Text.RegularExpressions.xml", - "ref/netcore50/fr/System.Text.RegularExpressions.xml", - "ref/netcore50/it/System.Text.RegularExpressions.xml", - "ref/netcore50/ja/System.Text.RegularExpressions.xml", - "ref/netcore50/ko/System.Text.RegularExpressions.xml", - "ref/netcore50/ru/System.Text.RegularExpressions.xml", - "ref/netcore50/zh-hans/System.Text.RegularExpressions.xml", - "ref/netcore50/zh-hant/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/System.Text.RegularExpressions.dll", - "ref/netstandard1.0/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/de/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/es/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/fr/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/it/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/ja/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/ko/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/ru/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/zh-hans/System.Text.RegularExpressions.xml", - "ref/netstandard1.0/zh-hant/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/System.Text.RegularExpressions.dll", - "ref/netstandard1.3/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/de/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/es/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/fr/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/it/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/ja/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/ko/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/ru/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/zh-hans/System.Text.RegularExpressions.xml", - "ref/netstandard1.3/zh-hant/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/System.Text.RegularExpressions.dll", - "ref/netstandard1.6/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/de/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/es/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/fr/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/it/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/ja/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/ko/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/ru/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/zh-hans/System.Text.RegularExpressions.xml", - "ref/netstandard1.6/zh-hant/System.Text.RegularExpressions.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Threading/4.0.11": { - "sha512": "ntS2jSS6HblstY8rTvDeANFz3WOZk8KxGCvsPH6st+pdRglv+uoPQNgdO/+m7Dzy2YobEeXASSFYqwjkk69gUA==", - "type": "package", - "path": "System.Threading/4.0.11", - "files": [ - "System.Threading.4.0.11.nupkg.sha512", - "System.Threading.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.Threading.dll", - "lib/netstandard1.3/System.Threading.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Threading.dll", - "ref/netcore50/System.Threading.xml", - "ref/netcore50/de/System.Threading.xml", - "ref/netcore50/es/System.Threading.xml", - "ref/netcore50/fr/System.Threading.xml", - "ref/netcore50/it/System.Threading.xml", - "ref/netcore50/ja/System.Threading.xml", - "ref/netcore50/ko/System.Threading.xml", - "ref/netcore50/ru/System.Threading.xml", - "ref/netcore50/zh-hans/System.Threading.xml", - "ref/netcore50/zh-hant/System.Threading.xml", - "ref/netstandard1.0/System.Threading.dll", - "ref/netstandard1.0/System.Threading.xml", - "ref/netstandard1.0/de/System.Threading.xml", - "ref/netstandard1.0/es/System.Threading.xml", - "ref/netstandard1.0/fr/System.Threading.xml", - "ref/netstandard1.0/it/System.Threading.xml", - "ref/netstandard1.0/ja/System.Threading.xml", - "ref/netstandard1.0/ko/System.Threading.xml", - "ref/netstandard1.0/ru/System.Threading.xml", - "ref/netstandard1.0/zh-hans/System.Threading.xml", - "ref/netstandard1.0/zh-hant/System.Threading.xml", - "ref/netstandard1.3/System.Threading.dll", - "ref/netstandard1.3/System.Threading.xml", - "ref/netstandard1.3/de/System.Threading.xml", - "ref/netstandard1.3/es/System.Threading.xml", - "ref/netstandard1.3/fr/System.Threading.xml", - "ref/netstandard1.3/it/System.Threading.xml", - "ref/netstandard1.3/ja/System.Threading.xml", - "ref/netstandard1.3/ko/System.Threading.xml", - "ref/netstandard1.3/ru/System.Threading.xml", - "ref/netstandard1.3/zh-hans/System.Threading.xml", - "ref/netstandard1.3/zh-hant/System.Threading.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._", - "runtimes/aot/lib/netcore50/System.Threading.dll" - ] - }, - "System.Threading.Tasks/4.0.11": { - "sha512": "fYfVT9v71GR40tJ0iv+QXOslOfJckOFj0AmXEYCONoJvIez4wZpR5NZYEhN3kvzuzs0j8MsYUMvB3X+N+jlkvw==", - "type": "package", - "path": "System.Threading.Tasks/4.0.11", - "files": [ - "System.Threading.Tasks.4.0.11.nupkg.sha512", - "System.Threading.Tasks.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Threading.Tasks.dll", - "ref/netcore50/System.Threading.Tasks.xml", - "ref/netcore50/de/System.Threading.Tasks.xml", - "ref/netcore50/es/System.Threading.Tasks.xml", - "ref/netcore50/fr/System.Threading.Tasks.xml", - "ref/netcore50/it/System.Threading.Tasks.xml", - "ref/netcore50/ja/System.Threading.Tasks.xml", - "ref/netcore50/ko/System.Threading.Tasks.xml", - "ref/netcore50/ru/System.Threading.Tasks.xml", - "ref/netcore50/zh-hans/System.Threading.Tasks.xml", - "ref/netcore50/zh-hant/System.Threading.Tasks.xml", - "ref/netstandard1.0/System.Threading.Tasks.dll", - "ref/netstandard1.0/System.Threading.Tasks.xml", - "ref/netstandard1.0/de/System.Threading.Tasks.xml", - "ref/netstandard1.0/es/System.Threading.Tasks.xml", - "ref/netstandard1.0/fr/System.Threading.Tasks.xml", - "ref/netstandard1.0/it/System.Threading.Tasks.xml", - "ref/netstandard1.0/ja/System.Threading.Tasks.xml", - "ref/netstandard1.0/ko/System.Threading.Tasks.xml", - "ref/netstandard1.0/ru/System.Threading.Tasks.xml", - "ref/netstandard1.0/zh-hans/System.Threading.Tasks.xml", - "ref/netstandard1.0/zh-hant/System.Threading.Tasks.xml", - "ref/netstandard1.3/System.Threading.Tasks.dll", - "ref/netstandard1.3/System.Threading.Tasks.xml", - "ref/netstandard1.3/de/System.Threading.Tasks.xml", - "ref/netstandard1.3/es/System.Threading.Tasks.xml", - "ref/netstandard1.3/fr/System.Threading.Tasks.xml", - "ref/netstandard1.3/it/System.Threading.Tasks.xml", - "ref/netstandard1.3/ja/System.Threading.Tasks.xml", - "ref/netstandard1.3/ko/System.Threading.Tasks.xml", - "ref/netstandard1.3/ru/System.Threading.Tasks.xml", - "ref/netstandard1.3/zh-hans/System.Threading.Tasks.xml", - "ref/netstandard1.3/zh-hant/System.Threading.Tasks.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Threading.Tasks.Extensions/4.0.0": { - "sha512": "Np6eqe8WPWE6HQ5RtVPiD7hZh+1wJiHkE0d0dJq4aqjWIbPfgzzKgld+VoiPA0IOdah+Mabrzv0v7iqLUrxWIw==", - "type": "package", - "path": "System.Threading.Tasks.Extensions/4.0.0", - "files": [ - "System.Threading.Tasks.Extensions.4.0.0.nupkg.sha512", - "System.Threading.Tasks.Extensions.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll", - "lib/netstandard1.0/System.Threading.Tasks.Extensions.xml", - "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll", - "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.xml" - ] - }, - "System.Threading.Timer/4.0.1": { - "sha512": "wiuoV9qeelaXTvF0iYkAPGuZ75fRT9cMbOKrMiTxVcTBa3ZVscsDo9PfjMXr7+DEvZxktz+l0jagFKLM1Njlsg==", - "type": "package", - "path": "System.Threading.Timer/4.0.1", - "files": [ - "System.Threading.Timer.4.0.1.nupkg.sha512", - "System.Threading.Timer.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net451/_._", - "lib/portable-net451+win81+wpa81/_._", - "lib/win81/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net451/_._", - "ref/netcore50/System.Threading.Timer.dll", - "ref/netcore50/System.Threading.Timer.xml", - "ref/netcore50/de/System.Threading.Timer.xml", - "ref/netcore50/es/System.Threading.Timer.xml", - "ref/netcore50/fr/System.Threading.Timer.xml", - "ref/netcore50/it/System.Threading.Timer.xml", - "ref/netcore50/ja/System.Threading.Timer.xml", - "ref/netcore50/ko/System.Threading.Timer.xml", - "ref/netcore50/ru/System.Threading.Timer.xml", - "ref/netcore50/zh-hans/System.Threading.Timer.xml", - "ref/netcore50/zh-hant/System.Threading.Timer.xml", - "ref/netstandard1.2/System.Threading.Timer.dll", - "ref/netstandard1.2/System.Threading.Timer.xml", - "ref/netstandard1.2/de/System.Threading.Timer.xml", - "ref/netstandard1.2/es/System.Threading.Timer.xml", - "ref/netstandard1.2/fr/System.Threading.Timer.xml", - "ref/netstandard1.2/it/System.Threading.Timer.xml", - "ref/netstandard1.2/ja/System.Threading.Timer.xml", - "ref/netstandard1.2/ko/System.Threading.Timer.xml", - "ref/netstandard1.2/ru/System.Threading.Timer.xml", - "ref/netstandard1.2/zh-hans/System.Threading.Timer.xml", - "ref/netstandard1.2/zh-hant/System.Threading.Timer.xml", - "ref/portable-net451+win81+wpa81/_._", - "ref/win81/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Xml.ReaderWriter/4.0.11": { - "sha512": "iKOPRXRAUrh54dxCkKEX7vKzG+ixfm4DyCVdKiI3otIuCq/ysNiH5unrWzWzkOumFJ1Sr/5eWXgJwZEmbIIoPg==", - "type": "package", - "path": "System.Xml.ReaderWriter/4.0.11", - "files": [ - "System.Xml.ReaderWriter.4.0.11.nupkg.sha512", - "System.Xml.ReaderWriter.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.Xml.ReaderWriter.dll", - "lib/netstandard1.3/System.Xml.ReaderWriter.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Xml.ReaderWriter.dll", - "ref/netcore50/System.Xml.ReaderWriter.xml", - "ref/netcore50/de/System.Xml.ReaderWriter.xml", - "ref/netcore50/es/System.Xml.ReaderWriter.xml", - "ref/netcore50/fr/System.Xml.ReaderWriter.xml", - "ref/netcore50/it/System.Xml.ReaderWriter.xml", - "ref/netcore50/ja/System.Xml.ReaderWriter.xml", - "ref/netcore50/ko/System.Xml.ReaderWriter.xml", - "ref/netcore50/ru/System.Xml.ReaderWriter.xml", - "ref/netcore50/zh-hans/System.Xml.ReaderWriter.xml", - "ref/netcore50/zh-hant/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/System.Xml.ReaderWriter.dll", - "ref/netstandard1.0/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/de/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/es/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/fr/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/it/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/ja/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/ko/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/ru/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/zh-hans/System.Xml.ReaderWriter.xml", - "ref/netstandard1.0/zh-hant/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/System.Xml.ReaderWriter.dll", - "ref/netstandard1.3/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/de/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/es/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/fr/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/it/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/ja/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/ko/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/ru/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/zh-hans/System.Xml.ReaderWriter.xml", - "ref/netstandard1.3/zh-hant/System.Xml.ReaderWriter.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - }, - "System.Xml.XDocument/4.0.11": { - "sha512": "AKIdCYBb5MIJj4yG0ftHDPJoSTxLeTKYebn8D6haFTuKLoh3IEAmOFGdlvoE/xq2wLuYEAic81wJBWsZpsbGcQ==", - "type": "package", - "path": "System.Xml.XDocument/4.0.11", - "files": [ - "System.Xml.XDocument.4.0.11.nupkg.sha512", - "System.Xml.XDocument.nuspec", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", - "lib/MonoAndroid10/_._", - "lib/MonoTouch10/_._", - "lib/net45/_._", - "lib/netcore50/System.Xml.XDocument.dll", - "lib/netstandard1.3/System.Xml.XDocument.dll", - "lib/portable-net45+win8+wp8+wpa81/_._", - "lib/win8/_._", - "lib/wp80/_._", - "lib/wpa81/_._", - "lib/xamarinios10/_._", - "lib/xamarinmac20/_._", - "lib/xamarintvos10/_._", - "lib/xamarinwatchos10/_._", - "ref/MonoAndroid10/_._", - "ref/MonoTouch10/_._", - "ref/net45/_._", - "ref/netcore50/System.Xml.XDocument.dll", - "ref/netcore50/System.Xml.XDocument.xml", - "ref/netcore50/de/System.Xml.XDocument.xml", - "ref/netcore50/es/System.Xml.XDocument.xml", - "ref/netcore50/fr/System.Xml.XDocument.xml", - "ref/netcore50/it/System.Xml.XDocument.xml", - "ref/netcore50/ja/System.Xml.XDocument.xml", - "ref/netcore50/ko/System.Xml.XDocument.xml", - "ref/netcore50/ru/System.Xml.XDocument.xml", - "ref/netcore50/zh-hans/System.Xml.XDocument.xml", - "ref/netcore50/zh-hant/System.Xml.XDocument.xml", - "ref/netstandard1.0/System.Xml.XDocument.dll", - "ref/netstandard1.0/System.Xml.XDocument.xml", - "ref/netstandard1.0/de/System.Xml.XDocument.xml", - "ref/netstandard1.0/es/System.Xml.XDocument.xml", - "ref/netstandard1.0/fr/System.Xml.XDocument.xml", - "ref/netstandard1.0/it/System.Xml.XDocument.xml", - "ref/netstandard1.0/ja/System.Xml.XDocument.xml", - "ref/netstandard1.0/ko/System.Xml.XDocument.xml", - "ref/netstandard1.0/ru/System.Xml.XDocument.xml", - "ref/netstandard1.0/zh-hans/System.Xml.XDocument.xml", - "ref/netstandard1.0/zh-hant/System.Xml.XDocument.xml", - "ref/netstandard1.3/System.Xml.XDocument.dll", - "ref/netstandard1.3/System.Xml.XDocument.xml", - "ref/netstandard1.3/de/System.Xml.XDocument.xml", - "ref/netstandard1.3/es/System.Xml.XDocument.xml", - "ref/netstandard1.3/fr/System.Xml.XDocument.xml", - "ref/netstandard1.3/it/System.Xml.XDocument.xml", - "ref/netstandard1.3/ja/System.Xml.XDocument.xml", - "ref/netstandard1.3/ko/System.Xml.XDocument.xml", - "ref/netstandard1.3/ru/System.Xml.XDocument.xml", - "ref/netstandard1.3/zh-hans/System.Xml.XDocument.xml", - "ref/netstandard1.3/zh-hant/System.Xml.XDocument.xml", - "ref/portable-net45+win8+wp8+wpa81/_._", - "ref/win8/_._", - "ref/wp80/_._", - "ref/wpa81/_._", - "ref/xamarinios10/_._", - "ref/xamarinmac20/_._", - "ref/xamarintvos10/_._", - "ref/xamarinwatchos10/_._" - ] - } - }, - "projectFileDependencyGroups": { - "": [], - ".NETStandard,Version=v1.5": [ - "NETStandard.Library >= 1.6.0", - "System.Linq.Expressions >= 4.1.0" - ] - }, - "tools": {}, - "projectFileToolGroups": {} -} \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/CommandLineOptionFormatterTests.cs b/FluentCommandLineParser.Tests/CommandLineOptionFormatterTests.cs index c227d7b..6c39eed 100644 --- a/FluentCommandLineParser.Tests/CommandLineOptionFormatterTests.cs +++ b/FluentCommandLineParser.Tests/CommandLineOptionFormatterTests.cs @@ -27,19 +27,18 @@ using System.Text; using Fclp.Internals; using Moq; -using NUnit.Framework; +using Xunit; namespace FluentCommandLineParser.Tests { /// /// Contains unit test for the test. /// - [TestFixture] public class CommandLineOptionFormatterTests { #region Constructors - [Test] + [Fact] public void Ensure_Can_Be_Constructed() { new CommandLineOptionFormatter(); @@ -49,7 +48,7 @@ public void Ensure_Can_Be_Constructed() #region Properties - [Test] + [Fact] public void Ensure_ValueText_Can_Be_Set() { var formatter = new CommandLineOptionFormatter(); @@ -58,10 +57,10 @@ public void Ensure_ValueText_Can_Be_Set() formatter.ValueText = expected; - Assert.AreEqual(expected, formatter.ValueText); + Assert.Equal(expected, formatter.ValueText); } - [Test] + [Fact] public void Ensure_DescriptionText_Can_Be_Set() { var formatter = new CommandLineOptionFormatter(); @@ -70,10 +69,10 @@ public void Ensure_DescriptionText_Can_Be_Set() formatter.DescriptionText = expected; - Assert.AreEqual(expected, formatter.DescriptionText); + Assert.Equal(expected, formatter.DescriptionText); } - [Test] + [Fact] public void Ensure_NoOptionsText_Can_Be_Set() { var formatter = new CommandLineOptionFormatter(); @@ -82,10 +81,10 @@ public void Ensure_NoOptionsText_Can_Be_Set() formatter.NoOptionsText = expected; - Assert.AreEqual(expected, formatter.NoOptionsText); + Assert.Equal(expected, formatter.NoOptionsText); } - [Test] + [Fact] public void Ensure_Header_Can_Be_Set() { var formatter = new CommandLineOptionFormatter(); @@ -94,23 +93,22 @@ public void Ensure_Header_Can_Be_Set() formatter.Header = expected; - Assert.AreEqual(expected, formatter.Header); + Assert.Equal(expected, formatter.Header); } #endregion Properties #region Format - [Test] - [ExpectedException(typeof(ArgumentNullException))] + [Fact] public void Ensure_Cannot_Specify_Null_options_Param() { var formatter = new CommandLineOptionFormatter(); - formatter.Format(null); + Assert.Throws(() => formatter.Format(null)); } - [Test] + [Fact] public void Ensure_Format_Returns_Expected_String() { var formatter = new CommandLineOptionFormatter(); @@ -132,10 +130,11 @@ public void Ensure_Format_Returns_Expected_String() var expected = expectedSb.ToString(); var actual = formatter.Format(new[] { mockOptionB, mockOptionA, mockOptionC }); - Assert.AreEqual(expected, actual, "Formatter returned unexpected string"); + //Assert.Equal(expected, actual, "Formatter returned unexpected string"); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Header_Is_Displayed_If_One_Is_Set() { var formatter = new CommandLineOptionFormatter(); @@ -163,17 +162,18 @@ public void Ensure_Header_Is_Displayed_If_One_Is_Set() var expected = expectedSb.ToString(); var actual = formatter.Format(new[] { mockOption1, mockOption2 }); - Assert.AreEqual(expected, actual, "Formatter returned unexpected string"); + //Assert.Equal(expected, actual, "Formatter returned unexpected string"); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_NoOptionsText_Returned_If_No_options_Have_Been_Setup() { var formatter = new CommandLineOptionFormatter(); var actual = formatter.Format(new ICommandLineOption[0]); - Assert.AreEqual(formatter.NoOptionsText, actual); + Assert.Equal(formatter.NoOptionsText, actual); } #endregion Format diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.XUnit.msbuild b/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.XUnit.msbuild deleted file mode 100644 index 038dd8d..0000000 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.XUnit.msbuild +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj b/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj index 5d93423..372c85d 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser.Tests.csproj @@ -1,195 +1,27 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {A2546703-0B86-4515-BE5B-FAF85B756BDC} - Library - Properties - Fclp.Tests - FluentCommandLineParser.Tests - v4.0 - 512 - - - ..\ - true - - - true - full - false - bin\debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\release\ - TRACE - prompt - 4 - - - false - - - - - - - - ..\Core\FluentCommandLineParser\bin\Debug\net451\FluentCommandLineParser.dll - - - False - ..\packages\Machine.Specifications.0.9.1\lib\net40\Machine.Specifications.dll - - - False - ..\packages\Machine.Specifications.0.9.1\lib\net40\Machine.Specifications.Clr4.dll - - - ..\packages\Machine.Specifications.Should.0.7.2\lib\net40\Machine.Specifications.Should.dll - - - - False - ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - - - False - ..\packages\NUnit.2.6.2\lib\nunit.framework.dll - - - False - ..\packages\AutoFixture.3.0.8\lib\net40\Ploeh.AutoFixture.dll - - - False - ..\packages\AutoFixture.AutoMoq.3.0.8\lib\net40\Ploeh.AutoFixture.AutoMoq.dll - - - - False - ..\packages\xunit.1.9.1\lib\net20\xunit.dll - - - False - ..\packages\xunit.extensions.1.9.1\lib\net20\xunit.extensions.dll - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - - - \ No newline at end of file + + + + netcoreapp2.1 + false + + + + + + + + + + + + + + + + + + + + + + diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_a_new_instance_is_created.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_a_new_instance_is_created.cs index 06da346..39dcb9e 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_a_new_instance_is_created.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_a_new_instance_is_created.cs @@ -33,11 +33,11 @@ namespace FluentCommandLineParser { public class when_a_new_instance_is_created : FluentCommandLineParserTestContext { - It should_create_a_default_parser_engine = () => sut.ParserEngine.ShouldBeOfType(typeof(CommandLineParserEngineMark2)); - It should_create_a_default_option_factory = () => sut.OptionFactory.ShouldBeOfType(typeof(CommandLineOptionFactory)); - It should_set_the_string_comparison_to_current_culture = () => sut.StringComparison.ShouldEqual(System.StringComparison.CurrentCulture); + It should_create_a_default_parser_engine = () => sut.ParserEngine.ShouldBeOfExactType(typeof(CommandLineParserEngineMark2)); + It should_create_a_default_option_factory = () => sut.OptionFactory.ShouldBeOfExactType(typeof(CommandLineOptionFactory)); + // It should_set_the_string_comparison_to_current_culture = () => sut.StringComparison.ShouldEqual(System.StringComparison.CurrentCulture); It should_have_setup_no_options_internally = () => sut.Options.ShouldBeEmpty(); - It should_have_a_default_option_formatter = () => sut.OptionFormatter.ShouldBeOfType(typeof(CommandLineOptionFormatter)); + It should_have_a_default_option_formatter = () => sut.OptionFormatter.ShouldBeOfExactType(typeof(CommandLineOptionFormatter)); } } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_executing_parse_operation/with_a_parser_engine_that_is_null.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_executing_parse_operation/with_a_parser_engine_that_is_null.cs index 18ae063..07f7840 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_executing_parse_operation/with_a_parser_engine_that_is_null.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_executing_parse_operation/with_a_parser_engine_that_is_null.cs @@ -35,7 +35,7 @@ public class with_a_parser_engine_that_is_null : FluentCommandLineParserTestCont Because of = () => sut.ParserEngine = null; It should_be_unable_to_assign_to_null = () => sut.ParserEngine.ShouldNotBeNull(); - It should_use_the_default_one_instead = () => sut.ParserEngine.ShouldBeOfType(typeof(CommandLineParserEngineMark2)); + It should_use_the_default_one_instead = () => sut.ParserEngine.ShouldBeOfExactType(typeof(CommandLineParserEngineMark2)); } } } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/returns_a_null_option.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/returns_a_null_option.cs index b06a058..bce84eb 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/returns_a_null_option.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/returns_a_null_option.cs @@ -50,7 +50,7 @@ public class returns_a_null_option : SettingUpALongOptionTestContext Because of = () => SetupOptionWith(valid_short_name, valid_long_name); - It should_throw_an_error = () => error.ShouldBeOfType(typeof(InvalidOperationException)); + It should_throw_an_error = () => error.ShouldBeOfExactType(typeof(InvalidOperationException)); It should_not_have_setup_an_option = () => sut.Options.ShouldBeEmpty(); } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/throws_an_error.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/throws_an_error.cs index 566fe24..7825d80 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/throws_an_error.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/and_the_option_factory/throws_an_error.cs @@ -49,7 +49,7 @@ public class throws_an_error : SettingUpALongOptionTestContext Because of = () => SetupOptionWith(valid_short_name, valid_long_name); - It should_throw_an_error = () => error.ShouldBeOfType(typeof(TestException)); + It should_throw_an_error = () => error.ShouldBeOfExactType(typeof(TestException)); It should_not_have_setup_an_option = () => sut.Options.ShouldBeEmpty(); } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_long_name/with_a_long_name_that_is_already_used.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_long_name/with_a_long_name_that_is_already_used.cs index ac81320..c52d497 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_long_name/with_a_long_name_that_is_already_used.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_long_name/with_a_long_name_that_is_already_used.cs @@ -53,7 +53,7 @@ public class with_a_long_name_that_is_already_used : SettingUpALongOptionTestCon SetupOptionWith(valid_short_name, existingLongName); }; - It should_throw_an_error = () => error.ShouldBeOfType(typeof(OptionAlreadyExistsException)); + It should_throw_an_error = () => error.ShouldBeOfExactType(typeof(OptionAlreadyExistsException)); It should_not_have_setup_an_option = () => sut.Options.ShouldContainOnly(existingOption); } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_short_name/with_a_short_name_that_is_already_used.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_short_name/with_a_short_name_that_is_already_used.cs index d8b9d4d..c750226 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_short_name/with_a_short_name_that_is_already_used.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_setting_up_a_new_option/with_a_short_name/with_a_short_name_that_is_already_used.cs @@ -53,7 +53,7 @@ public class with_a_short_name_that_is_already_used : SettingUpAShortOptionTestC SetupOptionWith(existingShortName); }; - It should_throw_an_error = () => error.ShouldBeOfType(typeof(OptionAlreadyExistsException)); + It should_throw_an_error = () => error.ShouldBeOfExactType(typeof(OptionAlreadyExistsException)); It should_not_have_setup_an_option = () => sut.Options.ShouldContainOnly(existingOption); } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_using_an_option_factory/that_has_been_set_to_null.cs b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_using_an_option_factory/that_has_been_set_to_null.cs index 40aa36a..067c6e5 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParser/when_using_an_option_factory/that_has_been_set_to_null.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParser/when_using_an_option_factory/that_has_been_set_to_null.cs @@ -35,7 +35,7 @@ public class that_has_been_set_to_null : FluentCommandLineParserTestContext Because of = () => sut.OptionFactory = null; It should_be_unable_to_assign_to_null = () => sut.OptionFactory.ShouldNotBeNull(); - It should_use_the_default_one_instead = () => sut.OptionFactory.ShouldBeOfType(typeof(CommandLineOptionFactory)); + It should_use_the_default_one_instead = () => sut.OptionFactory.ShouldBeOfExactType(typeof(CommandLineOptionFactory)); } } } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParserBuilderTests.cs b/FluentCommandLineParser.Tests/FluentCommandLineParserBuilderTests.cs index 4aa78bf..15f4fe9 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParserBuilderTests.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParserBuilderTests.cs @@ -45,8 +45,8 @@ class when_initialised : FluentCommandLineParserBuilderTestContext It should_enable_case_sensitive = () => sut.IsCaseSensitive.ShouldBeTrue(); - It should_have_the_fluent_parser_by_default = () => - sut.Parser.ShouldBeOfType(); + private It should_have_the_fluent_parser_by_default = () => + sut.Parser.ShouldBeAssignableTo(); It should_have_initialised_the_object = () => sut.Object.ShouldNotBeNull(); diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParserMSpecTests.cs b/FluentCommandLineParser.Tests/FluentCommandLineParserMSpecTests.cs index 152bccc..ba6b90d 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParserMSpecTests.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParserMSpecTests.cs @@ -76,8 +76,8 @@ class when_enabled : IsCaseSensitiveTestContext It should_return_enabled = () => sut.IsCaseSensitive.ShouldBeTrue(); - It should_set_the_comparison_type_to_case_sensitive = () => - sut.StringComparison.ShouldEqual(Fclp.FluentCommandLineParser.CaseSensitiveComparison); +// It should_set_the_comparison_type_to_case_sensitive = () => +// sut.StringComparison.ShouldEqual(Fclp.FluentCommandLineParser.CaseSensitiveComparison); } class when_disabled : IsCaseSensitiveTestContext @@ -87,8 +87,8 @@ class when_disabled : IsCaseSensitiveTestContext It should_return_disabled = () => sut.IsCaseSensitive.ShouldBeFalse(); - It should_set_the_comparison_type_to_ignore_case = () => - sut.StringComparison.ShouldEqual(Fclp.FluentCommandLineParser.IgnoreCaseComparison); +// It should_set_the_comparison_type_to_ignore_case = () => +// sut.StringComparison.ShouldEqual(Fclp.FluentCommandLineParser.IgnoreCaseComparison); } } } diff --git a/FluentCommandLineParser.Tests/FluentCommandLineParserTests.cs b/FluentCommandLineParser.Tests/FluentCommandLineParserTests.cs index 6854ae6..edba338 100644 --- a/FluentCommandLineParser.Tests/FluentCommandLineParserTests.cs +++ b/FluentCommandLineParser.Tests/FluentCommandLineParserTests.cs @@ -30,14 +30,13 @@ using Fclp.Internals.Errors; using Fclp.Tests.FluentCommandLineParser; using Moq; -using NUnit.Framework; +using Xunit; namespace Fclp.Tests { /// /// Contains unit tests for the class. /// - [TestFixture] public class FluentCommandLineParserTests { #region HelperMethods @@ -88,9 +87,9 @@ static void RunTest(string value, T expected) var assert = new Action((args, result) => { string msg = FormatArgs(args); - Assert.AreEqual(expected, actual, msg); - Assert.IsFalse(result.HasErrors, msg); - Assert.IsFalse(result.Errors.Any(), msg); + Assert.Equal(expected, actual); //, msg); + Assert.False(result.HasErrors, msg); + Assert.False(result.Errors.Any(), msg); }); CallParserWithAllKeyVariations(parser, "short", value, assert); @@ -101,7 +100,7 @@ static void RunTest(string value, T expected) #region Description Tests - [Test] + [Fact] public void Ensure_Description_Can_Be_Set() { var parser = CreateFluentParser(); @@ -112,7 +111,7 @@ public void Ensure_Description_Can_Be_Set() var actual = ((ICommandLineOption)cmdOption).Description; - Assert.AreSame(expected, actual); + Assert.Same(expected, actual); } #endregion Description Tests @@ -121,14 +120,14 @@ public void Ensure_Description_Can_Be_Set() #region String Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_String_When_Using_Short_option() { const string expected = "my-expected-string"; RunTest(expected, expected); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_String_When_Using_Long_option() { const string expected = "my-expected-string"; @@ -144,9 +143,9 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_String_When_Using_Lon CallParserWithAllKeyVariations(parser, key, expected, (args, result) => { string msg = "Executed with args: " + FormatArgs(args); - Assert.AreEqual(expected, actual, msg); - Assert.IsFalse(result.HasErrors, msg); - Assert.IsFalse(result.Errors.Any(), msg); + Assert.Equal(expected, actual); //, msg); + Assert.False(result.HasErrors, msg); + Assert.False(result.Errors.Any(), msg); }); } @@ -154,7 +153,7 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_String_When_Using_Lon #region Int32 Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Int32_When_Using_Short_option() { const int expected = int.MaxValue; @@ -171,13 +170,13 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Int32_When_Using_Shor //CallParserWithAllKeyVariations(parser, shortKey, expected.ToString(CultureInfo.InvariantCulture), (args, result) => //{ // string msg = "Executed with args: " + FormatArgs(args); - // Assert.AreEqual(expected, actual, msg); - // Assert.IsFalse(result.HasErrors, msg); - // Assert.IsFalse(result.Errors.Any(), msg); + // Assert.Equal(expected, actual, msg); + // Assert.False(result.HasErrors, msg); + // Assert.False(result.Errors.Any(), msg); //}); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Int32_When_Using_Long_option() { const int expected = int.MaxValue; @@ -194,13 +193,13 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Int32_When_Using_Long CallParserWithAllKeyVariations(parser, longKey, expected.ToString(CultureInfo.InvariantCulture), (args, result) => { string msg = "Executed with args: " + FormatArgs(args); - Assert.AreEqual(expected, actual, msg); - Assert.IsFalse(result.HasErrors, msg); - Assert.IsFalse(result.Errors.Any(), msg); + Assert.Equal(expected, actual); //, msg); + Assert.False(result.HasErrors, msg); + Assert.False(result.Errors.Any(), msg); }); } - [Test] + [Fact] public void Ensure_Negative_Integer_Can_Be_Specified_With_Unix_Style() { var parser = CreateFluentParser(); @@ -212,18 +211,18 @@ public void Ensure_Negative_Integer_Can_Be_Specified_With_Unix_Style() var result = parser.Parse(new[] { "--integer", "--", "-123" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(-123, actual); + Assert.Equal(-123, actual); } #endregion Int32 Option #region Double Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Double_When_Using_Short_option() { const double expected = 1.23456789d; @@ -239,13 +238,13 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Double_When_Using_Sho //CallParserWithAllKeyVariations(parser, shortKey, expected.ToString(CultureInfo.InvariantCulture), (args, result) => //{ - // Assert.AreEqual(expected, actual, FormatArgs(args)); - // Assert.IsFalse(result.HasErrors, FormatArgs(args)); - // Assert.IsFalse(result.Errors.Any(), FormatArgs(args)); + // Assert.Equal(expected, actual, FormatArgs(args)); + // Assert.False(result.HasErrors, FormatArgs(args)); + // Assert.False(result.Errors.Any(), FormatArgs(args)); //}); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Double_When_Using_Long_option() { const double expected = 1.23456789d; @@ -261,13 +260,13 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Double_When_Using_Lon CallParserWithAllKeyVariations(parser, longKey, expected.ToString(CultureInfo.InvariantCulture), (args, result) => { - Assert.AreEqual(expected, actual, FormatArgs(args)); - Assert.IsFalse(result.HasErrors, FormatArgs(args)); - Assert.IsFalse(result.Errors.Any(), FormatArgs(args)); + Assert.Equal(expected, actual); //, FormatArgs(args)); + Assert.False(result.HasErrors, FormatArgs(args)); + Assert.False(result.Errors.Any(), FormatArgs(args)); }); } - [Test] + [Fact] public void Ensure_Negative_Double_Can_Be_Specified_With_Unix_Style() { var parser = CreateFluentParser(); @@ -279,18 +278,18 @@ public void Ensure_Negative_Double_Can_Be_Specified_With_Unix_Style() var result = parser.Parse(new[] { "--double", "--", "-123.456" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(-123.456, actual); + Assert.Equal(-123.456, actual); } #endregion Double Option #region Enum Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short_option() { const TestEnum expected = TestEnum.Value1; @@ -305,10 +304,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short parser.Parse(new[] { "-e", expected.ToString() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_option() { const TestEnum expected = TestEnum.Value1; @@ -323,10 +322,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_ parser.Parse(new[] { "--enum", expected.ToString() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short_option_And_Int32_Enum() { const TestEnum expected = TestEnum.Value1; @@ -341,10 +340,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short parser.Parse(new[] { "-e", ((int)expected).ToString(CultureInfo.InvariantCulture) }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_option_And_Int32_Enum() { const TestEnum expected = TestEnum.Value1; @@ -359,10 +358,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_ parser.Parse(new[] { "--enum", ((int)expected).ToString(CultureInfo.InvariantCulture) }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short_option_And_Lowercase_String() { const TestEnum expected = TestEnum.Value1; @@ -377,10 +376,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short parser.Parse(new[] { "-e", expected.ToString().ToLowerInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_option_And_Int32_Enum_And_Lowercase_String() { const TestEnum expected = TestEnum.Value1; @@ -395,10 +394,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_ parser.Parse(new[] { "--enum", expected.ToString().ToLowerInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short_option_And_Uppercase_String() { const TestEnum expected = TestEnum.Value1; @@ -413,10 +412,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Short parser.Parse(new[] { "-e", expected.ToString().ToUpperInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_option_And_Int32_Enum_And_Uppercase_String() { const TestEnum expected = TestEnum.Value1; @@ -431,12 +430,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Enum_When_Using_Long_ parser.Parse(new[] { "--enum", expected.ToString().ToUpperInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } #region Enum Flags Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_Short_option() { const TestEnumFlag expected = TestEnumFlag.Value1; @@ -451,10 +450,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_S parser.Parse(new[] { "-e", expected.ToString() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_Short_option_And_A_List() { var actual = TestEnumFlag.Value0; @@ -467,13 +466,13 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_S parser.Parse(new[] { "-e", TestEnumFlag.Value1.ToString(), TestEnumFlag.Value2.ToString() }); - Assert.AreEqual(3, (int)actual); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value1)); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value2)); - Assert.IsFalse(actual.HasFlag(TestEnumFlag.Value64)); + Assert.Equal(3, (int)actual); + Assert.True(actual.HasFlag(TestEnumFlag.Value1)); + Assert.True(actual.HasFlag(TestEnumFlag.Value2)); + Assert.False(actual.HasFlag(TestEnumFlag.Value64)); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_Short_option_And_A_List_With_0() { var actual = TestEnumFlag.Value0; @@ -486,16 +485,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_S parser.Parse(new[] { "-e", TestEnumFlag.Value1.ToString(), TestEnumFlag.Value2.ToString(), TestEnumFlag.Value0.ToString(), TestEnumFlag.Value64.ToString() }); - Assert.AreEqual(67, (int)actual); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value1)); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value2)); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value64)); - Assert.IsTrue(actual.HasFlag(TestEnumFlag.Value0)); - Assert.IsFalse(actual.HasFlag(TestEnumFlag.Value8)); - Assert.IsFalse(actual.HasFlag(TestEnumFlag.Value32)); + Assert.Equal(67, (int)actual); + Assert.True(actual.HasFlag(TestEnumFlag.Value1)); + Assert.True(actual.HasFlag(TestEnumFlag.Value2)); + Assert.True(actual.HasFlag(TestEnumFlag.Value64)); + Assert.True(actual.HasFlag(TestEnumFlag.Value0)); + Assert.False(actual.HasFlag(TestEnumFlag.Value8)); + Assert.False(actual.HasFlag(TestEnumFlag.Value32)); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_Short_option_And_A_List_Of_String_Values() { var args = new[] { "--direction", "South", "East" }; @@ -509,10 +508,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_EnumFlag_When_Using_S p.Parse(args); - Assert.IsFalse(actual.HasFlag(Direction.North)); - Assert.IsTrue(actual.HasFlag(Direction.East)); - Assert.IsTrue(actual.HasFlag(Direction.South)); - Assert.IsFalse(actual.HasFlag(Direction.West)); + Assert.False(actual.HasFlag(Direction.North)); + Assert.True(actual.HasFlag(Direction.East)); + Assert.True(actual.HasFlag(Direction.South)); + Assert.False(actual.HasFlag(Direction.West)); } [Flags] @@ -530,7 +529,7 @@ public enum Direction #region Enum? Options - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Null_When_No_Value_Provided() { TestEnum? actual = TestEnum.Value0; @@ -543,10 +542,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Null_When_No_Value_Provided() parser.Parse(new[] { "-e" }); - Assert.IsNull(actual); + Assert.Null(actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Short_option() { TestEnum? expected = TestEnum.Value1; @@ -561,10 +560,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "-e", expected.ToString() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Long_option() { TestEnum? expected = TestEnum.Value1; @@ -579,10 +578,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "--enum", expected.ToString() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Short_option_And_Int32_Enum() { TestEnum? expected = TestEnum.Value1; @@ -597,10 +596,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "-e", ((int)expected).ToString(CultureInfo.InvariantCulture) }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Long_option_And_Int32_Enum() { TestEnum? expected = TestEnum.Value1; @@ -615,10 +614,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "--enum", ((int)expected).ToString(CultureInfo.InvariantCulture) }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Short_option_And_Lowercase_String() { TestEnum? expected = TestEnum.Value1; @@ -633,10 +632,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "-e", expected.ToString().ToLowerInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Long_option_And_Int32_Enum_And_Lowercase_String() { TestEnum? expected = TestEnum.Value1; @@ -651,10 +650,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "--enum", expected.ToString().ToLowerInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Short_option_And_Uppercase_String() { TestEnum? expected = TestEnum.Value1; @@ -669,10 +668,10 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "-e", expected.ToString().ToUpperInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Using_Long_option_And_Int32_Enum_And_Uppercase_String() { TestEnum? expected = TestEnum.Value1; @@ -687,14 +686,14 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Enum_When_Us parser.Parse(new[] { "--enum", expected.ToString().ToUpperInvariant() }); - Assert.AreEqual(expected, actual); + Assert.Equal(expected, actual); } #endregion #region DateTime Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_Short_option() { var expected = new DateTime(2012, 2, 29, 01, 01, 01); @@ -709,12 +708,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_S //var result = parser.Parse(new[] { "-dt", expected.ToString("yyyy-MM-ddThh:mm:ss", CultureInfo.CurrentCulture) }); - //Assert.AreEqual(expected, actual); - //Assert.IsFalse(result.HasErrors); - //Assert.IsFalse(result.Errors.Any()); + //Assert.Equal(expected, actual); + //Assert.False(result.HasErrors); + //Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_Long_option() { var expected = new DateTime(2012, 2, 29, 01, 01, 01); @@ -729,12 +728,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_L var result = parser.Parse(new[] { "--datetime", expected.ToString("yyyy-MM-ddThh:mm:ss", CultureInfo.CurrentCulture) }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_Spaces_And_Long_option() { var expected = new DateTime(2012, 2, 29, 01, 01, 01); @@ -749,19 +748,19 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_S var result = parser.Parse(new[] { "--datetime", expected.ToString("yyyy MM dd hh:mm:ss tt", CultureInfo.CurrentCulture) }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_DateTime_When_Using_Spaces_And_Short_option() { var expected = new DateTime(2012, 2, 29, 01, 01, 01); RunTest(expected.ToString("yyyy MM dd hh:mm:ss tt", CultureInfo.CurrentCulture), expected); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_ListDateTime_When_Using_Spaces_And_Long_option() { var expected = new List { @@ -782,16 +781,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_ListDateTime_When_Usi dArgs.AddRange(expected.Select(x => "\"" + x.ToString("yyyy MM dd hh:mm:ss tt", CultureInfo.CurrentCulture) + "\"")); var result = parser.Parse(dArgs.ToArray()); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion DateTime Option #region int? Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_Valid_Value_Is_Provided() { int? expected = 1; @@ -804,12 +803,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_V var result = parser.Parse(new[] {"--integer", "1"}); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_InValid_Value_Is_Provided() { int? expected = null; @@ -822,12 +821,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_I var result = parser.Parse(new[] {"--integer", "abc"}); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_Null_Is_Provided() { int? expected = null; @@ -840,16 +839,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Int32_When_N var result = parser.Parse(new[] {"--integer"} ); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion #region double? Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_Valid_Value_Is_Provided() { double? expected = 1.23456789d; @@ -862,12 +861,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_ var result = parser.Parse(new[] { "--double", expected.Value.ToString(CultureInfo.CurrentCulture) }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_InValid_Value_Is_Provided() { double? expected = null; @@ -880,12 +879,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_ var result = parser.Parse(new[] { "--double", "not-a-double" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_No_Value_Is_Provided() { double? expected = null; @@ -898,16 +897,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Double_When_ var result = parser.Parse(new[] { "--double" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion #region DateTime? Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_When_Valid_Value_Is_Provided() { DateTime? expected = new DateTime(2012, 2, 29, 01, 01, 01); @@ -921,12 +920,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_Whe var result = parser.Parse(new[] { "--datetime", expected.Value.ToString("yyyy-MM-ddThh:mm:ss", CultureInfo.CurrentCulture) }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_When_InValid_Value_Is_Provided() { DateTime? expected = null; @@ -940,12 +939,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_Whe var result = parser.Parse(new[] { "--datetime", "not-a-date-time" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_When_No_Value_Is_Provided() { DateTime? expected = null; @@ -959,16 +958,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_DateTime_Whe var result = parser.Parse(new[] { "--datetime" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion #region bool? Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_Valid_Value_Is_Provided() { bool? expected = true; @@ -981,12 +980,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_Va var result = parser.Parse(new[] { "--bool", "true" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_InValid_Value_Is_Provided() { bool? expected = null; @@ -999,12 +998,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_In var result = parser.Parse(new[] { "--bool", "not-a-bool" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_No_Value_Is_Provided() { bool? expected = null; @@ -1017,16 +1016,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Nullable_Bool_When_No var result = parser.Parse(new[] { "--bool" }); - Assert.AreEqual(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion #region Uri Option - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_Valid_Value_Is_Provided() { const string expected = "https://github.com/fclp/fluent-command-line-parser"; @@ -1039,12 +1038,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_Valid_Value_ var result = parser.Parse(new[] { "--uri", expected }); - Assert.AreEqual(expected, actual.AbsoluteUri); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Equal(expected, actual.AbsoluteUri); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_InValid_Value_Is_Provided() { Uri actual = null; @@ -1056,12 +1055,12 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_InValid_Valu var result = parser.Parse(new[] { "--uri", "not-a-uri" }); - Assert.IsNull(actual); - Assert.IsTrue(result.HasErrors); - Assert.AreEqual(result.Errors.Count(), 1); + Assert.Null(actual); + Assert.True(result.HasErrors); + Assert.Equal(result.Errors.Count(), 1); } - [Test] + [Fact] public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_No_Value_Is_Provided() { Uri actual = null; @@ -1073,16 +1072,16 @@ public void Ensure_Parser_Calls_The_Callback_With_Expected_Uri_When_No_Value_Is_ var result = parser.Parse(new[] { "--uri" }); - Assert.IsNull(actual); - Assert.IsTrue(result.HasErrors); - Assert.AreEqual(result.Errors.Count(), 1); + Assert.Null(actual); + Assert.True(result.HasErrors); + Assert.Equal(result.Errors.Count(), 1); } #endregion #region Long Option Only - [Test] + [Fact] public void Can_have_long_option_only() { var parser = CreateFluentParser(); @@ -1093,26 +1092,25 @@ public void Can_have_long_option_only() var result = parser.Parse(new[] { "--my-feature", "somevalue" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual("somevalue", s); + Assert.Equal("somevalue", s); } - [Test] - [ExpectedException(typeof(InvalidOptionNameException))] + [Fact] public void Cannot_have_single_character_long_option() { var parser = CreateFluentParser(); - parser.Setup("s"); + Assert.Throws(() => parser.Setup("s")); } #endregion #region Required - [Test] + [Fact] public void Ensure_Expected_Error_Is_Returned_If_A_Option_Is_Required_And_Null_Args_Are_Specified() { var parser = CreateFluentParser(); @@ -1122,14 +1120,14 @@ public void Ensure_Expected_Error_Is_Returned_If_A_Option_Is_Required_And_Null_A var result = parser.Parse(null); - Assert.IsTrue(result.HasErrors); + Assert.True(result.HasErrors); - Assert.AreEqual(1, result.Errors.Count()); + Assert.Equal(1, result.Errors.Count()); - Assert.IsInstanceOf(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); + Assert.IsType(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); } - [Test] + [Fact] public void Ensure_Expected_Error_Is_Returned_If_A_Option_Is_Required_And_Empty_Args_Are_Specified() { var parser = CreateFluentParser(); @@ -1139,14 +1137,14 @@ public void Ensure_Expected_Error_Is_Returned_If_A_Option_Is_Required_And_Empty_ var result = parser.Parse(new string[0]); - Assert.IsTrue(result.HasErrors); + Assert.True(result.HasErrors); - Assert.AreEqual(1, result.Errors.Count()); + Assert.Equal(1, result.Errors.Count()); - Assert.IsInstanceOf(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); + Assert.IsType(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); } - [Test] + [Fact] public void Ensure_Expected_Error_Is_Returned_If_Required_Option_Is_Provided() { var parser = CreateFluentParser(); @@ -1156,14 +1154,14 @@ public void Ensure_Expected_Error_Is_Returned_If_Required_Option_Is_Provided() var result = parser.Parse(new[] { "-d" }); - Assert.IsTrue(result.HasErrors); + Assert.True(result.HasErrors); - Assert.AreEqual(1, result.Errors.Count()); + Assert.Equal(1, result.Errors.Count()); - Assert.IsInstanceOf(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); + Assert.IsType(typeof(ExpectedOptionNotFoundParseError), result.Errors.First()); } - [Test] + [Fact] public void Ensure_No_Error_Returned_If_Required_Option_Is_Not_Provided() { var parser = CreateFluentParser(); @@ -1172,48 +1170,45 @@ public void Ensure_No_Error_Returned_If_Required_Option_Is_Not_Provided() var result = parser.Parse(new[] { "-d" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } - [Test] - [ExpectedException(typeof(OptionAlreadyExistsException))] + [Fact] public void Ensure_Expected_Exception_Thrown_If_Adding_A_Option_With_A_ShortName_Which_Has_Already_Been_Setup() { var parser = CreateFluentParser(); parser.Setup('s', "string"); - parser.Setup('s', "int32"); + Assert.Throws(() => parser.Setup('s', "int32")); } - [Test] - [ExpectedException(typeof(OptionAlreadyExistsException))] + [Fact] public void Ensure_Expected_Exception_Thrown_If_Adding_A_Option_With_A_ShortName_And_LongName_Which_Has_Already_Been_Setup() { var parser = CreateFluentParser(); parser.Setup('s', "string"); - parser.Setup('s', "string"); + Assert.Throws(() => parser.Setup('s', "string")); } - [Test] - [ExpectedException(typeof(OptionAlreadyExistsException))] + [Fact] public void Ensure_Expected_Exception_Thrown_If_Adding_A_Option_With_A_LongName_Which_Has_Already_Been_Setup() { var parser = CreateFluentParser(); parser.Setup('s', "string"); - parser.Setup('i', "string"); + Assert.Throws(() => parser.Setup('i', "string")); } #endregion #region Default - [Test] + [Fact] public void Ensure_Default_Value_Returned_If_No_Value_Specified() { var parser = CreateFluentParser(); @@ -1227,11 +1222,11 @@ public void Ensure_Default_Value_Returned_If_No_Value_Specified() var result = parser.Parse(new[] { "-s" }); - Assert.AreSame(expected, actual); - Assert.IsTrue(result.HasErrors); + Assert.Same(expected, actual); + Assert.True(result.HasErrors); } - [Test] + [Fact] public void Ensure_Default_Value_Returned_If_No_Option_Or_Value_Specified() { var parser = CreateFluentParser(); @@ -1245,40 +1240,40 @@ public void Ensure_Default_Value_Returned_If_No_Option_Or_Value_Specified() var result = parser.Parse(new string[0]); - Assert.AreSame(expected, actual); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.Same(expected, actual); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); } #endregion #region No Args - [Test] + [Fact] public void Ensure_Can_Specify_Empty_Args() { var parser = CreateFluentParser(); var result = parser.Parse(new string[0]); - Assert.IsFalse(result.HasErrors); - Assert.IsTrue(result.EmptyArgs); - Assert.IsFalse(result.Errors.Any()); + Assert.False(result.HasErrors); + Assert.True(result.EmptyArgs); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Can_Specify_Null_Args() { var parser = CreateFluentParser(); var result = parser.Parse(null); - Assert.IsFalse(result.HasErrors); - Assert.IsTrue(result.EmptyArgs); - Assert.IsFalse(result.Errors.Any()); + Assert.False(result.HasErrors); + Assert.True(result.EmptyArgs); + Assert.False(result.Errors.Any()); } - [Test] + [Fact] public void Ensure_Defaults_Are_Called_When_Empty_Args_Specified() { var parser = CreateFluentParser(); @@ -1300,19 +1295,19 @@ public void Ensure_Defaults_Are_Called_When_Empty_Args_Specified() var result = parser.Parse(null); - Assert.IsFalse(result.HasErrors); - Assert.IsTrue(result.EmptyArgs); - Assert.AreEqual(expectedInt, actualInt); - Assert.AreEqual(expectedDouble, actualDouble); - Assert.AreEqual(expectedString, actualString); - Assert.AreEqual(expectedBool, actualBool); + Assert.False(result.HasErrors); + Assert.True(result.EmptyArgs); + Assert.Equal(expectedInt, actualInt); + Assert.Equal(expectedDouble, actualDouble); + Assert.Equal(expectedString, actualString); + Assert.Equal(expectedBool, actualBool); } #endregion No Args #region Example - [Test] + [Fact] public void Ensure_Example_Works_As_Expected() { const int expectedRecordId = 10; @@ -1362,22 +1357,22 @@ public void Ensure_Example_Works_As_Expected() // do the work ICommandLineParserResult result = parser.Parse(args); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.Errors.Any()); + Assert.False(result.HasErrors); + Assert.False(result.Errors.Any()); - Assert.AreEqual(expectedRecordId, recordId); - Assert.AreEqual(expectedValue, newValue); - Assert.AreEqual(expectedSilentMode, inSilentMode); - Assert.AreEqual(expectedSwitchA, switchA); - Assert.AreEqual(expectedSwitchB, switchB); - Assert.AreEqual(expectedSwitchC, switchC); + Assert.Equal(expectedRecordId, recordId); + Assert.Equal(expectedValue, newValue); + Assert.Equal(expectedSilentMode, inSilentMode); + Assert.Equal(expectedSwitchA, switchA); + Assert.Equal(expectedSwitchB, switchB); + Assert.Equal(expectedSwitchC, switchC); } #endregion #region Setup Help - [Test] + [Fact] public void Setup_Help_And_Ensure_It_Is_Called_With_Custom_Formatter() { var parser = new Fclp.FluentCommandLineParser(); @@ -1401,12 +1396,12 @@ public void Setup_Help_And_Ensure_It_Is_Called_With_Custom_Formatter() var result = parser.Parse(args); - Assert.AreSame(expectedCallbackResult, callbackResult); - Assert.IsFalse(result.HasErrors); - Assert.IsTrue(result.HelpCalled); + Assert.Same(expectedCallbackResult, callbackResult); + Assert.False(result.HasErrors); + Assert.True(result.HelpCalled); } - [Test] + [Fact] public void Setup_Help_And_Ensure_It_Is_Called() { var parser = new Fclp.FluentCommandLineParser(); @@ -1429,12 +1424,12 @@ public void Setup_Help_And_Ensure_It_Is_Called() var result = parser.Parse(args); - Assert.IsTrue(wasCalled); - Assert.IsFalse(result.HasErrors); - Assert.IsTrue(result.HelpCalled); + Assert.True(wasCalled); + Assert.False(result.HasErrors); + Assert.True(result.HelpCalled); } - [Test] + [Fact] public void Setup_Help_With_Symbol() { var parser = CreateFluentParser(); @@ -1447,11 +1442,11 @@ public void Setup_Help_With_Symbol() var result = parser.Parse(args); - Assert.IsTrue(result.HelpCalled); - Assert.IsNotNullOrEmpty(callbackResult); + Assert.True(result.HelpCalled); + Assert.NotEmpty(callbackResult); } - [Test] + [Fact] public void Setup_Help_And_Ensure_It_Can_Be_Called_Manually() { var parser = CreateFluentParser(); @@ -1462,10 +1457,10 @@ public void Setup_Help_And_Ensure_It_Can_Be_Called_Manually() parser.HelpOption.ShowHelp(parser.Options); - Assert.IsNotNullOrEmpty(callbackResult); + Assert.NotEmpty(callbackResult); } - [Test] + [Fact] public void Generic_Setup_Help_And_Ensure_It_Can_Be_Called_Manually() { var parser = new FluentCommandLineParser(); @@ -1476,14 +1471,14 @@ public void Generic_Setup_Help_And_Ensure_It_Can_Be_Called_Manually() parser.HelpOption.ShowHelp(parser.Options); - Assert.IsNotNullOrEmpty(callbackResult); + Assert.NotEmpty(callbackResult); } #endregion #region Case Sensitive - [Test] + [Fact] public void Ensure_Short_Options_Are_Case_Sensitive_When_Enabled() { var parser = CreateFluentParser(); @@ -1501,12 +1496,12 @@ public void Ensure_Short_Options_Are_Case_Sensitive_When_Enabled() var result = parser.Parse(new[] { "-S", expectedUpperCaseValue, "-s", expectedLowerCaseValue }); - Assert.IsFalse(result.HasErrors); - Assert.AreEqual(expectedUpperCaseValue, upperCaseValue); - Assert.AreEqual(expectedLowerCaseValue, lowerCaseValue); + Assert.False(result.HasErrors); + Assert.Equal(expectedUpperCaseValue, upperCaseValue); + Assert.Equal(expectedLowerCaseValue, lowerCaseValue); } - [Test] + [Fact] public void Ensure_Long_Options_Are_Case_Sensitive_When_Enabled() { var parser = CreateFluentParser(); @@ -1524,12 +1519,12 @@ public void Ensure_Long_Options_Are_Case_Sensitive_When_Enabled() var result = parser.Parse(new[] { "--LONGOPTION", expectedUpperCaseValue, "--longoption", expectedLowerCaseValue }); - Assert.IsFalse(result.HasErrors); - Assert.AreEqual(expectedUpperCaseValue, upperCaseValue); - Assert.AreEqual(expectedLowerCaseValue, lowerCaseValue); + Assert.False(result.HasErrors); + Assert.Equal(expectedUpperCaseValue, upperCaseValue); + Assert.Equal(expectedLowerCaseValue, lowerCaseValue); } - [Test] + [Fact] public void Ensure_Short_Options_Ignore_Case_When_Disabled() { var parser = CreateFluentParser(); @@ -1544,11 +1539,11 @@ public void Ensure_Short_Options_Ignore_Case_When_Disabled() var result = parser.Parse(new[] { "--S", expectedValue }); - Assert.IsFalse(result.HasErrors); - Assert.AreEqual(expectedValue, actualValue); + Assert.False(result.HasErrors); + Assert.Equal(expectedValue, actualValue); } - [Test] + [Fact] public void Ensure_Long_Options_Ignore_Case_When_Disabled() { var parser = CreateFluentParser(); @@ -1563,81 +1558,77 @@ public void Ensure_Long_Options_Ignore_Case_When_Disabled() var result = parser.Parse(new[] { "--LONGOPTION", expectedValue }); - Assert.IsFalse(result.HasErrors); - Assert.AreEqual(expectedValue, actualValue); + Assert.False(result.HasErrors); + Assert.Equal(expectedValue, actualValue); } #endregion #region Obsolete - [Test] + [Fact] public void Ensure_Obsolete_Setup_With_Only_Short_Option() { var parser = CreateFluentParser(); parser.Setup("s", null); var option = parser.Options.Single(); - Assert.IsNull(option.LongName); - Assert.AreEqual("s", option.ShortName); + Assert.Null(option.LongName); + Assert.Equal("s", option.ShortName); } - [Test] + [Fact] public void Ensure_Obsolete_Setup_With_Only_Long_Option() { var parser = CreateFluentParser(); parser.Setup(null, "long"); var option = parser.Options.Single(); - Assert.AreEqual("long", option.LongName); - Assert.IsNull(option.ShortName); + Assert.Equal("long", option.LongName); + Assert.Null(option.ShortName); } - [Test] + [Fact] public void Ensure_Obsolete_Setup_With_Short_And_Long_Option() { var parser = CreateFluentParser(); parser.Setup("s", "long"); var option = parser.Options.Single(); - Assert.AreEqual("long", option.LongName); - Assert.AreEqual("s", option.ShortName); + Assert.Equal("long", option.LongName); + Assert.Equal("s", option.ShortName); } - [Test] - [ExpectedException(typeof(InvalidOptionNameException))] + [Fact] public void Ensure_Obsolete_Setup_Does_Not_Allow_Null_Short_And_Long_Options() { var parser = CreateFluentParser(); - parser.Setup(null, null); + Assert.Throws(() => parser.Setup(null, null)); } - [Test] - [ExpectedException(typeof(InvalidOptionNameException))] + [Fact] public void Ensure_Obsolete_Setup_Does_Not_Allow_Empty_Short_And_Long_Options() { var parser = CreateFluentParser(); - parser.Setup(string.Empty, string.Empty); + Assert.Throws(() => parser.Setup(string.Empty, string.Empty)); } - [Test] - [ExpectedException(typeof(InvalidOptionNameException))] + [Fact] public void Ensure_Obsolete_Setup_Does_Not_Allow_Short_Option_With_More_Than_One_Char() { var parser = CreateFluentParser(); - parser.Setup("ab", null); + Assert.Throws(() => parser.Setup("ab", null)); } - [Test] - [ExpectedException(typeof(InvalidOptionNameException))] + [Fact] public void Ensure_Obsolete_Setup_Does_Not_Allow_Long_Option_With_One_Char() { var parser = CreateFluentParser(); - parser.Setup(null, "s"); + Assert.Throws(() => parser.Setup(null, "s")); } #endregion #region Addtional Arguments - [Test] + [Fact] public void Ensure_Additional_Arguments_Callback_Called_When_Additional_Args_Provided() { var parser = CreateFluentParser(); @@ -1649,16 +1640,16 @@ public void Ensure_Additional_Arguments_Callback_Called_When_Additional_Args_Pro var result = parser.Parse(new[] { "--my-option", "value", "--", "addArg1", "addArg2" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(2, capturedAdditionalArgs.Count()); - Assert.IsTrue(capturedAdditionalArgs.Contains("addArg1")); - Assert.IsTrue(capturedAdditionalArgs.Contains("addArg2")); + Assert.Equal(2, capturedAdditionalArgs.Count()); + Assert.True(capturedAdditionalArgs.Contains("addArg1")); + Assert.True(capturedAdditionalArgs.Contains("addArg2")); } - [Test] + [Fact] public void Ensure_Additional_Arguments_Callback_Not_Called_When_No_Additional_Args_Provided() { var parser = CreateFluentParser(); @@ -1670,14 +1661,14 @@ public void Ensure_Additional_Arguments_Callback_Not_Called_When_No_Additional_A var result = parser.Parse(new[] { "--my-option", "value" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.IsFalse(wasCalled); + Assert.False(wasCalled); } - [Test] + [Fact] public void Ensure_Additional_Arguments_Callback_Not_Called_When_No_Additional_Args_Follow_A_Double_Dash() { var parser = CreateFluentParser(); @@ -1689,14 +1680,14 @@ public void Ensure_Additional_Arguments_Callback_Not_Called_When_No_Additional_A var result = parser.Parse(new[] { "--my-option", "value", "--" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.IsFalse(wasCalled); + Assert.False(wasCalled); } - [Test] + [Fact] public void Ensure_Stable_When_Additional_Args_Are_Provided_But_Capture_Additional_Arguments_Has_Not_Been_Setup() { var parser = CreateFluentParser(); @@ -1705,12 +1696,12 @@ public void Ensure_Stable_When_Additional_Args_Are_Provided_But_Capture_Addition var result = parser.Parse(new[] { "--my-option", "value", "--", "addArg1", "addArg2" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); } - [Test] + [Fact] public void Ensure_Additional_Args_Can_Be_Captured_For_Different_Options() { var parser = CreateFluentParser(); @@ -1731,27 +1722,27 @@ public void Ensure_Additional_Args_Can_Be_Captured_For_Different_Options() var result = parser.Parse(new[] { "--option-one", "value-one", "addArg1", "addArg2", "--option-two", "value-two", "addArg3", "addArg4" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual("value-one", option1Value); - Assert.AreEqual("value-two", option2Value); + Assert.Equal("value-one", option1Value); + Assert.Equal("value-two", option2Value); - Assert.AreEqual(2, option1AddArgs.Count()); - Assert.IsTrue(option1AddArgs.Contains("addArg1")); - Assert.IsTrue(option1AddArgs.Contains("addArg2")); + Assert.Equal(2, option1AddArgs.Count()); + Assert.True(option1AddArgs.Contains("addArg1")); + Assert.True(option1AddArgs.Contains("addArg2")); - Assert.AreEqual(2, option2AddArgs.Count()); - Assert.IsTrue(option2AddArgs.Contains("addArg3")); - Assert.IsTrue(option2AddArgs.Contains("addArg4")); + Assert.Equal(2, option2AddArgs.Count()); + Assert.True(option2AddArgs.Contains("addArg3")); + Assert.True(option2AddArgs.Contains("addArg4")); } #endregion #region Lists - [Test] + [Fact] public void Ensure_Can_Parse_Mulitple_Arguments_Containing_Negative_Integers_To_A_List() { var parser = CreateFluentParser(); @@ -1763,18 +1754,18 @@ public void Ensure_Can_Parse_Mulitple_Arguments_Containing_Negative_Integers_To_ var result = parser.Parse(new[] { "--integers", "--", "123", "-123", "-321", "321" }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(4, actual.Count()); - Assert.IsTrue(actual.Contains(123)); - Assert.IsTrue(actual.Contains(-123)); - Assert.IsTrue(actual.Contains(-321)); - Assert.IsTrue(actual.Contains(321)); + Assert.Equal(4, actual.Count()); + Assert.True(actual.Contains(123)); + Assert.True(actual.Contains(-123)); + Assert.True(actual.Contains(-321)); + Assert.True(actual.Contains(321)); } - [Test] + [Fact] public void Ensure_Can_Parse_Multiple_Nullable_Enums_To_A_List() { var parser = CreateFluentParser(); @@ -1786,16 +1777,16 @@ public void Ensure_Can_Parse_Multiple_Nullable_Enums_To_A_List() var result = parser.Parse(new[] { "--enums", "--", TestEnum.Value0.ToString(), TestEnum.Value1.ToString() }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(2, actual.Count()); + Assert.Equal(2, actual.Count()); Assert.Contains(TestEnum.Value0, actual); Assert.Contains(TestEnum.Value1, actual); } - [Test] + [Fact] public void Ensure_Can_Parse_Arguments_Containing_Long_To_A_List() { var parser = CreateFluentParser(); @@ -1811,15 +1802,15 @@ public void Ensure_Can_Parse_Arguments_Containing_Long_To_A_List() var result = parser.Parse(new[] { "--longs", "--", value1.ToString(), value2.ToString(), value3.ToString(), value4.ToString() }); - Assert.IsFalse(result.HasErrors); - Assert.IsFalse(result.EmptyArgs); - Assert.IsFalse(result.HelpCalled); + Assert.False(result.HasErrors); + Assert.False(result.EmptyArgs); + Assert.False(result.HelpCalled); - Assert.AreEqual(4, actual.Count()); - Assert.IsTrue(actual.Contains(value1)); - Assert.IsTrue(actual.Contains(value2)); - Assert.IsTrue(actual.Contains(value3)); - Assert.IsTrue(actual.Contains(value4)); + Assert.Equal(4, actual.Count()); + Assert.True(actual.Contains(value1)); + Assert.True(actual.Contains(value2)); + Assert.True(actual.Contains(value3)); + Assert.True(actual.Contains(value4)); } #endregion @@ -1828,7 +1819,7 @@ public void Ensure_Can_Parse_Arguments_Containing_Long_To_A_List() #region Duplicate Options Tests - [Test] + [Fact] public void Ensure_First_Value_Is_Stored_When_Duplicate_Options_Are_Specified() { var parser = CreateFluentParser(); @@ -1838,7 +1829,7 @@ public void Ensure_First_Value_Is_Stored_When_Duplicate_Options_Are_Specified() parser.Parse(new[] { "/n=1", "/n=2", "-n=3", "--n=4" }); - Assert.AreEqual(1, number); + Assert.Equal(1, number); } #endregion diff --git a/FluentCommandLineParser.Tests/Integration/BoolInlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/BoolInlineDataAttribute.cs index d3f7bb6..5d3b781 100644 --- a/FluentCommandLineParser.Tests/Integration/BoolInlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/BoolInlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// BoolInlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2013, Simon Williams // All rights reserved. // @@ -30,5 +30,5 @@ public BoolInlineDataAttribute(string args, bool expected) : base(args, expectedBoolean: expected) { } - } + } } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/Integration/DoubleInlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/DoubleInlineDataAttribute.cs index 113977f..0938291 100644 --- a/FluentCommandLineParser.Tests/Integration/DoubleInlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/DoubleInlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// DoubleInlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2013, Simon Williams // All rights reserved. // diff --git a/FluentCommandLineParser.Tests/Integration/EnumInlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/EnumInlineDataAttribute.cs index a98511c..0ef91dc 100644 --- a/FluentCommandLineParser.Tests/Integration/EnumInlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/EnumInlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// EnumInlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2014, Simon Williams // All rights reserved. // diff --git a/FluentCommandLineParser.Tests/Integration/Int32EnumInlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/Int32EnumInlineDataAttribute.cs index 0e1a6a3..0039ccc 100644 --- a/FluentCommandLineParser.Tests/Integration/Int32EnumInlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/Int32EnumInlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// Int32EnumInlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2014, Simon Williams // All rights reserved. // diff --git a/FluentCommandLineParser.Tests/Integration/Int32InlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/Int32InlineDataAttribute.cs index f021f66..8f5ed0f 100644 --- a/FluentCommandLineParser.Tests/Integration/Int32InlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/Int32InlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// Int32InlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2013, Simon Williams // All rights reserved. // @@ -24,11 +24,12 @@ namespace Fclp.Tests.Integration { - public class Int32InlineDataAttribute : SimpleShortOptionsAreParsedCorrectlyAttribute + /* + public class InlineDataAttribute : SimpleShortOptionsAreParsedCorrectlyAttribute { - public Int32InlineDataAttribute(string args, int expected) + public InlineDataAttribute(string args, int expected) : base(args, expectedInt32: expected) { } - } + } */ } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/Integration/IntegrationTests.cs b/FluentCommandLineParser.Tests/Integration/IntegrationTests.cs index 575dbeb..c19db61 100644 --- a/FluentCommandLineParser.Tests/Integration/IntegrationTests.cs +++ b/FluentCommandLineParser.Tests/Integration/IntegrationTests.cs @@ -22,6 +22,7 @@ // POSSIBILITY OF SUCH DAMAGE. #endregion +using System.Xml.Linq; using Fclp.Tests.FluentCommandLineParser; using Fclp.Tests.Internals; using Machine.Specifications; @@ -33,54 +34,54 @@ namespace Fclp.Tests.Integration public class IntegrationTests : TestContextBase { [Theory] - [BoolInlineData("-b", true)] - [BoolInlineData("-b+", true)] - [BoolInlineData("-b-", false)] - [BoolInlineData("/b:true", true)] - [BoolInlineData("/b:false", false)] - [BoolInlineData("-b true", true)] - [BoolInlineData("-b false", false)] - [BoolInlineData("-b=true", true)] - [BoolInlineData("-b=false", false)] - [BoolInlineData("-b on", true)] - [BoolInlineData("-b off", false)] - [BoolInlineData("-b ON", true)] - [BoolInlineData("-b OFF", false)] - [BoolInlineData("-b:on", true)] - [BoolInlineData("-b:off", false)] - [BoolInlineData("-b=on", true)] - [BoolInlineData("-b=off", false)] - [BoolInlineData("-b1", true)] - [BoolInlineData("-b0", false)] - [BoolInlineData("/b:1", true)] - [BoolInlineData("/b:0", false)] - [BoolInlineData("-b 1", true)] - [BoolInlineData("-b 0", false)] - [BoolInlineData("-b=1", true)] - [BoolInlineData("-b=0", false)] - [BoolInlineData("-b 1", true)] - [BoolInlineData("-b 0", false)] - [BoolInlineData("-b:1", true)] - [BoolInlineData("-b:0", false)] - [BoolInlineData("-b=1", true)] - [StringInlineData("-s {0}", "Hello World")] - [StringInlineData("-s:{0}", "Hello World")] - [StringInlineData("-s={0}", "Hello World")] - [Int32InlineData("-i 123", 123)] - [Int32InlineData("-i:123", 123)] - [Int32InlineData("-i=123", 123)] - [Int64InlineData("-l 2147483649", 2147483649)] - [Int64InlineData("-l:2147483649", 2147483649)] - [Int64InlineData("-l=2147483649", 2147483649)] - [DoubleInlineData("-d 123.456", 123.456)] - [DoubleInlineData("-d:123.456", 123.456)] - [DoubleInlineData("-d=123.456", 123.456)] - [Int32EnumInlineData("-e 1", TestEnum.Value1)] - [Int32EnumInlineData("-e:1", TestEnum.Value1)] - [Int32EnumInlineData("-e=1", TestEnum.Value1)] - [EnumInlineData("-e Value1", TestEnum.Value1)] - [EnumInlineData("-e:Value1", TestEnum.Value1)] - [EnumInlineData("-e=Value1", TestEnum.Value1)] + [InlineData("-b", true)] + [InlineData("-b+", true)] + [InlineData("-b-", false)] + [InlineData("/b:true", true)] + [InlineData("/b:false", false)] + [InlineData("-b true", true)] + [InlineData("-b false", false)] + [InlineData("-b=true", true)] + [InlineData("-b=false", false)] + [InlineData("-b on", true)] + [InlineData("-b off", false)] + [InlineData("-b ON", true)] + [InlineData("-b OFF", false)] + [InlineData("-b:on", true)] + [InlineData("-b:off", false)] + [InlineData("-b=on", true)] + [InlineData("-b=off", false)] + [InlineData("-b1", true)] + [InlineData("-b0", false)] + [InlineData("/b:1", true)] + [InlineData("/b:0", false)] + [InlineData("-b 1", true)] + [InlineData("-b 0", false)] + [InlineData("-b=1", true)] + [InlineData("-b=0", false)] + [InlineData("-b 1", true)] + [InlineData("-b 0", false)] + [InlineData("-b:1", true)] + [InlineData("-b:0", false)] + [InlineData("-b=1", true)] + [InlineData("-s {0}", "Hello World")] + [InlineData("-s:{0}", "Hello World")] + [InlineData("-s={0}", "Hello World")] + [InlineData("-i 123", 123)] + [InlineData("-i:123", 123)] + [InlineData("-i=123", 123)] + [InlineData("-l 2147483649", 2147483649)] + [InlineData("-l:2147483649", 2147483649)] + [InlineData("-l=2147483649", 2147483649)] + [InlineData("-d 123.456", 123.456)] + [InlineData("-d:123.456", 123.456)] + [InlineData("-d=123.456", 123.456)] + [InlineData("-e 1", TestEnum.Value1)] + [InlineData("-e:1", TestEnum.Value1)] + [InlineData("-e=1", TestEnum.Value1)] + [InlineData("-e Value1", TestEnum.Value1)] + [InlineData("-e:Value1", TestEnum.Value1)] + [InlineData("-e=Value1", TestEnum.Value1)] public void SimpleShortOptionsAreParsedCorrectly( string arguments, bool? expectedBoolean, diff --git a/FluentCommandLineParser.Tests/Integration/Lists/FlagTests.cs b/FluentCommandLineParser.Tests/Integration/Lists/FlagTests.cs index c5c74ec..f095edb 100644 --- a/FluentCommandLineParser.Tests/Integration/Lists/FlagTests.cs +++ b/FluentCommandLineParser.Tests/Integration/Lists/FlagTests.cs @@ -34,35 +34,35 @@ namespace Fclp.Tests.Integration public class FlagTests : TestContextBase { [Theory] - [EnumFlagListInlineData("--flag Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("-f Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag:Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag=Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag:Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag=Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("-f 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag:0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("/flag=0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag:0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag=0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("-f Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag:Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag=Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag:Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag=Value0 Value1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("-f 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag 0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag:0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("/flag=0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag:0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] + [InlineData("--flag=0 1", TestEnumFlag.Value0, TestEnumFlag.Value1)] - [EnumFlagListInlineData("--flag Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("-f Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag:Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag=Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("--flag:Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("--flag=Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("--flag 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("-f 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag:0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("/flag=0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("--flag:0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] - [EnumFlagListInlineData("--flag=0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("-f Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag:Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag=Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag:Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag=Value0 Value1 Value16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("-f 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag 0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag:0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("/flag=0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag:0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] + [InlineData("--flag=0 1 16", TestEnumFlag.Value0, TestEnumFlag.Value1, TestEnumFlag.Value16)] private void should_contain_list_with_expected_items(string arguments, IEnumerable expectedItems) { sut = new Fclp.FluentCommandLineParser(); diff --git a/FluentCommandLineParser.Tests/Integration/Lists/ListTests.cs b/FluentCommandLineParser.Tests/Integration/Lists/ListTests.cs index 0d323da..12326a0 100644 --- a/FluentCommandLineParser.Tests/Integration/Lists/ListTests.cs +++ b/FluentCommandLineParser.Tests/Integration/Lists/ListTests.cs @@ -34,94 +34,94 @@ namespace Fclp.Tests.Integration public class ListTests : TestContextBase { [Theory] - [StringListInlineData("--list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] - [StringListInlineData("-list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] - [StringListInlineData("/list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] - [StringListInlineData("--list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("-list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("/list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("/list='file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("/list:'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("--list:'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - [StringListInlineData("--list='file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] - public void should_create_list_with_expected_strings(string arguments, IEnumerable expectedItems) + [InlineData("--list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] + [InlineData("-list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] + [InlineData("/list file1.txt file2.txt file3.txt", "file1.txt", "file2.txt", "file3.txt")] + [InlineData("--list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("-list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("/list 'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("/list='file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("/list:'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("--list:'file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + [InlineData("--list='file 1.txt' file2.txt 'file 3.txt'", "file 1.txt", "file2.txt", "file 3.txt")] + public void should_create_list_with_expected_strings(string arguments, string[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } [Theory] - [Int32ListInlineData("--list 123 321 098", 123, 321, 098)] - [Int32ListInlineData("-list 123 321 098", 123, 321, 098)] - [Int32ListInlineData("/list 123 321 098", 123, 321, 098)] - [Int32ListInlineData("/list:123 321 098", 123, 321, 098)] - [Int32ListInlineData("/list=123 321 098", 123, 321, 098)] - [Int32ListInlineData("--list:123 321 098", 123, 321, 098)] - [Int32ListInlineData("--list=123 321 098", 123, 321, 098)] - public void should_create_list_with_expected_int32_items(string arguments, IEnumerable expectedItems) + [InlineData("--list 123 321 098", 123, 321, 098)] + [InlineData("-list 123 321 098", 123, 321, 098)] + [InlineData("/list 123 321 098", 123, 321, 098)] + [InlineData("/list:123 321 098", 123, 321, 098)] + [InlineData("/list=123 321 098", 123, 321, 098)] + [InlineData("--list:123 321 098", 123, 321, 098)] + [InlineData("--list=123 321 098", 123, 321, 098)] + public void should_create_list_with_expected_int32_items(string arguments, int[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } [Theory] - [Int64ListInlineData("--list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("-list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("/list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("/list:2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("/list=2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("--list:2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - [Int64ListInlineData("--list=2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] - public void should_create_list_with_expected_int64_items(string arguments, IEnumerable expectedItems) + [InlineData("--list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("-list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("/list 2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("/list:2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("/list=2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("--list:2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + [InlineData("--list=2147483650 3147483651 4147483652", 2147483650, 3147483651, 4147483652)] + public void should_create_list_with_expected_int64_items(string arguments, long[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } [Theory] - [DoubleListInlineData("--list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("-list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("/list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("/list:123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("/list=123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("--list:123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - [DoubleListInlineData("--list=123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] - public void should_create_list_with_expected_double_items(string arguments, IEnumerable expectedItems) + [InlineData("--list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("-list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("/list 123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("/list:123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("/list=123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("--list:123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + [InlineData("--list=123.456 321.987 098.123465", 123.456, 321.987, 098.123465)] + public void should_create_list_with_expected_double_items(string arguments, double[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } [Theory] - [BoolListInlineData("--list true false true", true, false, true)] - [BoolListInlineData("-l true false true", true, false, true)] - [BoolListInlineData("/list true false true", true, false, true)] - [BoolListInlineData("/list:true false true", true, false, true)] - [BoolListInlineData("/list=true false true", true, false, true)] - [BoolListInlineData("--list:true false true", true, false, true)] - [BoolListInlineData("--list=true false true", true, false, true)] - public void should_create_list_with_expected_bool_items(string arguments, IEnumerable expectedItems) + [InlineData("--list true false true", true, false, true)] + [InlineData("-l true false true", true, false, true)] + [InlineData("/list true false true", true, false, true)] + [InlineData("/list:true false true", true, false, true)] + [InlineData("/list=true false true", true, false, true)] + [InlineData("--list:true false true", true, false, true)] + [InlineData("--list=true false true", true, false, true)] + public void should_create_list_with_expected_bool_items(string arguments, params bool[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } [Theory] - [EnumListInlineData("--list Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("-l Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list:Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list=Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("--list:Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("--list=Value0 Value1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("--list 0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("-l 0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list 0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list:0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("/list=0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("--list:0 1", TestEnum.Value0, TestEnum.Value1)] - [EnumListInlineData("--list=0 1", TestEnum.Value0, TestEnum.Value1)] - public void should_create_list_with_expected_enum_items(string arguments, IEnumerable expectedItems) + [InlineData("--list Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("-l Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list:Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list=Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("--list:Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("--list=Value0 Value1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("--list 0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("-l 0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list 0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list:0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("/list=0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("--list:0 1", TestEnum.Value0, TestEnum.Value1)] + [InlineData("--list=0 1", TestEnum.Value0, TestEnum.Value1)] + public void should_create_list_with_expected_enum_items(string arguments, params TestEnum[] expectedItems) { should_contain_list_with_expected_items(arguments, expectedItems); } - private void should_contain_list_with_expected_items(string arguments, IEnumerable expectedItems) + private void should_contain_list_with_expected_items(string arguments, params T[] expectedItems) { sut = new Fclp.FluentCommandLineParser(); diff --git a/FluentCommandLineParser.Tests/Integration/NCrunchExcelDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/NCrunchExcelDataAttribute.cs index 3fe1ab4..0bbef1d 100644 --- a/FluentCommandLineParser.Tests/Integration/NCrunchExcelDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/NCrunchExcelDataAttribute.cs @@ -27,7 +27,7 @@ using Xunit.Extensions; namespace Fclp.Tests.Integration -{ +{ /* public class NCrunchExcelDataAttribute : ExcelDataAttribute { public NCrunchExcelDataAttribute(string filename, string selectStatement) @@ -45,5 +45,5 @@ private static string GetPathFromContext(string filename) return newFilePath; } - } + } */ } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/Integration/SimpleShortOptionsAreParsedCorrectlyAttribute.cs b/FluentCommandLineParser.Tests/Integration/SimpleShortOptionsAreParsedCorrectlyAttribute.cs index 6cc3389..e279a65 100644 --- a/FluentCommandLineParser.Tests/Integration/SimpleShortOptionsAreParsedCorrectlyAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/SimpleShortOptionsAreParsedCorrectlyAttribute.cs @@ -22,12 +22,43 @@ // POSSIBILITY OF SUCH DAMAGE. #endregion +using System.Collections.Generic; +using System.Reflection; using Fclp.Tests.FluentCommandLineParser; -using Xunit.Extensions; +using Xunit; +using Xunit.Sdk; namespace Fclp.Tests.Integration -{ - public class SimpleShortOptionsAreParsedCorrectlyAttribute : InlineDataAttribute +{ + + /// + /// Provides a data source for a data theory, with the data coming from inline values. + /// + public class InlineDataAttribute : DataAttribute + { + private readonly object[] data; + + /// + /// Initializes a new instance of the class. + /// + /// The data values to pass to the theory. + public InlineDataAttribute(params object[] data) + { + this.data = data; + } + + /// + public override IEnumerable GetData(MethodInfo testMethod) + { + return (IEnumerable) new object[1][] + { + this.data + }; + } + } + + + public class SimpleShortOptionsAreParsedCorrectlyAttribute : Fclp.Tests.Integration.InlineDataAttribute { public SimpleShortOptionsAreParsedCorrectlyAttribute( string arguments, @@ -41,5 +72,5 @@ public SimpleShortOptionsAreParsedCorrectlyAttribute( { } - } + } } \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/Integration/StringInlineDataAttribute.cs b/FluentCommandLineParser.Tests/Integration/StringInlineDataAttribute.cs index d90a7d4..db0354e 100644 --- a/FluentCommandLineParser.Tests/Integration/StringInlineDataAttribute.cs +++ b/FluentCommandLineParser.Tests/Integration/StringInlineDataAttribute.cs @@ -1,5 +1,5 @@ #region License -// StringInlineDataAttribute.cs +// InlineDataAttribute.cs // Copyright (c) 2013, Simon Williams // All rights reserved. // diff --git a/FluentCommandLineParser.Tests/Internals/AnonymousMock.cs b/FluentCommandLineParser.Tests/Internals/AnonymousMock.cs index 8039c51..5136add 100644 --- a/FluentCommandLineParser.Tests/Internals/AnonymousMock.cs +++ b/FluentCommandLineParser.Tests/Internals/AnonymousMock.cs @@ -26,8 +26,8 @@ using System.Linq.Expressions; using System.Reflection; using Moq; -using Ploeh.AutoFixture; -using Ploeh.AutoFixture.Kernel; +using AutoFixture; +using AutoFixture.Kernel; namespace Fclp.Tests.Internals { diff --git a/FluentCommandLineParser.Tests/Internals/CommandLineOptionFactoryTests.cs b/FluentCommandLineParser.Tests/Internals/CommandLineOptionFactoryTests.cs index b4cb377..f17029c 100644 --- a/FluentCommandLineParser.Tests/Internals/CommandLineOptionFactoryTests.cs +++ b/FluentCommandLineParser.Tests/Internals/CommandLineOptionFactoryTests.cs @@ -26,23 +26,22 @@ using Fclp.Internals.Parsing; using Fclp.Internals.Parsing.OptionParsers; using Moq; -using NUnit.Framework; +using Xunit; namespace FluentCommandLineParser.Tests.Internals { /// /// Contains unit tests for the class. /// - [TestFixture] public class CommandLineOptionFactoryTests { - [Test] + [Fact] public void Ensure_Can_Be_Constructed() { new CommandLineOptionFactory(); } - [Test] + [Fact] public void Ensure_CreateCommandLineOption_Returns_Expected_Object() { var factory = new CommandLineOptionFactory(); @@ -56,9 +55,9 @@ public void Ensure_CreateCommandLineOption_Returns_Expected_Object() var actual = factory.CreateOption(expectedShortName, expectedLongName); - Assert.IsInstanceOf>(actual, "Factory returned unexpected object"); - Assert.AreEqual(expectedShortName, actual.ShortName, "Factory returned Option with unexpected ShortName"); - Assert.AreEqual(expectedShortName, actual.ShortName, "Factory returned Option with unexpected LongName"); + Assert.IsType>(actual); //, "Factory returned unexpected object"); + Assert.Equal(expectedShortName, actual.ShortName); //, "Factory returned Option with unexpected ShortName"); + Assert.Equal(expectedShortName, actual.ShortName); //, "Factory returned Option with unexpected LongName"); } } } diff --git a/FluentCommandLineParser.Tests/Internals/CommandLineOptionParserFactoryTests.cs b/FluentCommandLineParser.Tests/Internals/CommandLineOptionParserFactoryTests.cs index 9748f2d..836a0de 100644 --- a/FluentCommandLineParser.Tests/Internals/CommandLineOptionParserFactoryTests.cs +++ b/FluentCommandLineParser.Tests/Internals/CommandLineOptionParserFactoryTests.cs @@ -27,28 +27,26 @@ using Fclp.Internals.Parsing.OptionParsers; using Fclp.Tests.FluentCommandLineParser; using Moq; -using NUnit.Framework; +using Xunit; namespace FluentCommandLineParser.Tests.Internals { - [TestFixture] public class CommandLineOptionParserFactoryTests { - [Test] + [Fact] public void Enure_Can_Be_Constructed() { new CommandLineOptionParserFactory(); } - [Test] - [ExpectedException(typeof(ArgumentNullException))] + [Fact] public void Ensure_Cannot_Add_Null_Parser() { var factory = new CommandLineOptionParserFactory(); - factory.AddOrReplace(null); + Assert.Throws(() => factory.AddOrReplace(null)); } - [Test] + [Fact] public void Ensure_Can_Add_Custom_Parser() { var factory = new CommandLineOptionParserFactory(); @@ -59,10 +57,10 @@ public void Ensure_Can_Add_Custom_Parser() var actual = factory.CreateParser(); - Assert.AreSame(mockParser.Object, actual); + Assert.Same(mockParser.Object, actual); } - [Test] + [Fact] public void Ensure_Can_Replace_Existing_Parser() { var factory = new CommandLineOptionParserFactory(); @@ -77,19 +75,18 @@ public void Ensure_Can_Replace_Existing_Parser() var actual = factory.CreateParser(); - Assert.AreSame(mockParser.Object, actual); + Assert.Same(mockParser.Object, actual); } - [Test] - [ExpectedException(typeof(UnsupportedTypeException))] + [Fact] public void Ensure_UnsupportedTypeException_Thrown_If_Factory_Is_Unable_To_Create_Requested_Type() { var factory = new CommandLineOptionParserFactory(); - factory.CreateParser(); + Assert.Throws(() => factory.CreateParser()); } - [Test] + [Fact] public void Ensure_Factory_Supports_Out_Of_The_Box_Parsers() { var factory = new CommandLineOptionParserFactory(); @@ -101,45 +98,45 @@ public void Ensure_Factory_Supports_Out_Of_The_Box_Parsers() var dtParser = factory.CreateParser(); var boolParser = factory.CreateParser(); - Assert.IsInstanceOf(stringParser); - Assert.IsInstanceOf(int32Parser); - Assert.IsInstanceOf(int64Parser); - Assert.IsInstanceOf(doubleParser); - Assert.IsInstanceOf(dtParser); - Assert.IsInstanceOf(boolParser); + Assert.IsType(stringParser); + Assert.IsType(int32Parser); + Assert.IsType(int64Parser); + Assert.IsType(doubleParser); + Assert.IsType(dtParser); + Assert.IsType(boolParser); } - [Test] + [Fact] public void Ensure_Factory_Supports_List_Of_Int64() { var factory = new CommandLineOptionParserFactory(); var int64ListParser = factory.CreateParser>(); - Assert.IsInstanceOf>(int64ListParser); + Assert.IsType>(int64ListParser); } - [Test] + [Fact] public void Ensure_Factory_Supports_Enum() { var factory = new CommandLineOptionParserFactory(); var enumParser = factory.CreateParser(); - Assert.IsInstanceOf>(enumParser); + Assert.IsType>(enumParser); } - [Test] + [Fact] public void Ensure_Factory_Supports_EnumFlags() { var factory = new CommandLineOptionParserFactory(); var enumParser = factory.CreateParser(); - Assert.IsInstanceOf>(enumParser); + Assert.IsType>(enumParser); } - [Test] + [Fact] public void Ensure_Factory_Returns_Custom_Enum_Formatter() { var factory = new CommandLineOptionParserFactory(); @@ -148,7 +145,7 @@ public void Ensure_Factory_Returns_Custom_Enum_Formatter() factory.AddOrReplace(customParser); var enumParser = factory.CreateParser(); - Assert.AreSame(customParser, enumParser); + Assert.Same(customParser, enumParser); } } diff --git a/FluentCommandLineParser.Tests/Internals/CommandLineOptionTests.cs b/FluentCommandLineParser.Tests/Internals/CommandLineOptionTests.cs index 513f659..9428022 100644 --- a/FluentCommandLineParser.Tests/Internals/CommandLineOptionTests.cs +++ b/FluentCommandLineParser.Tests/Internals/CommandLineOptionTests.cs @@ -28,19 +28,18 @@ using Fclp.Internals.Parsing; using Fclp.Internals.Parsing.OptionParsers; using Moq; -using NUnit.Framework; +using Xunit; namespace FluentCommandLineParser.Tests.Internals { /// /// Contains unit tests for the class. /// - [TestFixture] - class CommandLineOptionTests + public class CommandLineOptionTests { #region Constructor Tests - [Test] + [Fact] public void Ensure_Can_Be_Constructed() { const string expectedShortName = "My short name"; @@ -49,11 +48,11 @@ public void Ensure_Can_Be_Constructed() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedShortName, cmdOption.ShortName, "Specified ShortName was not as expected"); - Assert.AreEqual(expectedLongName, cmdOption.LongName, "Specified LongName was not as expected"); + Assert.Equal(expectedShortName, cmdOption.ShortName); //, "Specified ShortName was not as expected"); + Assert.Equal(expectedLongName, cmdOption.LongName); //, "Specified LongName was not as expected"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Null_LongName() { const string expectedShortName = "My short name"; @@ -62,10 +61,10 @@ public void Ensure_Can_Be_Constructed_With_Null_LongName() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.IsNull(cmdOption.LongName, "Could not instantiate with null LongName"); + Assert.Null(cmdOption.LongName); //, "Could not instantiate with null LongName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Empty_LongName() { const string expectedShortName = "My short name"; @@ -74,10 +73,10 @@ public void Ensure_Can_Be_Constructed_With_Empty_LongName() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedLongName, cmdOption.LongName, "Could not instantiate with empty LongName"); + Assert.Equal(expectedLongName, cmdOption.LongName); //, "Could not instantiate with empty LongName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Whitespace_Only_LongName() { const string expectedShortName = "My short name"; @@ -86,10 +85,10 @@ public void Ensure_Can_Be_Constructed_With_Whitespace_Only_LongName() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedLongName, cmdOption.LongName, "Could not instantiate with whitespace only LongName"); + Assert.Equal(expectedLongName, cmdOption.LongName); //, "Could not instantiate with whitespace only LongName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Valid_LongName() { const string expectedShortName = null; @@ -99,10 +98,10 @@ public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Valid_LongName() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedShortName, cmdOption.ShortName, "Could not instantiate with null ShortName"); + Assert.Equal(expectedShortName, cmdOption.ShortName); //, "Could not instantiate with null ShortName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Valid_LongName() { const string expectedShortName = ""; @@ -111,10 +110,10 @@ public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Valid_LongName() var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedShortName, cmdOption.ShortName, "Could not instantiate with empty ShortName"); + Assert.Equal(expectedShortName, cmdOption.ShortName); //, "Could not instantiate with empty ShortName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Whitespace_Only_ShortName_And_Valid_LongName() { const string expectedShortName = " "; @@ -123,10 +122,10 @@ public void Ensure_Can_Be_Constructed_With_Whitespace_Only_ShortName_And_Valid_L var cmdOption = new CommandLineOption(expectedShortName, expectedLongName, mockParser); - Assert.AreEqual(expectedShortName, cmdOption.ShortName, "Could not instantiate with whitespace only ShortName"); + Assert.Equal(expectedShortName, cmdOption.ShortName); //, "Could not instantiate with whitespace only ShortName"); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Null_LongName() { const string invalidShortName = null; @@ -137,7 +136,7 @@ public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Null_LongName() new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Null_LongName() { const string invalidShortName = ""; @@ -148,7 +147,7 @@ public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Null_LongName() new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Null_LongName() { const string invalidShortName = " "; @@ -159,7 +158,7 @@ public void Ensure_Can_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Null_Lon new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Empty_LongName() { const string invalidShortName = null; @@ -170,7 +169,7 @@ public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_Empty_LongName() new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Empty_LongName() { const string invalidShortName = ""; @@ -181,7 +180,7 @@ public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_Empty_LongName() new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Empty_LongName() { const string invalidShortName = " "; @@ -192,7 +191,7 @@ public void Ensure_Can_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_Empty_Lo new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_WhiteSpaceOnly_LongName() { const string invalidShortName = null; @@ -203,7 +202,7 @@ public void Ensure_Can_Be_Constructed_With_Null_ShortName_And_WhiteSpaceOnly_Lon new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_WhiteSpaceOnly_LongName() { const string invalidShortName = ""; @@ -214,7 +213,7 @@ public void Ensure_Can_Be_Constructed_With_Empty_ShortName_And_WhiteSpaceOnly_Lo new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] + [Fact] public void Ensure_Canot_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_WhiteSpaceOnly_LongName() { const string invalidShortName = " "; @@ -225,8 +224,8 @@ public void Ensure_Canot_Be_Constructed_With_WhiteSpaceOnly_ShortName_And_WhiteS new CommandLineOption(invalidShortName, invalidLongName, mockParser); } - [Test] - [ExpectedException(typeof(ArgumentNullException))] + [Fact] + //[ExpectedException(typeof(ArgumentNullException))] public void Ensure_Cannot_Be_Constructed_With_Null_Parser() { const string expectedShortName = "My short name"; @@ -239,40 +238,41 @@ public void Ensure_Cannot_Be_Constructed_With_Null_Parser() #region HasLongName Tests - [Test] + [Fact] public void Ensure_Returns_False_If_Null_LongName_Provided() { ICommandLineOption cmdOption = new CommandLineOption("s", null, Mock.Of>()); - Assert.IsFalse(cmdOption.HasLongName); + Assert.False(cmdOption.HasLongName); } - [Test] + [Fact] public void Ensure_Returns_False_If_WhiteSpace_LongName_Provided() { ICommandLineOption cmdOption = new CommandLineOption("s", " ", Mock.Of>()); - Assert.IsFalse(cmdOption.HasLongName); + Assert.False(cmdOption.HasLongName); } - [Test] + [Fact] public void Ensure_Returns_False_If_Empty_LongName_Provided() { ICommandLineOption cmdOption = new CommandLineOption("s", string.Empty, Mock.Of>()); - Assert.IsFalse(cmdOption.HasLongName); + Assert.False(cmdOption.HasLongName); } - [Test] + [Fact] public void Ensure_Returns_True_If_LongName_Provided() { ICommandLineOption cmdOption = new CommandLineOption("s", "long name", Mock.Of>()); - Assert.IsTrue(cmdOption.HasLongName); + Assert.True(cmdOption.HasLongName); } #endregion HasLongName Tests + #region Bind Tests - [Test] - [ExpectedException(typeof(OptionSyntaxException))] + [Fact] + //// [ExpectedException(typeof(OptionSyntaxException))] public void Ensure_That_If_Value_Is_Null_Cannot_Be_Parsed_And_No_Default_Set_Then_optionSyntaxException_Is_Thrown() { var option = new ParsedOption(); @@ -286,8 +286,8 @@ public void Ensure_That_If_Value_Is_Null_Cannot_Be_Parsed_And_No_Default_Set_The } - [Test] - [ExpectedException(typeof(OptionSyntaxException))] + [Fact] + // [ExpectedException(typeof(OptionSyntaxException))] public void Ensure_That_If_Value_Is_Empty_Cannot_Be_Parsed_And_No_Default_Set_Then_optionSyntaxException_Is_Thrown() { var option = new ParsedOption(); @@ -301,8 +301,8 @@ public void Ensure_That_If_Value_Is_Empty_Cannot_Be_Parsed_And_No_Default_Set_Th } - [Test] - [ExpectedException(typeof(OptionSyntaxException))] + [Fact] + // [ExpectedException(typeof(OptionSyntaxException))] public void Ensure_That_If_Value_Is_Whitespace_Cannot_Be_Parsed_And_No_Default_Set_Then_optionSyntaxException_Is_Thrown() { var option = new ParsedOption(); diff --git a/FluentCommandLineParser.Tests/Internals/CommandLineParserEngineMark2TestsXUnit.cs b/FluentCommandLineParser.Tests/Internals/CommandLineParserEngineMark2TestsXUnit.cs index aeb0c77..545a97a 100644 --- a/FluentCommandLineParser.Tests/Internals/CommandLineParserEngineMark2TestsXUnit.cs +++ b/FluentCommandLineParser.Tests/Internals/CommandLineParserEngineMark2TestsXUnit.cs @@ -31,9 +31,10 @@ namespace Fclp.Tests.Internals { - public class SingleOptionInlineDataAttribute : InlineDataAttribute + /* + public class InlineDataAttribute : Fclp.Tests.Integration.InlineDataAttribute { - public SingleOptionInlineDataAttribute( + public InlineDataAttribute( string arguments, string expectedKeyChar, string expectedKey, @@ -43,9 +44,9 @@ public SingleOptionInlineDataAttribute( } } - public class DoubleOptionInlineDataAttribute : InlineDataAttribute + public class InlineDataAttribute : Fclp.Tests.Integration.InlineDataAttribute { - public DoubleOptionInlineDataAttribute( + public InlineDataAttribute( string arguments, string firstExpectedKeyChar, string firstExpectedKey, @@ -62,38 +63,38 @@ public DoubleOptionInlineDataAttribute( secondExpectedValue) { } - } + } */ public class CommandLineParserEngineMark2TestsXUnit: TestContextBase { [Theory] - [SingleOptionInlineData("-f", "-", "f", null)] - [SingleOptionInlineData("/f", "/", "f", null)] - [SingleOptionInlineData("--f", "--", "f", null)] - [SingleOptionInlineData("-f apple", "-", "f", "apple")] - [SingleOptionInlineData("/f apple", "/", "f", "apple")] - [SingleOptionInlineData("--f apple", "--", "f", "apple")] - [SingleOptionInlineData("-f", "-", "f", null)] - [SingleOptionInlineData("/fruit", "/", "fruit", null)] - [SingleOptionInlineData("--fruit", "--", "fruit", null)] - [SingleOptionInlineData("/fruit apple", "/", "fruit", "apple")] - [SingleOptionInlineData("--fruit apple", "--", "fruit", "apple")] - [SingleOptionInlineData("-f apple", "-", "f", "apple")] - [SingleOptionInlineData("/fruit:apple", "/", "fruit", "apple")] - [SingleOptionInlineData("--fruit:apple", "--", "fruit", "apple")] - [SingleOptionInlineData("-f:apple", "-", "f", "apple")] - [SingleOptionInlineData("/fruit=apple", "/", "fruit", "apple")] - [SingleOptionInlineData("--fruit=apple", "--", "fruit", "apple")] - [SingleOptionInlineData("-f=apple", "-", "f", "apple")] - [SingleOptionInlineData("/fruit 'apple pear plum'", "/", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("--fruit 'apple pear plum'", "--", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("-f 'apple pear plum'", "-", "f", "'apple pear plum'")] - [SingleOptionInlineData("/fruit:'apple pear plum'", "/", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("--fruit:'apple pear plum'", "--", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("-f:'apple pear plum'", "-", "f", "'apple pear plum'")] - [SingleOptionInlineData("/fruit='apple pear plum'", "/", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("--fruit='apple pear plum'", "--", "fruit", "'apple pear plum'")] - [SingleOptionInlineData("-f='apple pear plum'", "-", "f", "'apple pear plum'")] + [InlineData("-f", "-", "f", null)] + [InlineData("/f", "/", "f", null)] + [InlineData("--f", "--", "f", null)] + [InlineData("-f apple", "-", "f", "apple")] + [InlineData("/f apple", "/", "f", "apple")] + [InlineData("--f apple", "--", "f", "apple")] + [InlineData("-f", "-", "f", null)] + [InlineData("/fruit", "/", "fruit", null)] + [InlineData("--fruit", "--", "fruit", null)] + [InlineData("/fruit apple", "/", "fruit", "apple")] + [InlineData("--fruit apple", "--", "fruit", "apple")] + [InlineData("-f apple", "-", "f", "apple")] + [InlineData("/fruit:apple", "/", "fruit", "apple")] + [InlineData("--fruit:apple", "--", "fruit", "apple")] + [InlineData("-f:apple", "-", "f", "apple")] + [InlineData("/fruit=apple", "/", "fruit", "apple")] + [InlineData("--fruit=apple", "--", "fruit", "apple")] + [InlineData("-f=apple", "-", "f", "apple")] + [InlineData("/fruit 'apple pear plum'", "/", "fruit", "'apple pear plum'")] + [InlineData("--fruit 'apple pear plum'", "--", "fruit", "'apple pear plum'")] + [InlineData("-f 'apple pear plum'", "-", "f", "'apple pear plum'")] + [InlineData("/fruit:'apple pear plum'", "/", "fruit", "'apple pear plum'")] + [InlineData("--fruit:'apple pear plum'", "--", "fruit", "'apple pear plum'")] + [InlineData("-f:'apple pear plum'", "-", "f", "'apple pear plum'")] + [InlineData("/fruit='apple pear plum'", "/", "fruit", "'apple pear plum'")] + [InlineData("--fruit='apple pear plum'", "--", "fruit", "'apple pear plum'")] + [InlineData("-f='apple pear plum'", "-", "f", "'apple pear plum'")] public void should_parse_single_options_correctly( string arguments, string expectedPrefix, @@ -119,33 +120,33 @@ public void should_parse_single_options_correctly( } [Theory] - [DoubleOptionInlineData("-f -v", "-", "f", null, "-", "v", null)] - [DoubleOptionInlineData("/f /v", "/", "f", null, "/", "v", null)] - [DoubleOptionInlineData("--f --v", "--", "f", null, "--", "v", null)] - [DoubleOptionInlineData("-f apple -v onion", "-", "f", "apple", "-", "v", "onion")] - [DoubleOptionInlineData("/f apple /v onion", "/", "f", "apple", "/", "v", "onion")] - [DoubleOptionInlineData("--f apple --v onion", "--", "f", "apple", "--", "v", "onion")] - [DoubleOptionInlineData("-f -v", "-", "f", null, "-", "v", null)] - [DoubleOptionInlineData("/fruit /vegetable", "/", "fruit", null, "/", "vegetable", null)] - [DoubleOptionInlineData("--fruit --vegetable", "--", "fruit", null, "--", "vegetable", null)] - [DoubleOptionInlineData("/fruit apple /vegetable onion", "/", "fruit", "apple", "/", "vegetable", "onion")] - [DoubleOptionInlineData("--fruit apple --vegetable onion", "--", "fruit", "apple", "--", "vegetable", "onion")] - [DoubleOptionInlineData("-f apple -v onion", "-", "f", "apple", "-", "v", "onion")] - [DoubleOptionInlineData("/fruit:apple /vegetable:onion", "/", "fruit", "apple", "/", "vegetable", "onion")] - [DoubleOptionInlineData("--fruit:apple --vegetable:onion", "--", "fruit", "apple", "--", "vegetable", "onion")] - [DoubleOptionInlineData("-f:apple -v: onion", "-", "f", "apple", "-", "v", "onion")] - [DoubleOptionInlineData("/fruit=apple /vegetable=onion", "/", "fruit", "apple", "/", "vegetable", "onion")] - [DoubleOptionInlineData("--fruit=apple --vegetable=onion", "--", "fruit", "apple", "--", "vegetable", "onion")] - [DoubleOptionInlineData("-f=apple -v=onion", "-", "f", "apple", "-", "v", "onion")] - [DoubleOptionInlineData("/fruit 'apple pear plum' /vegetable 'onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("--fruit 'apple pear plum' --vegetable 'onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("-f 'apple pear plum' -v 'onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] - [DoubleOptionInlineData("/fruit:'apple pear plum' /vegetable:'onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("--fruit:'apple pear plum' --vegetable:'onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("-f:'apple pear plum' -v:'onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] - [DoubleOptionInlineData("/fruit='apple pear plum' /vegetable='onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("--fruit='apple pear plum' --vegetable='onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] - [DoubleOptionInlineData("-f='apple pear plum' -v='onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] + [InlineData("-f -v", "-", "f", null, "-", "v", null)] + [InlineData("/f /v", "/", "f", null, "/", "v", null)] + [InlineData("--f --v", "--", "f", null, "--", "v", null)] + [InlineData("-f apple -v onion", "-", "f", "apple", "-", "v", "onion")] + [InlineData("/f apple /v onion", "/", "f", "apple", "/", "v", "onion")] + [InlineData("--f apple --v onion", "--", "f", "apple", "--", "v", "onion")] + [InlineData("-f -v", "-", "f", null, "-", "v", null)] + [InlineData("/fruit /vegetable", "/", "fruit", null, "/", "vegetable", null)] + [InlineData("--fruit --vegetable", "--", "fruit", null, "--", "vegetable", null)] + [InlineData("/fruit apple /vegetable onion", "/", "fruit", "apple", "/", "vegetable", "onion")] + [InlineData("--fruit apple --vegetable onion", "--", "fruit", "apple", "--", "vegetable", "onion")] + [InlineData("-f apple -v onion", "-", "f", "apple", "-", "v", "onion")] + [InlineData("/fruit:apple /vegetable:onion", "/", "fruit", "apple", "/", "vegetable", "onion")] + [InlineData("--fruit:apple --vegetable:onion", "--", "fruit", "apple", "--", "vegetable", "onion")] + [InlineData("-f:apple -v: onion", "-", "f", "apple", "-", "v", "onion")] + [InlineData("/fruit=apple /vegetable=onion", "/", "fruit", "apple", "/", "vegetable", "onion")] + [InlineData("--fruit=apple --vegetable=onion", "--", "fruit", "apple", "--", "vegetable", "onion")] + [InlineData("-f=apple -v=onion", "-", "f", "apple", "-", "v", "onion")] + [InlineData("/fruit 'apple pear plum' /vegetable 'onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] + [InlineData("--fruit 'apple pear plum' --vegetable 'onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] + [InlineData("-f 'apple pear plum' -v 'onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] + [InlineData("/fruit:'apple pear plum' /vegetable:'onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] + [InlineData("--fruit:'apple pear plum' --vegetable:'onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] + [InlineData("-f:'apple pear plum' -v:'onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] + [InlineData("/fruit='apple pear plum' /vegetable='onion carrot peas'", "/", "fruit", "'apple pear plum'", "/", "vegetable", "'onion carrot peas'")] + [InlineData("--fruit='apple pear plum' --vegetable='onion carrot peas'", "--", "fruit", "'apple pear plum'", "--", "vegetable", "'onion carrot peas'")] + [InlineData("-f='apple pear plum' -v='onion carrot peas'", "-", "f", "'apple pear plum'", "-", "v", "'onion carrot peas'")] public void should_parse_double_options_correctly( string arguments, string firstExpectedKeyChar, diff --git a/FluentCommandLineParser.Tests/Internals/Errors/ExpectedOptionNotFoundParseErrorTests.cs b/FluentCommandLineParser.Tests/Internals/Errors/ExpectedOptionNotFoundParseErrorTests.cs index cfa6685..c42bfb1 100644 --- a/FluentCommandLineParser.Tests/Internals/Errors/ExpectedOptionNotFoundParseErrorTests.cs +++ b/FluentCommandLineParser.Tests/Internals/Errors/ExpectedOptionNotFoundParseErrorTests.cs @@ -25,27 +25,27 @@ #endregion using System; -using NUnit.Framework; +using Fclp.Internals; +using Fclp.Internals.Errors; using Moq; +using Xunit; namespace FluentCommandLineParser.Internals.Errors { - [TestFixture] public class ExpectedOptionNotFoundParseErrorTests { - [Test] + [Fact] public void Ensure_Can_Be_Constructed() { var cmdOption = Mock.Of(); var snfError = new ExpectedOptionNotFoundParseError(cmdOption); - Assert.AreSame(cmdOption, snfError.Option); + Assert.Same(cmdOption, snfError.Option); } - [Test] - [ExpectedException(typeof(ArgumentNullException))] + [Fact] public void Ensure_Cannot_Specify_Null_option() { - new ExpectedOptionNotFoundParseError(null); + Assert.Throws( () => new ExpectedOptionNotFoundParseError(null)); } } } diff --git a/FluentCommandLineParser.Tests/Internals/TestContextBase.cs b/FluentCommandLineParser.Tests/Internals/TestContextBase.cs index 06f64aa..7d94fb0 100644 --- a/FluentCommandLineParser.Tests/Internals/TestContextBase.cs +++ b/FluentCommandLineParser.Tests/Internals/TestContextBase.cs @@ -28,8 +28,8 @@ using Fclp.Internals.Extensions; using Machine.Specifications; using Moq; -using Ploeh.AutoFixture; -using Ploeh.AutoFixture.AutoMoq; +using AutoFixture; +using AutoFixture.AutoMoq; namespace Fclp.Tests.Internals { diff --git a/FluentCommandLineParser.Tests/Internals/Validators/OptionNameValidatorTests.cs b/FluentCommandLineParser.Tests/Internals/Validators/OptionNameValidatorTests.cs index 9ad9e8a..cf3946f 100644 --- a/FluentCommandLineParser.Tests/Internals/Validators/OptionNameValidatorTests.cs +++ b/FluentCommandLineParser.Tests/Internals/Validators/OptionNameValidatorTests.cs @@ -75,7 +75,7 @@ class when_the_short_name_is_whitespace : ValidateTestContext Establish context = () => SetupOptionWith(shortName: " "); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_short_name_contains_a_colon : ValidateTestContext @@ -83,7 +83,7 @@ class when_the_short_name_contains_a_colon : ValidateTestContext Establish context = () => SetupOptionWith(shortName: ":"); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_short_name_contains_an_equality_sign : ValidateTestContext @@ -91,7 +91,7 @@ class when_the_short_name_contains_an_equality_sign : ValidateTestContext Establish context = () => SetupOptionWith(shortName: "="); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_short_name_is_empty : ValidateTestContext @@ -107,7 +107,7 @@ class when_the_short_name_is_a_control_char : ValidateTestContext Establish context = () => SetupOptionWith(shortName: ((char)7).ToString(CultureInfo.InvariantCulture)); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_short_name_is_longer_than_one_char : ValidateTestContext @@ -115,7 +115,7 @@ class when_the_short_name_is_longer_than_one_char : ValidateTestContext Establish context = () => SetupOptionWith(shortName: CreateStringOfLength(2)); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_short_name_is_one_char : ValidateTestContext @@ -139,7 +139,7 @@ class when_the_long_name_is_whitespace : ValidateTestContext Establish context = () => SetupOptionWith(longName: " "); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_contains_a_colon : ValidateTestContext @@ -147,7 +147,7 @@ class when_the_long_name_contains_a_colon : ValidateTestContext Establish context = () => SetupOptionWith(longName: ValidLongName + ":"); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_contains_an_equality_sign : ValidateTestContext @@ -155,7 +155,7 @@ class when_the_long_name_contains_an_equality_sign : ValidateTestContext Establish context = () => SetupOptionWith(longName: ValidLongName + "="); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_is_empty : ValidateTestContext @@ -179,7 +179,7 @@ class when_the_long_name_is_one_char : ValidateTestContext Establish context = () => SetupOptionWith(longName: CreateStringOfLength(1)); - It should_throw_a_too_long_error = () => error.ShouldBeOfType(); + It should_throw_a_too_long_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_contains_whitespace: ValidateTestContext @@ -187,7 +187,7 @@ class when_the_long_name_contains_whitespace: ValidateTestContext Establish context = () => SetupOptionWith(longName: ValidLongName + " " + ValidLongName); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_is_null_and_the_short_name_is_null : ValidateTestContext @@ -195,7 +195,7 @@ class when_the_long_name_is_null_and_the_short_name_is_null : ValidateTestContex Establish context = () => SetupOptionWith(shortName: null, longName: null); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } class when_the_long_name_is_empty_and_the_short_name_is_empty : ValidateTestContext @@ -203,7 +203,7 @@ class when_the_long_name_is_empty_and_the_short_name_is_empty : ValidateTestCont Establish context = () => SetupOptionWith(shortName: string.Empty, longName: string.Empty); - It should_throw_an_error = () => error.ShouldBeOfType(); + It should_throw_an_error = () => error.ShouldBeOfExactType(); } } } diff --git a/FluentCommandLineParser.Tests/Mspec/CommandLineParserEngine/TestContext/CommandLineParserEngineTestContext.cs b/FluentCommandLineParser.Tests/Mspec/CommandLineParserEngine/TestContext/CommandLineParserEngineTestContext.cs index 06833dc..b33eecc 100644 --- a/FluentCommandLineParser.Tests/Mspec/CommandLineParserEngine/TestContext/CommandLineParserEngineTestContext.cs +++ b/FluentCommandLineParser.Tests/Mspec/CommandLineParserEngine/TestContext/CommandLineParserEngineTestContext.cs @@ -29,12 +29,12 @@ using System.Linq; using FluentCommandLineParser.Internals; using Machine.Specifications; - +/* namespace FluentCommandLineParser.Tests { namespace CommandLineParserEngineTests { - [Subject(typeof(CommandLineParserEngine), "CommandLineParserEngine")] + [Subject(typeof(CommandLineParserEngineMark2), "CommandLineParserEngine")] public abstract class CommandLineParserEngineTestContext { protected static Exception error; @@ -50,4 +50,4 @@ protected static void RunParserWith(string[] args) } } } -} \ No newline at end of file +} */ \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/Properties/AssemblyInfo.cs b/FluentCommandLineParser.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index 630d201..0000000 --- a/FluentCommandLineParser.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,53 +0,0 @@ -#region License -// AssemblyInfo.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FluentCommandLineParser.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("FluentCommandLineParser")] -[assembly: AssemblyCopyright("Copyright © Simon Williams 2012 - 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: CLSCompliant(true)] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9dc00720-9d8b-4315-974b-395feb71e827")] - -// !! DO NOT CHANGE - VERSIONS ARE HANDLED AUTOMATICALLY FROM THE CONTINUOUS INTEGRATION SERVER!! -[assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.0.0.0")] - diff --git a/FluentCommandLineParser.Tests/UriTests.cs b/FluentCommandLineParser.Tests/UriTests.cs index 428b55f..fdc1cca 100644 --- a/FluentCommandLineParser.Tests/UriTests.cs +++ b/FluentCommandLineParser.Tests/UriTests.cs @@ -2,14 +2,13 @@ using System.Collections.Generic; using System.Linq; using Fclp.Internals.Extensions; -using NUnit.Framework; +using Xunit; namespace Fclp.Tests { /// /// Tests for Uris /// - [TestFixture] public class UriTests { public class ExampleArgsContainer @@ -18,7 +17,7 @@ public class ExampleArgsContainer public Uri Uri { get; set; } } - [Test] + [Fact] public void GenericFclp_UriAsString() { const char shortKey = 'u'; @@ -36,13 +35,13 @@ public void GenericFclp_UriAsString() var result = fclp.Parse(combination.Args); - Assert.IsEmpty(result.Errors); - Assert.IsEmpty(result.AdditionalOptionsFound); - Assert.AreEqual(uri, fclp.Object.UriAsString); + Assert.Empty(result.Errors); + Assert.Empty(result.AdditionalOptionsFound); + Assert.Equal(uri, fclp.Object.UriAsString); } } - [Test] + [Fact] public void StandardFclp_UriAsString() { const char shortKey = 'u'; @@ -59,13 +58,13 @@ public void StandardFclp_UriAsString() var result = fclp.Parse(combination.Args); - Assert.IsEmpty(result.Errors); - Assert.IsEmpty(result.AdditionalOptionsFound); - Assert.AreEqual(uri, uriAsString); + Assert.Empty(result.Errors); + Assert.Empty(result.AdditionalOptionsFound); + Assert.Equal(uri, uriAsString); } } - [Test] + [Fact] public void GenericFclp_Uri() { const char shortKey = 'u'; @@ -83,13 +82,13 @@ public void GenericFclp_Uri() var result = fclp.Parse(combination.Args); - Assert.IsEmpty(result.Errors); - Assert.IsEmpty(result.AdditionalOptionsFound); - Assert.AreEqual(uri, fclp.Object.Uri.AbsoluteUri); + Assert.Empty(result.Errors); + Assert.Empty(result.AdditionalOptionsFound); + Assert.Equal(uri, fclp.Object.Uri.AbsoluteUri); } } - [Test] + [Fact] public void StandardFclp_Uri() { const char shortKey = 'u'; @@ -106,9 +105,9 @@ public void StandardFclp_Uri() var result = fclp.Parse(combination.Args); - Assert.IsEmpty(result.Errors); - Assert.IsEmpty(result.AdditionalOptionsFound); - Assert.AreEqual(uri, actualUri.AbsoluteUri); + Assert.Empty(result.Errors); + Assert.Empty(result.AdditionalOptionsFound); + Assert.Equal(uri, actualUri.AbsoluteUri); } } diff --git a/FluentCommandLineParser.Tests/app.config b/FluentCommandLineParser.Tests/app.config deleted file mode 100644 index 3415220..0000000 --- a/FluentCommandLineParser.Tests/app.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FluentCommandLineParser.Tests/packages.config b/FluentCommandLineParser.Tests/packages.config deleted file mode 100644 index 49f23ad..0000000 --- a/FluentCommandLineParser.Tests/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/FluentCommandLineParser.sln b/FluentCommandLineParser.sln index 671975e..836f7b9 100644 --- a/FluentCommandLineParser.sln +++ b/FluentCommandLineParser.sln @@ -3,10 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser", "FluentCommandLineParser\FluentCommandLineParser.csproj", "{74CDFA61-81D8-40F2-B536-949BABA15D3E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser.Tests", "FluentCommandLineParser.Tests\FluentCommandLineParser.Tests.csproj", "{A2546703-0B86-4515-BE5B-FAF85B756BDC}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D8DCB1C2-5F18-4F40-A583-723975F89C1A}" ProjectSection(SolutionItems) = preProject .nuget\NuGet.Config = .nuget\NuGet.Config @@ -14,38 +10,36 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D8DCB1 .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{D91A0B4C-0A5D-44CF-A727-2A72AE0165AD}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FluentCommandLineParser", "Core\FluentCommandLineParser\FluentCommandLineParser.xproj", "{6CAADCEE-649E-4ED2-A7E6-BDB621776055}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D99A89F2-12E3-402E-8E3A-9EFAFCF2BC76}" ProjectSection(SolutionItems) = preProject global.json = global.json + LICENCE.txt = LICENCE.txt + README.md = README.md + .gitignore = .gitignore EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser", "FluentCommandLineParser\FluentCommandLineParser.csproj", "{BD83873B-353B-4742-AA1A-C93F6A279021}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCommandLineParser.Tests", "FluentCommandLineParser.Tests\FluentCommandLineParser.Tests.csproj", "{9F46727C-533F-40D5-A59B-062C57F36B19}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {74CDFA61-81D8-40F2-B536-949BABA15D3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {74CDFA61-81D8-40F2-B536-949BABA15D3E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {74CDFA61-81D8-40F2-B536-949BABA15D3E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {74CDFA61-81D8-40F2-B536-949BABA15D3E}.Release|Any CPU.Build.0 = Release|Any CPU - {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A2546703-0B86-4515-BE5B-FAF85B756BDC}.Release|Any CPU.Build.0 = Release|Any CPU - {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6CAADCEE-649E-4ED2-A7E6-BDB621776055}.Release|Any CPU.Build.0 = Release|Any CPU + {BD83873B-353B-4742-AA1A-C93F6A279021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD83873B-353B-4742-AA1A-C93F6A279021}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD83873B-353B-4742-AA1A-C93F6A279021}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD83873B-353B-4742-AA1A-C93F6A279021}.Release|Any CPU.Build.0 = Release|Any CPU + {9F46727C-533F-40D5-A59B-062C57F36B19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F46727C-533F-40D5-A59B-062C57F36B19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F46727C-533F-40D5-A59B-062C57F36B19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F46727C-533F-40D5-A59B-062C57F36B19}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {6CAADCEE-649E-4ED2-A7E6-BDB621776055} = {D91A0B4C-0A5D-44CF-A727-2A72AE0165AD} EndGlobalSection EndGlobal diff --git a/FluentCommandLineParser/FluentCommandLineParser.csproj b/FluentCommandLineParser/FluentCommandLineParser.csproj index 2d395aa..e42bc7c 100644 --- a/FluentCommandLineParser/FluentCommandLineParser.csproj +++ b/FluentCommandLineParser/FluentCommandLineParser.csproj @@ -1,130 +1,7 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {74CDFA61-81D8-40F2-B536-949BABA15D3E} - Library - Properties - Fclp - FluentCommandLineParser - v3.5 - 512 - Client - ..\ - - - true - full - false - bin\debug\ - DEBUG;TRACE - prompt - 4 - bin\debug\FluentCommandLineParser.xml - true - true - AllRules.ruleset - - - pdbonly - true - bin\release\ - TRACE - prompt - 4 - bin\release\FluentCommandLineParser.xml - true - true - AllRules.ruleset - - - false - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + netstandard2.0; + + + diff --git a/FluentCommandLineParser/FluentCommandLineParser.nuspec b/FluentCommandLineParser/FluentCommandLineParser.nuspec deleted file mode 100644 index bec217d..0000000 --- a/FluentCommandLineParser/FluentCommandLineParser.nuspec +++ /dev/null @@ -1,23 +0,0 @@ - - - - FluentCommandLineParser - Fluent Command Line Parser - $version$ - siywilliams - siywilliams - http://fclp.github.com/fluent-command-line-parser - false - A simple, strongly typed .NET C# command line parser library using a fluent easy to use interface - https://github.com/fclp/fluent-command-line-parser/wiki/Release-Notes - Copyright Simon Williams 2012 - 2013 - fluent command line parser commandline c# net35 - - - - - - - - - \ No newline at end of file diff --git a/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs b/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs index 3b539d7..e27ddd9 100644 --- a/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs +++ b/FluentCommandLineParser/Internals/Parsing/OptionParsers/CommandLineOptionParserFactory.cs @@ -58,7 +58,7 @@ public CommandLineOptionParserFactory() this.AddOrReplace(new NullableCommandLineOptionParser(this)); } - internal Dictionary Parsers { get; set; } + public Dictionary Parsers { get; set; } /// /// Adds the specified to this factories list of supported parsers. diff --git a/FluentCommandLineParser/Properties/AssemblyInfo.cs b/FluentCommandLineParser/Properties/AssemblyInfo.cs deleted file mode 100644 index dd679cd..0000000 --- a/FluentCommandLineParser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -#region License -// AssemblyInfo.cs -// Copyright (c) 2013, Simon Williams -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are permitted provide -// d that the following conditions are met: -// -// Redistributions of source code must retain the above copyright notice, this list of conditions and the -// following disclaimer. -// -// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -// the following disclaimer in the documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#endregion - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Fluent Command Line Parser")] -[assembly: AssemblyDescription("A simple, strongly typed .NET C# command line parser library using a fluent easy to use interface.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Fluent Command Line Parser")] -[assembly: AssemblyCopyright("Copyright © Simon Williams 2012 - 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: CLSCompliant(true)] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b563a988-ae88-4bcc-b6ab-e167f941a167")] - -// Allows us to unit test the 'internals' -//[assembly: InternalsVisibleTo("FluentCommandLineParser.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ad2e88658ff62cac7d7ececd3ac22c6d39ee4e19a09d61acae936f9497df38fa3db020d2b607c8176cd754c7e3a8cdc10559bedcbaaeed76e277f0d009b39bab687261567a1f2da2c3d63b913822ee944664e29bcb85d6b49b87c7d6ee44647ec5252379ed5e4c09d787f6753cf2fdf4a1c1890eedc655738d466bb6f3b91396")] -[assembly: InternalsVisibleTo("FluentCommandLineParser.Tests")] -// !! DO NOT CHANGE - VERSIONS ARE HANDLED AUTOMATICALLY FROM THE CONTINUOUS INTEGRATION SERVER!! -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/global.json b/global.json index d979fbd..d78a284 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "projects": [ "Core"], "sdk": { - "version": "1.0.0-preview2-003121" + "version": "2.1.403" } } \ No newline at end of file