iOS Guides | Samples

MonoTouch.CoreData.NSManagedObjectContext Class

A collection of related managed objects that create aninternally-consistent view of one or more persistent stores.

See Also: NSManagedObjectContext


[MonoTouch.Foundation.Register("NSManagedObjectContext", true)]
public class NSManagedObjectContext : NSObject, INSCoding, INSLocking, IDisposable

Related content


Namespace: MonoTouch.CoreData
Assembly: monotouch (in monotouch.dll)
Assembly Versions:

The members of MonoTouch.CoreData.NSManagedObjectContext are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
Creates a new NSManagedObjectContext of the specified type.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

AutomaticallyMergesChangesFromParentBoolean. Gets or sets a Boolean that tells whether changes in the parent are automatically merged.
ClassHandleIntPtr. The handle for this class.
ConcurrencyTypeNSManagedObjectContextConcurrencyType. Gets the receiver's concurrency type.
DeletedObjectsNSSet. Gets a set that contains the objects that will be deleted by the next save operation.
DidSaveNotificationNSString. Notification constant for DidSave
HasChangesBoolean. Gets a Boolean value that tells whether the receiver has any unsaved changes.
InsertedObjectsNSSet. Gets the inserted, but unsaved, objects in the context.
MergePolicyIntPtr. Gets or sets the receiver's merge policy.
NameString. Gets or sets a name for the object.
ObjectsDidChangeNotificationNSString. Notification constant for ObjectsDidChange
ParentContextNSManagedObjectContext. Gets the receiver's parent context.
PersistentStoreCoordinatorNSPersistentStoreCoordinator. Gets the receiver's store coordinator.
PropagatesDeletesAtEndOfEventBoolean. Gets or sets a Boolean value that controls whether the receiver propagates deletes after change events.
QueryGenerationTokenNSQueryGenerationToken. Gets the token that identifes the current query generation behavior.
RegisteredObjectsNSSet. Gets a set that contains all of the receiver's registered objects.
RetainsRegisteredObjectsBoolean. Gets or sets a Boolean value that controls whether the receiver retains hard references to its registered managed objects.
ShouldDeleteInaccessibleFaultsBoolean. Gets or sets a Boolean value that controls whether inaccessible faults wil be deleted.
StalenessIntervalDouble. Gets or sets the maximum elapsed time after fetching which causes fault fulfillment to fetch new data.
UndoManagerNSUndoManager. Gets the receiver's undo manager.
UpdatedObjectsNSSet. Gets a set that contains all of the receiver's objects which have uncommitted changes.
UserInfoNSMutableDictionary. Gets the receiver's user information.
WillSaveNotificationNSString. Notification constant for WillSave

Public Methods

AssignObject(IntPtr, NSPersistentStore)
Assigns object1 to store.
CountForFetchRequest(NSFetchRequest, out NSError) : UInt32
Returns the number of objects that request would return if it were run.
Queues object1 for deletion.
Marks object1 for conflict detection.
ExecuteFetchRequest(NSFetchRequest, out NSError) : NSObject[]
Runs the specified request.
ExecuteRequest(NSPersistentStoreRequest, out NSError) : NSPersistentStoreResult
Runs the specified request.
GetExistingObject(NSManagedObjectID, out NSError) : NSManagedObject
Fetches an object with a specified id.
Inserts object1 into the context.
Method that is called to merge the changes that are specified by notifictaion.
MergeChangesFromRemoteContextSave(NSDictionary, NSManagedObjectContext[])
Merges remote changes.
ObjectRegisteredForID(NSManagedObjectID) : NSManagedObject
Returns the object that is identified by objectID, if it represents a registered object.
ObjectWithID(NSManagedObjectID) : NSManagedObject
Returns the object that is identified by objectID
ObserveValueForKeyPath(String, IntPtr, NSDictionary, IntPtr)
Observes the object that is identified by the provided object and keypath for changes.
ObtainPermanentIDsForObjects(NSManagedObject[], out NSError) : Boolean
Converts the objec identifiers to permanent identifiers for the provided objects. Returns true if all of the identifiers were converted.
Asynchronously performs the specified action.
Send a message to the object, use if you created the object with PrivateQueue or MainQueue concurrency types.
Tells the receiver to process all changes on the object graph.
Reverses the most recent unreversed undo.
Refreshes all objects in the store.
RefreshObject(NSManagedObject, Boolean)
Refreshes object1 with the most current values from its store.
Resets the receiver.
Rolls the state of all objects in the object graph back to the most recent committed values.
Save(out NSError) : Boolean
Saves uncommitted changes and reports any error that it encounters.
SetQueryGenerationFromToken(NSQueryGenerationToken, out NSError) : Boolean
Sets the query generation from the specified query generation token.
ShouldHandleInaccessibleFault(NSManagedObject, NSManagedObjectID, NSPropertyDescription) : Boolean
Returns a Boolean value that controls whether inaccessible faults wil be handled.
Instructs the receiver to undo its uncommitted changes.