• APIブラウザ
  • 設計思想
Show / Hide Table of Contents
  • ExapisSOP
    • AppWorker
    • ContextEventArgs
    • HostRunner
    • IConfiguration
    • IContext
    • IPipeline
    • IProcess
    • IProcess<TParam, TResult>
    • IService
    • TerminationEventArgs
    • TerminationException
    • TerminationReason
    • UnhandledErrorEventArgs
    • VersionInfo
  • ExapisSOP.Binary
    • DataValue
  • ExapisSOP.Core
    • ConfigurationExtensions
    • ContextExtensions
    • CustomPipelineProcess<TParam, TResult>
    • ImmutablePipeline
    • Pipeline
    • PipelineExtensions
    • PipelineExtensions.ExceptionHandler
    • PipelineExtensions.ExceptionHandler<TParam, TResult>
    • PipelineExtensions.LoggingProcess
    • PipelineExtensions.NextProcessFunc
    • PipelineExtensions.ProcessFunc
    • PipelineExtensions.ProcessFunc<TParam, TResult>
    • PipelineExtensions.ProcessFuncWrapper
    • PipelineExtensions.ProcessFuncWrapper<TParam, TResult>
  • ExapisSOP.Globalization
    • EnglishErrorReportBuilder
    • JapaneseErrorReportBuilder
  • ExapisSOP.IO
    • CachedStream
    • DefaultPath
    • FileSystemServiceOptions
    • FileSystemServiceOptionsExtensions
    • IFileSystemService
    • InvalidPathFormatException
    • IPathList
    • Paths
    • PathString
    • PathStringFormatter
  • ExapisSOP.IO.Logging
    • ConsoleLogger
    • DefaultErrorDetailProvider
    • ErrorReportBuilder
    • ExceptionRecord
    • HResultDetailProvider
    • ICustomErrorDetailProvider
    • ILogFile
    • ILoggable
    • ILogger
    • ILoggingSystemService
    • LogData
    • LogFile
    • LogFileType
    • Logger
    • LoggerExtension
    • LoggingSystemServiceOptions
    • LoggingSystemServiceOptions.CreateLogFile
    • LogLevel
    • LongMessageRecord
    • MultipleLogger
    • OutputStreamLogger
  • ExapisSOP.IO.Settings
    • CustomSettings
    • DataStore
    • DefaultSettings
    • EnvironmentSettings
    • ISettingsSystemService
    • OptimizedSettings
    • SettingsSystemServiceOptions
    • SettingsSystemServiceOptions.ConfirmVersionInfo
    • SettingsSystemServiceOptions.GetVersionInfo
  • ExapisSOP.IO.Settings.CommandLine
    • CommandLineConverter
    • CommandLineParser
    • CommandLineServiceOptions
    • CommandLineServiceOptions.CreateConverterMappingTable
    • FileNameList
    • IArgumentConverter
    • IArgumentConverter<T>
    • ICommandLineService
    • ManualAttribute
    • Option
    • Option.Value
    • OptionAttribute
    • Switch
    • SwitchAttribute
  • ExapisSOP.NativeWrapper
    • INativeCaller
    • WinAPI
  • ExapisSOP.NativeWrapper.Windows
    • Kernel32
  • ExapisSOP.Numerics
    • CryptionRandom
    • IRandom
    • LinearCongruentialGenerator
    • RandomExtension
    • SerializableRandom
    • SystemRandom
    • Xorshift
    • Xorshift2
  • ExapisSOP.Text
    • SimpleEncoding
    • SimpleString
  • ExapisSOP.Utils
    • ArrayExtensions
    • ConsoleUtil
    • DisposableBase
    • IAwaitable<T>
    • IAwaiter<T>
    • IUtilityService
    • SecureStringExtensions
    • SerializationInfoExtensions
    • StringExtensions
    • StringUtil
    • UtilityConfigurationExtensions
    • UtilityContextExtensions

CommandLineParser クラス

コマンド行引数を解析します。 このクラスは静的クラスです。

