Method GetPropertyForOption
GetPropertyForOption(Object, CommandlineOption)
Gets an IOptionProperty for a given instance and option
Declaration
public IOptionProperty GetPropertyForOption(object instance, CommandlineOption option)
Parameters
public 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 |
Implements
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)