C# Class Open.Core.Helper

Static index of helpers.
Afficher le fichier Open project: philcockfield/Open.TestHarness.SL

Méthodes publiques

Méthode Description
CreateId ( ) : string

Creates a unique identifier.

Dispose ( object obj ) : void

Disposes of the object (if it's not null and is an IDisposable).

Invoke ( System.Action action ) : void

Invokes the given action if it's not Null/Undefined.

ListenPropertyChanged ( object model, PropertyChangedHandler handler ) : void

Casts the given object to an 'INotifyPropertyChanged' and if it is observable wires up the given event handler to the 'PropertyChanged' event.

UnlistenPropertyChanged ( object model, PropertyChangedHandler handler ) : void

Casts the given object to an 'INotifyPropertyChanged' and if it is observable un-wires the given event handler from the 'PropertyChanged' event.

Method Details

CreateId() public static méthode

Creates a unique identifier.
public static CreateId ( ) : string
Résultat string

Dispose() public static méthode

Disposes of the object (if it's not null and is an IDisposable).
public static Dispose ( object obj ) : void
obj object The object to dispose of.
Résultat void

Invoke() public static méthode

Invokes the given action if it's not Null/Undefined.
public static Invoke ( System.Action action ) : void
action System.Action The action to invoke.
Résultat void

ListenPropertyChanged() public static méthode

Casts the given object to an 'INotifyPropertyChanged' and if it is observable wires up the given event handler to the 'PropertyChanged' event.
public static ListenPropertyChanged ( object model, PropertyChangedHandler handler ) : void
model object The model to wire up.
handler PropertyChangedHandler The handler to attach.
Résultat void

UnlistenPropertyChanged() public static méthode

Casts the given object to an 'INotifyPropertyChanged' and if it is observable un-wires the given event handler from the 'PropertyChanged' event.
public static UnlistenPropertyChanged ( object model, PropertyChangedHandler handler ) : void
model object The model to un-wire.
handler PropertyChangedHandler The handler to remove.
Résultat void