Click or drag to resize
MobileResource Class
Base class for MobileObject, MobileCollection and MobileFile.
Inheritance Hierarchy

Namespace: Oracle.Cloud.Mobile.Synchronization.MobileEndpoint
Assemblies:  Oracle.Cloud.Mobile.Synchronization.PCL (in Oracle.Cloud.Mobile.Synchronization.PCL.dll) Version: 16.1.3.1 (16.1.3.1)
  Oracle.Cloud.Mobile (in Oracle.Cloud.Mobile.dll) Version: 16.1.3.1 (16.1.3.1)
Syntax
public abstract class MobileResource : INotifyPropertyChanged, 
	IDisposable

The MobileResource type exposes the following members.

Properties
  NameDescription
Public propertyHasConflict
Returns true if offline updates resulted in a conflict on the service, false otherwise.
Public propertyHasOfflineCommitError
Returns true if committing an offline update to the service resulted in an error from the service.
Public propertyHasOfflineUpdates
Returns true if the resource has pending offline updates, false otherwise.
Public propertyIsPendingOfflineDelete
Returns true if the resource was deleted while offline, false otherwise.
Public propertyIsPinned
Returns true if this resource is pinned, false otherwise. Pinned resources are not evicted and can be synchronized in a batch by calling Synchronizer.SynchronizePinnedResourcesAsync.
Public propertyLastSyncTime
The time that this resource was last synchronized, null if it was never synchronized ex if it was just created locally.
Public propertyUri
The Uri of the object. For locally created objects that are not yet committed to the service, a unique Uri is generated in its endpoint that would be updated by the service.
Top
Methods
  NameDescription
Public methodAddLinkedResourceAsync
Adds a depdendency to another resource. This depdency is used to monitor changes to the linked resources in case of offline writes: ex. if Resource1 and Resource2 were both created while offline and Resource2 embeds a link to Resource1, the URI for Resource1 would be a temporary one created offline by the system. On going online, when the real URI for Resource1 gets assigned by the service, Resource2 would get notified in OnLinkedResourceUriChanged() and can update the embedded link to the new URI.
Protected methodDispose
Dispose method of the disposable pattern.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodNotifyPropertyChanged
Raises the PropertyChanged event.
Protected methodOnCachedResourceChanged
Invoked if the object inthe cache has changed. This instance will not be automatically loaded from the cached copy. Callers can reload from the cache by calling ReloadAsync(). The event is only raised if StartListeningForChanges() is invoked. Derived classes can override this method.
Protected methodOnLinkedResourceUriChanged
This method along with AddLinkedResourceAsync can be used to monitor changes to linked resources created offlien: ex. if Resource1 and Resource2 were both created while offline and Resource2 embeds a link to Resource1, the URI for Resource1 would be a temporary one created offline by the system. On going online, when the real URI for Resource1 gets assigned by the service, Resource2 would get notified in OnLinkedResourceUriChanged() and can update the embedded link to the new URI. For this method to be invoked, AddLinkedResourceAsync() must have been previous called and both the resources saved offline.
Public methodPinAsync
Pins this resource.
Public methodReloadAsync
Reloads the data that was last downloaded from the service. If the device is offline then it loads data from the cache. Any offline updates are not discarded.
Public methodReloadAsync(Boolean, Boolean)
Reloads the data.
Public methodStartListeningForChanges
Starts listening for cache changes and raises the ResourceChanged event. Callers must call StopListeningForChanges() or Dispose() when events are no longer required otherwise the object will leak.
Public methodStopListeningForChanges
Stops listening for cache changes and ResourceChanged will no longer be raised.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnpinAsync
Unpins this resource.
Top
Events
  NameDescription
Public eventPropertyChanged
Event that is raised if the object changes or if it is reloaded from the cache. Derived classes can raise the event by calling NotifyPropretyChanged().
Top
See Also