Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public Func<System.CommandLine.Parsing.ArgumentResult,T> DefaultValueFactory { get; set; }
public System.Boolean HasDefaultValue { get; }
public System.Type ValueType { get; }
public System.Void SetValueFactory(Func<System.CommandLine.Parsing.ArgumentResult,T> valueFactory, ValueFactoryInvocation invocation = WhenTokensMatched)
public struct ArgumentArity : System.ValueType, System.IEquatable<ArgumentArity>
public static ArgumentArity ExactlyOne { get; }
public static ArgumentArity OneOrMore { get; }
Expand Down Expand Up @@ -101,6 +102,7 @@
public Option<T> AcceptLegalFilePathsOnly()
public Option<T> AcceptOnlyFromAmong(System.String[] values)
public Option<T> AcceptOnlyFromAmong(System.StringComparer comparer, System.String[] values)
public System.Void SetValueFactory(Func<System.CommandLine.Parsing.ArgumentResult,T> valueFactory, ValueFactoryInvocation invocation = WhenTokensMatched)
public static class OptionValidation
public static Option<System.IO.FileInfo> AcceptExistingOnly(this Option<System.IO.FileInfo> option)
public static Option<System.IO.DirectoryInfo> AcceptExistingOnly(this Option<System.IO.DirectoryInfo> option)
Expand Down Expand Up @@ -150,6 +152,10 @@
public System.Collections.Generic.IEnumerable<Symbol> Parents { get; }
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
public System.String ToString()
public enum ValueFactoryInvocation : System.Enum, System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable
WhenTokensMatched=1
WhenTokensNotMatched=2
Always=3
public class VersionOption : Option
.ctor()
.ctor(System.String name, System.String[] aliases)
Expand Down
6 changes: 5 additions & 1 deletion src/System.CommandLine.Tests/CustomParsingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

namespace System.CommandLine.Tests;

#pragma warning disable CS0618 // Tests in this class intentionally exercise the obsolete legacy parsing API.

public class CustomParsingTests
{
[Fact]
Expand Down Expand Up @@ -986,4 +988,6 @@ public void GetResult_by_name_can_be_used_recursively_within_custom_option_parse
parseResult.GetValue<string>("--second").Should().Be("two");
parseResult.GetValue<string>("--third").Should().Be("three");
}
}
}

#pragma warning restore CS0618
Loading
Loading