MobileResource Methods |
The MobileResource type exposes the following members.
Name | Description | |
---|---|---|
![]() | AddLinkedResourceAsync |
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.
|
![]() | Dispose |
Dispose method of the disposable pattern.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | NotifyPropertyChanged |
Raises the PropertyChanged event.
|
![]() | OnCachedResourceChanged |
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.
|
![]() | OnLinkedResourceUriChanged |
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.
|
![]() | PinAsync |
Pins this resource.
|
![]() | ReloadAsync |
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.
|
![]() | ReloadAsync(Boolean, Boolean) |
Reloads the data.
|
![]() | StartListeningForChanges |
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.
|
![]() | StopListeningForChanges |
Stops listening for cache changes and ResourceChanged will no longer be raised.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UnpinAsync |
Unpins this resource.
|