C# Class KNFoundation.KNKVC.KNKVOCore

Show file Open project: bt-browser/KNFoundation Class Usage Examples

Public Methods

Method Description
AddObserverToKeyPathOfObject ( Object observedObj, String keyPath, KNKVOObserver observer, KNKeyValueObservingOptions options, Object context ) : void

Creates an observation manager for the given key path.

HelperForObject ( object anObject ) : KNKVOHelper

Gets an existing helper for an object if one exists, or creates one if not.

HelperIsNoLongerNeeded ( KNKVOHelper helper ) : void
ObjectDidChangeValueForKey ( Object obj, String key ) : void
ObjectWillChangeValueForKey ( Object obj, String key ) : void
RegisterHelperForType ( KNKVOHelper helper, Type targetType ) : void

Adds a helper to the KVO system. Helpers "assist" classes with automatic KVO notifications.

RemoveObserverFromKeyPathOfObject ( Object observedObj, String keyPath, KNKVOObserver observer ) : void

Removes an observer from the given key path of an object.

SharedCore ( ) : KNKVOCore

Private Methods

Method Description
KNKVOCore ( ) : System

Method Details

AddObserverToKeyPathOfObject() public method

Creates an observation manager for the given key path.
public AddObserverToKeyPathOfObject ( Object observedObj, String keyPath, KNKVOObserver observer, KNKeyValueObservingOptions options, Object context ) : void
observedObj Object The object to observe.
keyPath String The key path to observe.
observer KNKVOObserver The observer.
options KNKeyValueObservingOptions Bitwise-Or of the desired observation objects.
context Object The context of the observation. Used for comparison only.
return void

HelperForObject() public method

Gets an existing helper for an object if one exists, or creates one if not.
public HelperForObject ( object anObject ) : KNKVOHelper
anObject object The object to get a helper for.
return KNKVOHelper

HelperIsNoLongerNeeded() public method

public HelperIsNoLongerNeeded ( KNKVOHelper helper ) : void
helper KNKVOHelper
return void

ObjectDidChangeValueForKey() public method

public ObjectDidChangeValueForKey ( Object obj, String key ) : void
obj Object
key String
return void

ObjectWillChangeValueForKey() public method

public ObjectWillChangeValueForKey ( Object obj, String key ) : void
obj Object
key String
return void

RegisterHelperForType() public method

Adds a helper to the KVO system. Helpers "assist" classes with automatic KVO notifications.
public RegisterHelperForType ( KNKVOHelper helper, Type targetType ) : void
helper KNKVOHelper The helper to add.
targetType System.Type The type the helper is for.
return void

RemoveObserverFromKeyPathOfObject() public method

Removes an observer from the given key path of an object.
public RemoveObserverFromKeyPathOfObject ( Object observedObj, String keyPath, KNKVOObserver observer ) : void
observedObj Object The observed object.
keyPath String The key path to remove the observed from.
observer KNKVOObserver The observer to remove.
return void

SharedCore() public static method

public static SharedCore ( ) : KNKVOCore
return KNKVOCore