Class ClassPermission
An object which describes class-wide permissions.
Inherited Members
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
[MapTo("__Class")]
public class ClassPermission : RealmObject, INotifyPropertyChanged, ISchemaSource, IThreadConfined, NotificationsHelper.INotifiable, IReflectableType
Remarks
An instance of this object is automatically created in the Realm for class in your schema, and should not be created manually. Call Get<T>(Realm) or Get(Realm, String) to obtain the existing instance, or query ClassPermission as normal.
Properties
| Improve this Doc View SourceName
Gets the name of the class which these permissions apply to.
Declaration
[MapTo("name")]
[PrimaryKey]
[Required]
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Permissions
Gets the permissions for this class.
Declaration
[MapTo("permissions")]
public IList<Permission> Permissions { get; }
Property Value
| Type | Description |
|---|---|
| IList<Permission> |
Methods
| Improve this Doc View SourceGet(Realm, String)
Retrieves the ClassPermission for the given class name.
This will return null for Realms in full synchronization mode.
Declaration
public static ClassPermission Get(Realm realm, string className)
Parameters
| Type | Name | Description |
|---|---|---|
| Realm | realm | The Realm instance. |
| String | className | The name of a RealmObject subclass whose corresponding ClassPermission will be obtained. |
Returns
| Type | Description |
|---|---|
| ClassPermission | A |
Get<T>(Realm)
Retrieves the ClassPermission for the given
RealmObject subclass. This will return null for Realms in full synchronization mode.
Declaration
public static ClassPermission Get<T>(Realm realm)
where T : RealmObject
Parameters
| Type | Name | Description |
|---|---|---|
| Realm | realm | The Realm instance. |
Returns
| Type | Description |
|---|---|
| ClassPermission | A |
Type Parameters
| Name | Description |
|---|---|
| T | The RealmObject subclass whose corresponding ClassPermission will be obtained. |