継承
System.Object
CommandLineParser
継承されたメンバー
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
名前空間: ExapisSOP.IO.Settings.CommandLine
アセンブリ: ExapisSOP.dll
構文
public static class CommandLineParser

メソッド 一覧

| 編集/提案 ソースを表示

Convert(IArgumentConverter, IEnumerable<String>)

コマンド行引数をオブジェクトへ変換します。

宣言
public static object Convert(this IArgumentConverter converter, IEnumerable<string> args)
引数
型 名前 説明
IArgumentConverter converter

実際に変換を行うオブジェクトです。

System.Collections.Generic.IEnumerable<System.String> args

コマンド行引数の全部または一部を表す文字列の列挙体です。

戻り値
型 説明
System.Object

変換結果を表す新しいオブジェクトです。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

Convert<T>(IArgumentConverter<T>, IEnumerable<String>)

コマンド行引数を指定された型'T'へ変換します。

宣言
public static T Convert<T>(this IArgumentConverter<T> converter, IEnumerable<string> args)
引数
型 名前 説明
IArgumentConverter<T> converter

実際に変換を行うオブジェクトです。

System.Collections.Generic.IEnumerable<System.String> args

コマンド行引数の全部または一部を表す文字列配列です。

戻り値
型 説明
T

変換結果を表す新しい指定された型'T'のオブジェクトです。

型引数
名前 説明
T

変換後のオブジェクトです。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

DoShowHelp(Switch[])

コマンド行説明書を表示する事が求められているかどうかを表す論理値を取得します。

宣言
public static bool DoShowHelp(this Switch[] switches)
引数
型 名前 説明
Switch[] switches

コマンド行引数を表すスイッチの配列です。

戻り値
型 説明
System.Boolean

求められている場合はtrue、それ以外の場合はfalseを返します。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

DoShowVersion(Switch[])

バージョン情報を表示する事が求められているかどうかを表す論理値を取得します。

宣言
public static bool DoShowVersion(this Switch[] switches)
引数
型 名前 説明
Switch[] switches

コマンド行引数を表すスイッチの配列です。

戻り値
型 説明
System.Boolean

求められている場合はtrue、それ以外の場合はfalseを返します。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

GetCommandName(Switch[])

指定されたコマンド行引数を表すスイッチの配列からコマンド名を取得します。

宣言
public static string GetCommandName(this Switch[] switches)
引数
型 名前 説明
Switch[] switches

コマンド行引数を表すスイッチの配列です。

戻り値
型 説明
System.String

コマンド行引数で指定されているコマンド名、または、指定されていない場合はnullを返します。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

GetValue<T>(IDictionary<Type, Object>)

CommandLineConverterの変換結果から値を取得します。

宣言
public static T GetValue<T>(this IDictionary<Type, object> converterResult)
引数
型 名前 説明
System.Collections.Generic.IDictionary<System.Type, System.Object> converterResult

変換結果を格納している辞書です。

戻り値
型 説明
T

指定された型の値が存在する場合は有効なインスタンス、 または、存在しない場合はnullを返します。

型引数
名前 説明
T

取得する値の種類です。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

Parse(IEnumerable<String>)

指定されたコマンド行引数を表す配列を解析し、スイッチの配列へ変換します。

宣言
public static Switch[] Parse(IEnumerable<string> args)
引数
型 名前 説明
System.Collections.Generic.IEnumerable<System.String> args

解析するコマンド行引数を格納した列挙体です。

戻り値
型 説明
Switch[]

指定されたコマンド行引数と同じ内容を表すスイッチの配列です。

例外
型 条件
System.ArgumentNullException
| 編集/提案 ソースを表示

Parse(String[])

指定されたコマンド行引数を表す配列を解析し、スイッチの配列へ変換します。

宣言
public static Switch[] Parse(params string[] args)
引数
型 名前 説明
System.String[] args

解析するコマンド行引数を格納した配列です。

戻り値
型 説明
Switch[]

指定されたコマンド行引数と同じ内容を表すスイッチの配列です。

例外
型 条件
System.ArgumentNullException
  • 編集/提案
  • ソースを表示
Back to top Generated by DocFX