Class PermissionOfferResponse
Objects of this class are used to accept a PermissionOffer using a provided Token.
Inherited Members
Namespace:Realms.Sync
Assembly:Realm.Sync.dll
Syntax
public class PermissionOfferResponse : RealmObject, INotifyPropertyChanged, ISchemaSource, IThreadConfined, NotificationsHelper.INotifiable, IPermissionObject
Remarks
Create an instance of PermissionOfferResponse using the provided Token and add it to the User's ManagementRealm. After that, you should subscribe to PropertyChanged to be notified when the server processes the response. Once the request has been processed, the Status, StatusMessage, and ErrorCode will be updated accordingly. If the request has been processed successfully, the RealmUrl will be populated and you can use it to create a new SyncConfiguration. If the request has failed, the StatusMessage will be updated with relevant information about the failure and ErrorCode will be set to a non-null value.
Constructors
| Improve this Doc View SourcePermissionOfferResponse(String)
Initializes a new instance of the PermissionOfferResponse class.
Declaration
public PermissionOfferResponse(string token)
Parameters
Type | Name | Description |
---|---|---|
String | token | The token that was provided by the offering user. |
Properties
| Improve this Doc View SourceCreatedAt
Gets the creation time of this object.
Declaration
[MapTo("createdAt")]
public DateTimeOffset CreatedAt { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset | A DateTimeOffset indicating the object's creation date and time. |
Implements
| Improve this Doc View SourceErrorCode
Gets the ErrorCode if any.
Declaration
public ErrorCode? ErrorCode { get; }
Property Value
Type | Description |
---|---|
Nullable<ErrorCode> | An ErrorCode that indicates the reason for the error during processing.
|
Implements
Remarks
Filled by the server after an object was processed indicating the status of the operation. If Status returns Error, the ErrorCode property can be used to get a strongly typed code for the error and handle expected error conditions, such as expired offer or attempting to share a realm without having manage access.
Id
Gets the unique identifier of this object in the Management realm.
Declaration
[PrimaryKey]
[Required]
[MapTo("id")]
public string Id { get; }
Property Value
Type | Description |
---|---|
String | The unique id of the object. |
Implements
| Improve this Doc View SourceRealmUrl
Gets the url of the Realm that the token has granted permissions to.
Declaration
[MapTo("realmUrl")]
public string RealmUrl { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Filled by the server after the PermissionOfferResponse was processed.
Status
Gets the ManagementObjectStatus as set by the server.
Declaration
public ManagementObjectStatus Status { get; }
Property Value
Type | Description |
---|---|
ManagementObjectStatus | An enum indicating whether the operation has completed successfully. |
Implements
| Improve this Doc View SourceStatusMessage
Gets the status message.
Declaration
[MapTo("statusMessage")]
public string StatusMessage { get; }
Property Value
Type | Description |
---|---|
String | A detailed message describing the status (success, error) of the operation. |
Implements
Remarks
Filled by the server after an object was processed with additional info explaining the status if necessary.
Token
Gets the token that was provided by the offering user.
Declaration
[Required]
[MapTo("token")]
public string Token { get; }
Property Value
Type | Description |
---|---|
String |
UpdatedAt
Gets when the object was updated the last time.
Declaration
[MapTo("updatedAt")]
public DateTimeOffset UpdatedAt { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset | A DateTimeOffset indicating the last time the object has been updated. |
Implements
Remarks
This will be updated by the server with the current object when the object is processed.
Methods
| Improve this Doc View SourceOnPropertyChanged(String)
Called when a property has changed on this class.
Declaration
protected override void OnPropertyChanged(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | The name of the property. |
Overrides
Remarks
For this method to be called, you need to have first subscribed to PropertyChanged. This can be used to react to changes to the current object, e.g. raising PropertyChanged for computed properties.