C# Class NConsoler.Consolery

Entry point for NConsoler applications
Afficher le fichier Open project: esbencarlsen/NCrawler

Private Properties

Свойство Type Description
BuildParameterArray object[]
CanBeConvertedToDate bool
CanBeNull bool
CheckActionMethodNamesAreNotReserved void
CheckAllRequiredParametersAreSet void
CheckAnyActionMethodExists void
CheckOptionalParametersAltNamesAreNotDuplicated void
CheckOptionalParametersAreAfterRequiredOnes void
CheckOptionalParametersAreNotDuplicated void
CheckOptionalParametersDefaultValuesAreAssignableToRealParameterTypes void
CheckRequiredAndOptionalAreNotAppliedAtTheSameTime void
CheckUnknownParametersAreNotPassed void
Consolery System
ConvertToDateTime System.DateTime
ConvertValue object
GetCurrentMethod System.Reflection.MethodInfo
GetDisplayName string
GetMethodByName System.Reflection.MethodInfo
GetMethodDescription string
GetOptional OptionalAttribute
GetParametersDescriptions string>.Dictionary
IfActionMethodIsSingleCheckMethodHasParameters void
InvokeMethod void
IsHelpRequested bool
IsOptional bool
IsRequired bool
IsSubcommandHelpRequested bool
MaxKeyLength int
OnlyOptionalParametersSpecified bool
OptionalParameters IEnumerable
ParameterName string
ParameterValue string
PrintGeneralMulticommandUsage void
PrintMethodDescription void
PrintParametersDescriptions void
PrintSubcommandUsage void
PrintUsage void
PrintUsage void
PrintUsageExample void
ProgramName string
RequiredParameterCount int
RunAction void
SingleActionWithOnlyOptionalParametersSpecified bool
ValidateInput void
ValidateMetadata void
ValueDescription string

Méthodes publiques

Méthode Description
Run ( ) : void

Runs an appropriate Action method. Uses the class this call lives in as target type and command line arguments from Environment

Run ( Type targetType, string args ) : void

Runs an appropriate Action method

Run ( Type targetType, string args, IMessenger messenger ) : void

Runs an appropriate Action method

Validate ( Type targetType ) : void

Validates specified type and throws NConsolerException if an error

Private Methods

Méthode Description
BuildParameterArray ( MethodInfo method ) : object[]
CanBeConvertedToDate ( string parameter ) : bool
CanBeNull ( Type type ) : bool
CheckActionMethodNamesAreNotReserved ( ) : void
CheckAllRequiredParametersAreSet ( MethodInfo method ) : void
CheckAnyActionMethodExists ( ) : void
CheckOptionalParametersAltNamesAreNotDuplicated ( MethodBase method ) : void
CheckOptionalParametersAreAfterRequiredOnes ( MethodBase method ) : void
CheckOptionalParametersAreNotDuplicated ( MethodInfo method ) : void
CheckOptionalParametersDefaultValuesAreAssignableToRealParameterTypes ( MethodBase method ) : void
CheckRequiredAndOptionalAreNotAppliedAtTheSameTime ( MethodBase method ) : void
CheckUnknownParametersAreNotPassed ( MethodInfo method ) : void
Consolery ( Type targetType, string args, IMessenger messenger ) : System
ConvertToDateTime ( string parameter ) : System.DateTime
ConvertValue ( string value, Type argumentType ) : object
GetCurrentMethod ( ) : MethodInfo
GetDisplayName ( ParameterInfo parameter ) : string
GetMethodByName ( string name ) : MethodInfo
GetMethodDescription ( MethodInfo method ) : string
GetOptional ( ICustomAttributeProvider info ) : OptionalAttribute
GetParametersDescriptions ( MethodInfo method ) : string>.Dictionary
IfActionMethodIsSingleCheckMethodHasParameters ( ) : void
InvokeMethod ( MethodInfo method ) : void
IsHelpRequested ( ) : bool
IsOptional ( ICustomAttributeProvider info ) : bool
IsRequired ( ICustomAttributeProvider info ) : bool
IsSubcommandHelpRequested ( ) : bool
MaxKeyLength ( string>.IEnumerable parameters ) : int
OnlyOptionalParametersSpecified ( MethodBase method ) : bool
OptionalParameters ( MethodInfo method ) : IEnumerable
ParameterName ( string parameter ) : string
ParameterValue ( string parameter ) : string
PrintGeneralMulticommandUsage ( ) : void
PrintMethodDescription ( MethodInfo method ) : void
PrintParametersDescriptions ( string>.IEnumerable parameters ) : void
PrintSubcommandUsage ( ) : void
PrintUsage ( ) : void
PrintUsage ( MethodInfo method ) : void
PrintUsageExample ( MethodInfo method, string>.IDictionary parameterList ) : void
ProgramName ( ) : string
RequiredParameterCount ( MethodInfo method ) : int
RunAction ( ) : void
SingleActionWithOnlyOptionalParametersSpecified ( ) : bool
ValidateInput ( MethodInfo method ) : void
ValidateMetadata ( ) : void
ValueDescription ( Type type ) : string

Method Details

Run() public static méthode

Runs an appropriate Action method. Uses the class this call lives in as target type and command line arguments from Environment
public static Run ( ) : void
Résultat void

Run() public static méthode

Runs an appropriate Action method
public static Run ( Type targetType, string args ) : void
targetType Type Type where to search for Action methods
args string Arguments that will be converted to Action method arguments
Résultat void

Run() public static méthode

Runs an appropriate Action method
public static Run ( Type targetType, string args, IMessenger messenger ) : void
targetType Type Type where to search for Action methods
args string Arguments that will be converted to Action method arguments
messenger IMessenger Uses for writing messages instead of Console class methods
Résultat void

Validate() public static méthode

Validates specified type and throws NConsolerException if an error
public static Validate ( Type targetType ) : void
targetType Type Type where to search for Action methods
Résultat void