ArgumentValidation.AcceptExistingOnly Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| AcceptExistingOnly(Argument<DirectoryInfo>) |
Configures an argument to accept only values corresponding to an existing directory. |
| AcceptExistingOnly(Argument<FileInfo>) |
Configures an argument to accept only values corresponding to an existing file. |
| AcceptExistingOnly(Argument<FileSystemInfo>) |
Configures an argument to accept only values corresponding to an existing file or directory. |
| AcceptExistingOnly<T>(Argument<T>) |
Configures an argument to accept only values corresponding to a existing files or directories. |
AcceptExistingOnly(Argument<DirectoryInfo>)
- Source:
- ArgumentValidation.cs
Configures an argument to accept only values corresponding to an existing directory.
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Argument<System::IO::DirectoryInfo ^> ^ AcceptExistingOnly(System::CommandLine::Argument<System::IO::DirectoryInfo ^> ^ argument);
public static System.CommandLine.Argument<System.IO.DirectoryInfo> AcceptExistingOnly(this System.CommandLine.Argument<System.IO.DirectoryInfo> argument);
static member AcceptExistingOnly : System.CommandLine.Argument<System.IO.DirectoryInfo> -> System.CommandLine.Argument<System.IO.DirectoryInfo>
<Extension()>
Public Function AcceptExistingOnly (argument As Argument(Of DirectoryInfo)) As Argument(Of DirectoryInfo)
Parameters
- argument
- Argument<DirectoryInfo>
The argument to configure.
Returns
The configured argument.
Applies to
AcceptExistingOnly(Argument<FileInfo>)
- Source:
- ArgumentValidation.cs
Configures an argument to accept only values corresponding to an existing file.
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Argument<System::IO::FileInfo ^> ^ AcceptExistingOnly(System::CommandLine::Argument<System::IO::FileInfo ^> ^ argument);
public static System.CommandLine.Argument<System.IO.FileInfo> AcceptExistingOnly(this System.CommandLine.Argument<System.IO.FileInfo> argument);
static member AcceptExistingOnly : System.CommandLine.Argument<System.IO.FileInfo> -> System.CommandLine.Argument<System.IO.FileInfo>
<Extension()>
Public Function AcceptExistingOnly (argument As Argument(Of FileInfo)) As Argument(Of FileInfo)
Parameters
Returns
The configured argument.
Applies to
AcceptExistingOnly(Argument<FileSystemInfo>)
- Source:
- ArgumentValidation.cs
Configures an argument to accept only values corresponding to an existing file or directory.
public:
[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Argument<System::IO::FileSystemInfo ^> ^ AcceptExistingOnly(System::CommandLine::Argument<System::IO::FileSystemInfo ^> ^ argument);
public static System.CommandLine.Argument<System.IO.FileSystemInfo> AcceptExistingOnly(this System.CommandLine.Argument<System.IO.FileSystemInfo> argument);
static member AcceptExistingOnly : System.CommandLine.Argument<System.IO.FileSystemInfo> -> System.CommandLine.Argument<System.IO.FileSystemInfo>
<Extension()>
Public Function AcceptExistingOnly (argument As Argument(Of FileSystemInfo)) As Argument(Of FileSystemInfo)
Parameters
- argument
- Argument<FileSystemInfo>
The argument to configure.
Returns
The configured argument.
Applies to
AcceptExistingOnly<T>(Argument<T>)
- Source:
- ArgumentValidation.cs
Configures an argument to accept only values corresponding to a existing files or directories.
public:
generic <typename T>
where T : System::Collections::Generic::IEnumerable<System::IO::FileSystemInfo ^>[System::Runtime::CompilerServices::Extension]
static System::CommandLine::Argument<T> ^ AcceptExistingOnly(System::CommandLine::Argument<T> ^ argument);
public static System.CommandLine.Argument<T> AcceptExistingOnly<T>(this System.CommandLine.Argument<T> argument) where T : System.Collections.Generic.IEnumerable<System.IO.FileSystemInfo>;
static member AcceptExistingOnly : System.CommandLine.Argument<#seq<System.IO.FileSystemInfo>> -> System.CommandLine.Argument<#seq<System.IO.FileSystemInfo>>
<Extension()>
Public Function AcceptExistingOnly(Of T As IEnumerable(Of FileSystemInfo)) (argument As Argument(Of T)) As Argument(Of T)
Type Parameters
- T
Parameters
- argument
- Argument<T>
The argument to configure.
Returns
The configured argument.