C# Class Open.Core.Helpers.ReflectionHelper

Utility methods for working with reflection.
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Méthodes publiques

Méthode 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 méthode

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.
Résultat System.Function

HasProperty() public méthode

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.
Résultat bool

IsString() public méthode

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