Click or drag to resize
MobileFile Class
Class that represents an file or blob returned by a custom code API.
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 sealed class MobileFile : MobileResource

The MobileFile type exposes the following members.

Properties
  NameDescription
Public propertyContentType
The Content-Type of the file.
Public propertyHasConflict
Returns true if offline updates resulted in a conflict on the service, false otherwise.
(Inherited from MobileResource.)
Public propertyHasOfflineCommitError
Returns true if committing an offline update to the service resulted in an error from the service.
(Inherited from MobileResource.)
Public propertyHasOfflineUpdates
Returns true if the resource has pending offline updates, false otherwise.
(Inherited from MobileResource.)
Public propertyIsPendingOfflineDelete
Returns true if the resource was deleted while offline, false otherwise.
(Inherited from MobileResource.)
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.
(Inherited from MobileResource.)
Public propertyLastSyncTime
The time that this resource was last synchronized, null if it was never synchronized ex if it was just created locally.
(Inherited from MobileResource.)
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.
(Inherited from MobileResource.)
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.
(Inherited from MobileResource.)
Public methodDeleteAsync
Deletes the file. Caches the delete locally if offline.
Public methodDeleteAsync(Boolean)
Deletes the file.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetConflictingFileAsync
Returns the file that conflicts with this one. Only the cached copy is returned (if it exists), so callers should refresh the file from the service first.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodOpenDataStreamAsync
Gets the stream that can be used to read the file contents.
Public methodOpenStreamAsync
Gets the stream that can be used to read the file contents.
Public methodPinAsync
Pins this resource.
(Inherited from MobileResource.)
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.
(Inherited from MobileResource.)
Public methodReloadAsync(Boolean, Boolean)
Reloads the data.
(Inherited from MobileResource.)
Public methodSaveAsync(Stream, String)
Saves any changes to the object back to the service. Caches the changes locally if offline.
Public methodSaveAsync(IInputStream, String)
Saves any changes to the object back to the service. Caches the changes locally if offline.
Public methodSaveAsync(Stream, String, Boolean)
Saves any changes to the file back to the service. If saveIfOffline is true, it will cache the changes incase of offline.
Public methodSaveAsync(IInputStream, String, Boolean)
Saves any changes to the file back to the service. If saveIfOffline is true, it will cache the changes incase of offline.
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.
(Inherited from MobileResource.)
Public methodStopListeningForChanges
Stops listening for cache changes and ResourceChanged will no longer be raised.
(Inherited from MobileResource.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnpinAsync
Unpins this resource.
(Inherited from MobileResource.)
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().
(Inherited from MobileResource.)
Top
See Also