Skip to content

Commit

Permalink
Merge pull request #28 from mandel-macaque/bug-34968
Browse files Browse the repository at this point in the history
[Fix] Add missing CoreData selectors.
  • Loading branch information
mandel-macaque committed May 4, 2016
2 parents dd06fbb + 3a2f435 commit 860f4f4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/coredata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ public enum NSPersistentStoreUbiquitousTransitionType : nuint_compat_int {
InitialImportCompleted
}

[Native]
public enum NSSnapshotEventType : nuint_compat_int {
UndoInsertion = 1 << 1,
UndoDeletion = 1 << 2,
UndoUpdate = 1 << 3,
Rollback = 1 << 4,
Refresh = 1 << 5,
MergePolicy = 1 << 6
}

[BaseType (typeof (NSPersistentStore))]
// Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: NSMappedObjectStore must be initialized with initWithPersistentStoreCoordinator:configurationName:URL:options
[DisableDefaultCtor]
Expand Down Expand Up @@ -127,6 +137,9 @@ public interface NSEntityDescription : NSCoding, NSCopying {
[Export ("managedObjectClassName")]
string ManagedObjectClassName { get; set; }

[Export ("renamingIdentifier")]
string RenamingIdentifier { get; set; }

[NullAllowed] // by default this property is null
[Export ("name")]
string Name { get; set; }
Expand Down Expand Up @@ -252,6 +265,16 @@ public interface NSEntityMigrationPolicy {
bool EndEntityMapping (NSEntityMapping mapping, NSMigrationManager manager, out NSError error);
}

[BaseType (typeof (NSPropertyDescription))]
public interface NSExpressionDescription {

[Export ("expression")]
NSExpression Expression { get; set; }

[Export ("expressionResultType")]
NSAttributeType ResultType { get; set; }
}

[BaseType (typeof (NSPropertyDescription))]
public interface NSFetchedPropertyDescription {

Expand All @@ -260,6 +283,28 @@ public interface NSFetchedPropertyDescription {
NSFetchRequest FetchRequest { get; set; }
}

[DisableDefaultCtor]
[BaseType (typeof (NSExpression))]
public interface NSFetchRequestExpression {

[Internal]
[DesignatedInitializer]
[Export ("initWithExpressionType:")]
IntPtr Constructor (NSExpressionType type);

[Static, Export ("expressionForFetch:context:countOnly:")]
NSFetchRequestExpression FromFetch (NSExpression fetch, NSExpression context, bool countOnly);

[Export ("requestExpression")]
NSExpression Request { get; }

[Export ("contextExpression")]
NSExpression Context { get; }

[Export ("countOnlyRequest")]
bool IsCountOnly { [Bind ("isCountOnlyRequest")] get;}
}

[BaseType (typeof (NSPersistentStoreRequest))]
public interface NSFetchRequest : NSCoding {

Expand Down Expand Up @@ -548,6 +593,9 @@ public interface NSManagedObject {
[Export ("isFault")]
bool IsFault { get; }

[Export ("faultingState")]
nuint FaultingState { get; }

[Export ("hasFaultForRelationshipNamed:")]
bool HasFaultForRelationshipNamed (string key);

Expand Down Expand Up @@ -926,6 +974,9 @@ public interface NSMappingModel {
[Static, Export ("mappingModelFromBundles:forSourceModel:destinationModel:")]
NSMappingModel MappingModelFromBundles (NSBundle[] bundles, NSManagedObjectModel sourceModel, NSManagedObjectModel destinationModel);

[Static, Export ("inferredMappingModelForSourceModel:destinationModel:error:")]
NSMappingModel GetInferredMappingModel (NSManagedObjectModel source, NSManagedObjectModel destination, out NSError error);

[Export ("initWithContentsOfURL:")]
IntPtr Constructor (NSUrl url);

Expand Down Expand Up @@ -1451,6 +1502,9 @@ public interface NSPropertyDescription : NSCoding, NSCopying {
[Export ("versionHashModifier")]
string VersionHashModifier { get; set; }

[Export ("renamingIdentifier")]
string RenamingIdentifier { get; set; }

// 5.0
[Since (5,0)]
[Export ("indexedBySpotlight")]
Expand Down

0 comments on commit 860f4f4

Please sign in to comment.