C# Класс KNFoundation.KNKVC.KNKVCSettable

Показать файл Открыть проект

Открытые методы

Метод Описание
SetNullValueForKey ( this o, String key ) : void

Sets a value of the given key to null. Equivalent to Cocoa's –setNilValueForKey:.

SetValueForKey ( this o, Object value, String key ) : void

Attempts to set a Key-Value Coding compliant value on the given object using the given key. A Key-Value Coding compliant value is either a settable property named identically to the key or a method named SetKey()) that takes a single value. If the key doesn't exist, attempts to set SetValueForUndefinedKey() on the object, which by default throws an exception. Equivalent to -setValue:forKey: in Cocoa.

SetValueForKeyPath ( this o, Object value, String keyPath ) : void
SetValueForUndefinedKey ( this o, Object value, String key ) : void

Called when SetValueForKey() can't find a Key-Value coding compliant setter for the given key. If you wish to define custom behaviour for your object's KVC compliance, it's recommended that you override this method. The default implementation throws an exception. Equivalent to Cocoa's –setValue:forUndefinedKey:.

SetValuesForKeysWithDictionary ( this o, Object>.Dictionary keysAndValues ) : void

Sets a dictionary of keys at once. Calls SetValueForKey() for each key in the Dictionary. Equivalent to Cocoa's –setValuesForKeysWithDictionary:.

Описание методов

SetNullValueForKey() публичный статический Метод

Sets a value of the given key to null. Equivalent to Cocoa's –setNilValueForKey:.
public static SetNullValueForKey ( this o, String key ) : void
o this The base object.
key String The key to set to null.
Результат void

SetValueForKey() публичный статический Метод

Attempts to set a Key-Value Coding compliant value on the given object using the given key. A Key-Value Coding compliant value is either a settable property named identically to the key or a method named SetKey()) that takes a single value. If the key doesn't exist, attempts to set SetValueForUndefinedKey() on the object, which by default throws an exception. Equivalent to -setValue:forKey: in Cocoa.
public static SetValueForKey ( this o, Object value, String key ) : void
o this The base object.
value Object The value to set.
key String The key to set.
Результат void

SetValueForKeyPath() публичный статический Метод

public static SetValueForKeyPath ( this o, Object value, String keyPath ) : void
o this
value Object
keyPath String
Результат void

SetValueForUndefinedKey() публичный статический Метод

Called when SetValueForKey() can't find a Key-Value coding compliant setter for the given key. If you wish to define custom behaviour for your object's KVC compliance, it's recommended that you override this method. The default implementation throws an exception. Equivalent to Cocoa's –setValue:forUndefinedKey:.
public static SetValueForUndefinedKey ( this o, Object value, String key ) : void
o this The base object.
value Object The value that should be set.
key String The key the value should be set for.
Результат void

SetValuesForKeysWithDictionary() публичный статический Метод

Sets a dictionary of keys at once. Calls SetValueForKey() for each key in the Dictionary. Equivalent to Cocoa's –setValuesForKeysWithDictionary:.
public static SetValuesForKeysWithDictionary ( this o, Object>.Dictionary keysAndValues ) : void
o this The base object.
keysAndValues Object>.Dictionary A Dictionary of keys (NOT key paths) and values to set.
Результат void