NSManagedObjectContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of related managed objects that create aninternally-consistent view of one or more persistent stores.
[Foundation.Register("NSManagedObjectContext", true)]
public class NSManagedObjectContext : Foundation.NSObject, Foundation.INSCoding, Foundation.INSLocking, IDisposable
[Foundation.Register("NSManagedObjectContext", true)]
public class NSManagedObjectContext : Foundation.NSObject, AppKit.INSEditor, AppKit.INSEditorRegistration, Foundation.INSCoding, Foundation.INSLocking, IDisposable
[Foundation.Register("NSManagedObjectContext", true)]
public class NSManagedObjectContext : Foundation.NSObject, Foundation.INSCoding, IDisposable
[<Foundation.Register("NSManagedObjectContext", true)>]
type NSManagedObjectContext = class
inherit NSObject
interface INSCoding
interface INativeObject
interface IDisposable
interface INSLocking
[<Foundation.Register("NSManagedObjectContext", true)>]
type NSManagedObjectContext = class
inherit NSObject
interface INSCoding
interface INativeObject
interface IDisposable
interface INSLocking
interface INSEditor
interface INSEditorRegistration
[<Foundation.Register("NSManagedObjectContext", true)>]
type NSManagedObjectContext = class
inherit NSObject
interface INSCoding
interface INativeObject
interface IDisposable
- Inheritance
- Attributes
- Implements
Constructors
| Name | Description |
|---|---|
| NSManagedObjectContext() |
Default constructor that initializes a new instance of this class with no parameters. |
| NSManagedObjectContext(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| NSManagedObjectContext(NSCoder) |
A constructor that initializes the object from the data stored in the unarchiver object. |
| NSManagedObjectContext(NSManagedObjectContextConcurrencyType) |
Creates a new NSManagedObjectContext of the specified type. |
| NSManagedObjectContext(NSObjectFlag) |
Constructor to call on derived classes to skip initialization and merely allocate the object. |
Properties
| Name | Description |
|---|---|
| AccessibilityAttributedUserInputLabels | (Inherited from NSObject) |
| AccessibilityRespondsToUserInteraction | (Inherited from NSObject) |
| AccessibilityTextualContext | (Inherited from NSObject) |
| AccessibilityUserInputLabels | (Inherited from NSObject) |
| AutomaticallyMergesChangesFromParent |
Gets or sets a Boolean that tells whether changes in the parent are automatically merged. |
| Class | (Inherited from NSObject) |
| ClassHandle |
The Objective-C class handle for this class. |
| ConcurrencyType |
Gets the receiver's concurrency type. |
| DebugDescription | (Inherited from NSObject) |
| DeletedObjects |
Gets a set that contains the objects that will be deleted by the next save operation. |
| Description | (Inherited from NSObject) |
| DidMergeChangesObjectIdsNotification |
Notification constant for DidMergeChangesObjectIds |
| DidSaveNotification |
Notification constant for DidSave |
| DidSaveObjectIdsNotification |
Notification constant for DidSaveObjectIds |
| ExposedBindings | (Inherited from NSObject) |
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from NSObject) |
| HasChanges |
Gets a Boolean value that tells whether the receiver has any unsaved changes. |
| InsertedObjects |
Gets the inserted, but unsaved, objects in the context. |
| IsDirectBinding |
Gets or sets a value indicating whether this instance uses direct Objective-C binding. (Inherited from NSObject) |
| IsProxy | (Inherited from NSObject) |
| MergePolicy |
Gets or sets the receiver's merge policy. |
| Name |
Gets or sets a name for the object. |
| ObjectsDidChangeNotification |
Notification constant for ObjectsDidChange |
| ParentContext |
Gets the receiver's parent context. |
| PersistentStoreCoordinator |
Gets the receiver's store coordinator. |
| PropagatesDeletesAtEndOfEvent |
Gets or sets a Boolean value that controls whether the receiver propagates deletes after change events. |
| QueryGenerationToken |
Gets the token that identifes the current query generation behavior. |
| RegisteredObjects |
Gets a set that contains all of the receiver's registered objects. |
| RetainCount | (Inherited from NSObject) |
| RetainsRegisteredObjects |
Gets or sets a Boolean value that controls whether the receiver retains hard references to its registered managed objects. |
| Self | (Inherited from NSObject) |
| ShouldDeleteInaccessibleFaults |
Gets or sets a Boolean value that controls whether inaccessible faults wil be deleted. |
| StalenessInterval |
Gets or sets the maximum elapsed time after fetching which causes fault fulfillment to fetch new data. |
| Superclass | (Inherited from NSObject) |
| SuperHandle |
Handle used to represent the methods in the base class for this NSObject. (Inherited from NSObject) |
| TransactionAuthor |
Gets or sets the author of the persistent history context. |
| TryLock | |
| UndoManager |
Gets the receiver's undo manager. |
| UpdatedObjects |
Gets a set that contains all of the receiver's objects which have uncommitted changes. |
| UserInfo |
Gets the receiver's user information. |
| WillSaveNotification |
Notification constant for WillSave |
| Zone | (Inherited from NSObject) |
Methods
| Name | Description |
|---|---|
| AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) | (Inherited from NSObject) |
| AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) | (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) |
| AssignObject(NSObject, NSPersistentStore) |
Assigns |
| AwakeFromNib() | (Inherited from NSObject) |
| BeginInvokeOnMainThread(Action) |
Invokes the specified action asynchronously on the main UI thread. (Inherited from NSObject) |
| BeginInvokeOnMainThread(Selector, NSObject) |
Invokes asynchronously the specified code on the main UI thread. (Inherited from NSObject) |
| Bind(NSString, NSObject, String, NSBindingOptions) | (Inherited from NSObject) |
| Bind(NSString, NSObject, String, NSDictionary) | (Inherited from NSObject) |
| CommitEditing() | |
| CommitEditing(NSError) | |
| CommitEditing(NSObject, Selector, IntPtr) | |
| ConformsToProtocol(NativeHandle) | (Inherited from NSObject) |
| Copy() | (Inherited from NSObject) |
| CountForFetchRequest(NSFetchRequest, NSError) |
Returns the number of objects that |
| DangerousAutorelease() |
Calls the 'autorelease' selector on this object. (Inherited from NSObject) |
| DangerousRelease() |
Calls the 'release' selector on this object. (Inherited from NSObject) |
| DangerousRetain() |
Calls the 'retain' selector on this object. (Inherited from NSObject) |
| DeleteObject(NSManagedObject) |
Queues |
| DetectConflictsForObject(NSManagedObject) |
Marks |
| DidChange(NSKeyValueChange, NSIndexSet, NSString) | (Inherited from NSObject) |
| DidChange(NSString, NSKeyValueSetMutationKind, NSSet) | (Inherited from NSObject) |
| DidChangeValue(String) | (Inherited from NSObject) |
| DiscardEditing() | |
| 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) | (Inherited from NSObject) |
| EncodeTo(NSCoder) |
Encodes the state of the object using the provided encoder. |
| Equals(NSObject) |
Determines whether the specified NSObject is equal to the current NSObject. (Inherited from NSObject) |
| Equals(Object) |
Determines whether the specified object is equal to the current NSObject. (Inherited from NSObject) |
| ExecuteFetchRequest(NSFetchRequest, NSError) |
Runs the specified |
| ExecuteRequest(NSPersistentStoreRequest, NSError) |
Runs the specified |
| GetBindingInfo(NSString) | (Inherited from NSObject) |
| GetBindingOptionDescriptions(NSString) | (Inherited from NSObject) |
| GetBindingValueClass(NSString) | (Inherited from NSObject) |
| GetDictionaryOfValuesFromKeys(NSString[]) | (Inherited from NSObject) |
| GetExistingObject(NSManagedObjectID, NSError) |
Fetches an object with a specified id. |
| GetHashCode() |
Generates a hash code for the current instance. (Inherited from NSObject) |
| GetMethodForSelector(Selector) | (Inherited from NSObject) |
| GetNativeHash() | (Inherited from NSObject) |
| Init() |
Initializes the object by calling the Objective-C |
| InitializeHandle(NativeHandle, String) | (Inherited from NSObject) |
| InitializeHandle(NativeHandle) | (Inherited from NSObject) |
| InsertObject(NSManagedObject) |
Inserts |
| Invoke(Action, Double) |
Invokes the specified action after the specified delay. (Inherited from NSObject) |
| Invoke(Action, TimeSpan) |
Invokes the specified action after the specified delay. (Inherited from NSObject) |
| InvokeOnMainThread(Action) |
Invokes the specified action synchronously on the main UI thread. (Inherited from NSObject) |
| InvokeOnMainThread(Selector, NSObject) |
Invokes synchronously 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) |
| Lock() |
Developers should not use this deprecated method. Developers should use a queue style context and 'PerformAndWait' instead. |
| MarkDirty() |
Promotes a regular peer object (IsDirectBinding is true) into a toggleref object. (Inherited from NSObject) |
| MergeChangesFromContextDidSaveNotification(NSNotification) |
Method that is called to merge the changes that are specified by |
| MergeChangesFromRemoteContextSave(NSDictionary, NSManagedObjectContext[]) |
Merges remote changes. |
| MutableCopy() | (Inherited from NSObject) |
| ObjectDidBeginEditing(INSEditor) | |
| ObjectDidEndEditing(INSEditor) | |
| ObjectDidEndEditing(NSObject) | (Inherited from NSObject) |
| ObjectRegisteredForID(NSManagedObjectID) |
Returns the object that is identified by |
| ObjectWithID(NSManagedObjectID) |
Returns the object that is identified by |
| ObserveValue(NSString, NSObject, NSDictionary, IntPtr) | (Inherited from NSObject) |
| ObserveValue(String, NSObject, NSDictionary, IntPtr) |
Observes the object that is identified by the provided object and keypath for changes. |
| ObtainPermanentIDsForObjects(NSManagedObject[], NSError) |
Converts the objec identifiers to permanent identifiers for the provided |
| Perform(Action) |
Asynchronously performs the specified |
| PerformAndWait(Action) |
Synchronously performs the specified |
| PerformSelector(Selector, NSObject, Double, NSString[]) | (Inherited from NSObject) |
| PerformSelector(Selector, NSObject, Double) | (Inherited from NSObject) |
| PerformSelector(Selector, NSObject, NSObject) | (Inherited from NSObject) |
| PerformSelector(Selector, NSObject) | (Inherited from NSObject) |
| PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) | (Inherited from NSObject) |
| PerformSelector(Selector, NSThread, NSObject, Boolean) | (Inherited from NSObject) |
| PerformSelector(Selector) | (Inherited from NSObject) |
| PrepareForInterfaceBuilder() | (Inherited from NSObject) |
| ProcessPendingChanges() |
Tells the receiver to process all changes on the object graph. |
| Redo() |
Reverses the most recent unreversed undo. |
| RefreshAllObjects() |
Refreshes all objects in the store. |
| RefreshObject(NSManagedObject, Boolean) |
Refreshes |
| RemoveObserver(NSObject, NSString, IntPtr) | (Inherited from NSObject) |
| RemoveObserver(NSObject, NSString) | (Inherited from NSObject) |
| RemoveObserver(NSObject, String, IntPtr) | (Inherited from NSObject) |
| RemoveObserver(NSObject, String) | (Inherited from NSObject) |
| Reset() |
Resets the receiver. |
| RespondsToSelector(Selector) | (Inherited from NSObject) |
| Rollback() |
Rolls the state of all objects in the object graph back to the most recent committed values. |
| Save(NSError) |
Saves uncommitted changes and reports any error that it encounters. |
| SetNilValueForKey(NSString) | (Inherited from NSObject) |
| SetQueryGenerationFromToken(NSQueryGenerationToken, NSError) |
Sets the query generation from the specified query generation token. |
| SetValueForKey(NSObject, NSString) | (Inherited from NSObject) |
| SetValueForKeyPath(NativeHandle, NSString) |
Sets the value for the property identified by a given key path to a given value. (Inherited from NSObject) |
| SetValueForKeyPath(NSObject, NSString) | (Inherited from NSObject) |
| SetValueForUndefinedKey(NSObject, NSString) | (Inherited from NSObject) |
| SetValuesForKeysWithDictionary(NSDictionary) | (Inherited from NSObject) |
| ShouldHandleInaccessibleFault(NSManagedObject, NSManagedObjectID, NSPropertyDescription) |
Returns a Boolean value that controls whether inaccessible faults wil be handled. |
| ToString() |
Returns a string representation of the value of the current instance. (Inherited from NSObject) |
| Unbind(NSString) | (Inherited from NSObject) |
| Undo() |
Instructs the receiver to undo its uncommitted changes. |
| Unlock() | |
| ValueForKey(NSString) | (Inherited from NSObject) |
| ValueForKeyPath(NSString) | (Inherited from NSObject) |
| ValueForUndefinedKey(NSString) | (Inherited from NSObject) |
| WillChange(NSKeyValueChange, NSIndexSet, NSString) | (Inherited from NSObject) |
| WillChange(NSString, NSKeyValueSetMutationKind, NSSet) | (Inherited from NSObject) |
| WillChangeValue(String) | (Inherited from NSObject) |