C# Class Open.Core.Helper

Static index of helpers.
Mostrar archivo Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method 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 method

Creates a unique identifier.
public static CreateId ( ) : string
return string

Dispose() public static method

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.
return void

Invoke() public static method

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

ListenPropertyChanged() public static method

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.
return void

UnlistenPropertyChanged() public static method

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.
return void