NSManagedObject Class

Definition

A class that can be managed by a managed object context. Should have a correspondence to domain model classes, even if they are not direct subtypes.

[Foundation.Register("NSManagedObject", true)]
public class NSManagedObject : Foundation.NSObject, CoreData.INSFetchRequestResult, IDisposable
type NSManagedObject = class
    inherit NSObject
    interface INSFetchRequestResult
    interface INativeObject
    interface IDisposable
Inheritance
NSManagedObject
Attributes
Implements

Constructors

NSManagedObject(IntPtr)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

NSManagedObject(NSEntityDescription, NSManagedObjectContext)

Creates a new NSManagedObject from an entity description and inserts the object into the specified managed object context.

NSManagedObject(NSManagedObjectContext)

Creates a new NSManagedObject in the specified managed object context.

NSManagedObject(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

Properties

ChangedValues

Gets a dictionary of the old values of persistent values that were recently changed since the receiver was last fetched.

ChangedValuesForCurrentEvent

Returns a dictionary of the old values of persistent values that were recently changed since the context objects last changed.

Class (Inherited from NSObject)
ClassHandle

The handle for this class.

ContextShouldIgnoreUnModeledPropertyChanges

Gets a Boolean value that tells whether the managed object should ignore changes to unmodeled properties.

DebugDescription

A developer-meaningful description of this object.

(Inherited from NSObject)
Description

Description of the object, the Objective-C version of ToString.

(Inherited from NSObject)
Entity

Gets the receiver's entity description.

FaultingState

Gets the receiver's faulting state.

Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
HasChanges

Gets a Boolean value that tells whether the receiver has changes due to having been inserted or deleted, or due to having other unsaved changes.

HasPersistentChangedValues

Gets a Boolean value that tells whether the receiver has unsaved changes to persistent values.

IsDeleted

Gets a Boolean value that tells whether the receiver will be deleted in the next save.

IsDirectBinding (Inherited from NSObject)
IsFault

Gets a Boolean value that tells whether the receiver has been converted to a fault.

IsInserted

Gets a Boolean value that tells whether the receiver was inserted into a managed object context.

IsProxy (Inherited from NSObject)
IsUpdated

Gets a Boolean value that tells whether the receiver has changes that are not yet saved.

ManagedObjectContext

Gets the managed object context where this managed object is registered.

ObjectID

Gets the object identifer.

ObservationInfo

Gets the KVO information for the object.

RetainCount

Returns the current Objective-C retain count for the object.

(Inherited from NSObject)
Self (Inherited from NSObject)
Superclass (Inherited from NSObject)
SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
Zone (Inherited from NSObject)

Methods

AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using NSString keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr)

Registers an object for being observed externally (using string keyPath).   Observed changes are dispatched to the observer’s object ObserveValue(NSString, NSObject, NSDictionary, IntPtr) method.

(Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AwakeFromFetch()

Method that is called after the receiver is fetched.

AwakeFromInsert()

Method that is called after the managed object is inserted into a managed object context.

AwakeFromNib()

Called after the object has been loaded from the nib file. Overriders must call base.AwakeFromNib().

(Inherited from NSObject)
AwakeFromSnapshotEvents(NSSnapshotEventType)

Method that is called to awaken the receiver when a property state change occurs.

BeginInvokeOnMainThread(Action) (Inherited from NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
Bind(NSString, NSObject, String, NSDictionary) (Inherited from NSObject)
Bind(String, NSObject, String, NSDictionary)
Obsolete.
(Inherited from NSObject)
BindingInfo(String)
Obsolete.
(Inherited from NSObject)
BindingOptionDescriptions(String)
Obsolete.
(Inherited from NSObject)
BindingValueClass(String)
Obsolete.
(Inherited from NSObject)
CommitEditing() (Inherited from NSObject)
CommitEditing(NSObject, Selector, IntPtr) (Inherited from NSObject)
CommittedValuesForKeys(String[])

Returns a dictionary that contains property values for the specified keys from before the last fetch or save.

ConformsToProtocol(IntPtr)

Invoked to determine if this object implements the specified protocol.

(Inherited from NSObject)
Copy()

Performs a copy of the underlying Objective-C object.

(Inherited from NSObject)
CreateFetchRequest()

Creates and returns a fetch request.

DangerousAutorelease() (Inherited from NSObject)
DangerousRelease() (Inherited from NSObject)
DangerousRetain() (Inherited from NSObject)
DidAccessValueForKey(String)

Method that is called when the value for the property that is identified by key is accessed.

DidChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates a change occurred to the indexes for a to-many relationship.

(Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
DidChangeValue(String)

Indicates that a change occurred on the specified key.

(Inherited from NSObject)
DidChangeValueForKey(String)

Method that is called when the value for the property that is identified by key is changed.

DidChangeValueForKey(String, NSKeyValueSetMutationKind, NSSet)

Method that is called when the value for the many-to-many property that is identified by key is changed.

DidSave()

Method that is called after the managed context operation saves values.

DidTurnIntoFault()

Method that is called when the receiver becomes a fault.

Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean)

Releases the resources used by the NSObject object.

(Inherited from NSObject)
DoesNotRecognizeSelector(Selector)

Indicates that this object does not recognize the specified selector.

(Inherited from NSObject)
Equals(NSObject) (Inherited from NSObject)
Equals(Object) (Inherited from NSObject)
ExposedBindings() (Inherited from NSObject)
GetBindingInfo(NSString) (Inherited from NSObject)
GetBindingOptionDescriptions(NSString) (Inherited from NSObject)
GetBindingValueClass(NSString) (Inherited from NSObject)
GetDictionaryOfValuesFromKeys(NSString[])

Retrieves the values of the specified keys.

(Inherited from NSObject)
GetEntityDescription()

Gets the entity description for the receiver.

GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetMethodForSelector(Selector) (Inherited from NSObject)
GetNativeField(String)
Obsolete.
(Inherited from NSObject)
GetNativeHash() (Inherited from NSObject)
GetObjectIDs(String)

Gets the identifiers for all of the objects that are involved in the specified relationship.

HasFaultForRelationshipNamed(String)

Gets a Boolean value that tells whether the receiver has a fault.

Init() (Inherited from NSObject)
InitializeHandle(IntPtr) (Inherited from NSObject)
InitializeHandle(IntPtr, String) (Inherited from NSObject)
Invoke(Action, Double) (Inherited from NSObject)
Invoke(Action, TimeSpan) (Inherited from NSObject)
InvokeOnMainThread(Action) (Inherited from NSObject)
InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) (Inherited from NSObject)
IsKindOfClass(Class) (Inherited from NSObject)
IsMemberOfClass(Class) (Inherited from NSObject)
MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MutableCopy()

Creates a mutable copy of the specified NSObject.

(Inherited from NSObject)
ObjectDidEndEditing(NSObject) (Inherited from NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr)

Indicates that the value at the specified keyPath relative to this object has changed.

(Inherited from NSObject)
PerformSelector(Selector) (Inherited from NSObject)
PerformSelector(Selector, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSObject, Double)

Invokes the selector on the current instance and if the obj is not null, it passes this as its single parameter.

(Inherited from NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSObject, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (Inherited from NSObject)
PrepareForDeletion()

Method that is called prior to the object being deleted.

PrepareForInterfaceBuilder() (Inherited from NSObject)
PrimitiveValueForKey(String)

Returns the receiver's internal primitive value for the property that is specified by the provided key.

RemoveObserver(NSObject, NSString)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RemoveObserver(NSObject, String)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath.

(Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr)

Stops the specified observer from receiving further notifications of changed values for the specified keyPath and context.

(Inherited from NSObject)
RespondsToSelector(Selector)

Whether this object recognizes the specified selector.

(Inherited from NSObject)
SetNativeField(String, NSObject)
Obsolete.
(Inherited from NSObject)
SetNilValueForKey(NSString)

Sets the value of the specified key to null.

(Inherited from NSObject)
SetPrimitiveValue(IntPtr, String)

Sets the receiver's internal primitive value for the property that is specified by the provided key.

SetValue(IntPtr, String)

Sets the receiver's value for the property that is specified by the provided key.

SetValueForKey(NSObject, NSString)

Sets the value of the property specified by the key to the specified value.

(Inherited from NSObject)
SetValueForKeyPath(IntPtr, NSString)

A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

(Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString)

Sets the value of a property that can be reached using a keypath.

(Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString)

Indicates an attempt to write a value to an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary)

Sets the values of this NSObject to those in the specified dictionary.

(Inherited from NSObject)
ToString()

Returns a string representation of the value of the current instance.

(Inherited from NSObject)
Unbind(NSString) (Inherited from NSObject)
Unbind(String)
Obsolete.
(Inherited from NSObject)
ValidateForDelete(NSError)

Returns true if the receiver is valid for deletion.

ValidateForInsert(NSError)

Returns true if the receiver is valid for insertion.

ValidateForUpdate(NSError)

Returns true if the receiver is valid for updating.

ValidateValue(NSObject, String, NSError)

Returns true if the specified value is valid for the property that is identified by the specified key.

ValueForKey(NSString)

Returns the value of the property associated with the specified key.

(Inherited from NSObject)
ValueForKey(String)

Returns the value for the property that is identified by the specified key.

ValueForKeyPath(NSString)

Returns the value of a property that can be reached using a keypath.

(Inherited from NSObject)
ValueForUndefinedKey(NSString)

Indicates an attempt to read a value of an undefined key. If not overridden, raises an NSUndefinedKeyException.

(Inherited from NSObject)
WillAccessValueForKey(String)

Method that is called before the value for the property that is identified by key is accessed.

WillChange(NSKeyValueChange, NSIndexSet, NSString)

Indicates that the values of the specified indices in the specified key are about to change.

(Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
WillChangeValue(String)

Indicates that the value of the specified key is about to change.

(Inherited from NSObject)
WillChangeValueForKey(String)

Method that is called before the value for the property that is identified by key is changed.

WillChangeValueForKey(String, NSKeyValueSetMutationKind, NSSet)

Method that is called before the value for the many-to-many property that is identified by key is changed.

WillSave()

Method that is called before the receiver is saved.

WillTurnIntoFault()

Method that is called before the receiver is turned into a fault.

Extension Methods

ObjectDidBeginEditing(NSObject, INSEditor)
ObjectDidEndEditing(NSObject, INSEditor)
GetValidModes(NSObject, NSFontPanel)
ValidateToolbarItem(NSObject, NSToolbarItem)
GetDebugDescription(INSObjectProtocol)
AcceptsPreviewPanelControl(NSObject, QLPreviewPanel)
BeginPreviewPanelControl(NSObject, QLPreviewPanel)
EndPreviewPanelControl(NSObject, QLPreviewPanel)
GetAccessibilityCustomRotors(NSObject)

Gets the array of UIAccessibilityCustomRotor objects appropriate for this object.

SetAccessibilityCustomRotors(NSObject, UIAccessibilityCustomRotor[])

Sets the array of UIAccessibilityCustomRotor objects appropriate for this object.

Applies to

See also