Table of Contents

Interface IOptionPropertyProvider

Namespace
Ubiquity.CommandLineParsing
Assembly
Ubiquity.CommandlineParsing.dll

Interface for an option property provider.

public interface IOptionPropertyProvider
Extension Methods

Methods

GetPropertyForOption(object, CommandLineOption)

Gets an IOptionProperty for a given instance and option.

IOptionProperty GetPropertyForOption(object instance, CommandLineOption option)

Parameters

instance object

Object instance the value is to bind to.

option CommandLineOption

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).