C# Class Open.Core.Helpers.ReflectionHelper

Utility methods for working with reflection.
Mostra file Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method Description
GetFunction ( object source, string name ) : System.Function

Retrieves the named function from the specified object.

This method first looks for a 'public' version of the function name, and if not found attempts to retrieve the 'internal' version of the function by prepending an underscore to the name, eg '_myMethod'.

HasProperty ( object instance, string propertyName ) : bool

Determines whether the specified property exists on the object.

IsString ( object value ) : bool

Determines whether the given object is a string.

Method Details

GetFunction() public method

Retrieves the named function from the specified object.
This method first looks for a 'public' version of the function name, and if not found attempts to retrieve the 'internal' version of the function by prepending an underscore to the name, eg '_myMethod'.
public GetFunction ( object source, string name ) : System.Function
source object The source object containing the function.
name string The name of the function.
return System.Function

HasProperty() public method

Determines whether the specified property exists on the object.
public HasProperty ( object instance, string propertyName ) : bool
instance object The object to examine.
propertyName string The name of the property.
return bool

IsString() public method

Determines whether the given object is a string.
public IsString ( object value ) : bool
value object The object to examine.
return bool