Method GetPropertyForOption
GetPropertyForOption(Object, CommandlineOption)
Gets an IOptionProperty for a given instance and option
Declaration
IOptionProperty GetPropertyForOption(object instance, CommandlineOption option)
Parameters
IOptionProperty GetPropertyForOption(object instance, CommandlineOption option)
Object | instance | Object instance the value is to bind to |
CommandlineOption | option | Option to bind |
Returns
IOptionProperty | IOptionProperty for the property |
Remarks
This method may obtain the information needed by any means it deems necessary. The ReflectionOptionPropertyProvider uses reflection to lookup the property at runtime. It is conceivable to use some sort of compile time code generation to create type specific providers that would avoid run-time reflection for any scenarios where reflection is deemed to heavy weight. (There isn't any such implementation at this time, but it should be plausible)