Header menu logo BioFSharp

ReflectionHelper Module

Functions and values

Function or value Description

buildApply applyStyle

Full Usage: buildApply applyStyle

Parameters:
    applyStyle : 'a -> 'a

Returns: 'a

Creates an instance of the Object according to applyStyle and applies the function..

applyStyle : 'a -> 'a
Returns: 'a

getPublicProperties t

Full Usage: getPublicProperties t

Parameters:
Returns: PropertyInfo[]
t : Type
Returns: PropertyInfo[]

optApply applyStyle item

Full Usage: optApply applyStyle item

Parameters:
    applyStyle : ('a -> 'a) option
    item : 'a

Returns: 'a

Applies Some 'applyStyle' to item. If None it returns 'item' unchanged.

applyStyle : ('a -> 'a) option
item : 'a
Returns: 'a

optBuildApply applyStyle item

Full Usage: optBuildApply applyStyle item

Parameters:
    applyStyle : 'a -> 'a
    item : 'a option

Returns: 'a

Applies 'applyStyle' to item option. If None it creates a new instance.

applyStyle : 'a -> 'a
item : 'a option
Returns: 'a

removeProperty o propName

Full Usage: removeProperty o propName

Parameters:
    o : obj
    propName : string

Returns: bool

Removes property

o : obj
propName : string
Returns: bool

tryGetPropertyInfo o propName

Full Usage: tryGetPropertyInfo o propName

Parameters:
    o : obj
    propName : string

Returns: PropertyInfo option

Try to get the PropertyInfo by name using reflection

o : obj
propName : string
Returns: PropertyInfo option

tryGetPropertyName expr

Full Usage: tryGetPropertyName expr

Parameters:
Returns: string option

Returns the proptery name from quotation expression

expr : Expr
Returns: string option

tryGetPropertyValue o propName

Full Usage: tryGetPropertyValue o propName

Parameters:
    o : obj
    propName : string

Returns: obj option

Gets property value as option using reflection

o : obj
propName : string
Returns: obj option

tryGetPropertyValueAs o propName

Full Usage: tryGetPropertyValueAs o propName

Parameters:
    o : obj
    propName : string

Returns: 'a option

Gets property value as 'a option using reflection. Cast to 'a

o : obj
propName : string
Returns: 'a option

trySetPropertyValue o propName value

Full Usage: trySetPropertyValue o propName value

Parameters:
    o : obj
    propName : string
    value : obj

Returns: obj option

Sets property value using reflection

o : obj
propName : string
value : obj
Returns: obj option

tryUpdatePropertyValue o expr f

Full Usage: tryUpdatePropertyValue o expr f

Parameters:
    o : obj
    expr : Expr
    f : 'a -> 'a

Returns: obj option

Updates property value by given function

o : obj
expr : Expr
f : 'a -> 'a
Returns: obj option

tryUpdatePropertyValueFromName o propName f

Full Usage: tryUpdatePropertyValueFromName o propName f

Parameters:
    o : obj
    propName : string
    f : 'a -> 'a

Returns: obj option

Updates property value by given function

o : obj
propName : string
f : 'a -> 'a
Returns: obj option

updatePropertyValueAndIgnore o expr f

Full Usage: updatePropertyValueAndIgnore o expr f

Parameters:
    o : obj
    expr : Expr
    f : 'a -> 'a

o : obj
expr : Expr
f : 'a -> 'a

Type something to start searching.