Class UpdatingSession
- Namespace
- CarinaStudio.AutoUpdate.ViewModels
- Assembly
- CarinaStudio.AppBase.AutoUpdate.dll
Base class of view-model of auto updating session.
public abstract class UpdatingSession : ViewModel, IDisposable, IApplicationObject, IThreadDependent, ISynchronizable, INotifyPropertyChanged
- Inheritance
-
UpdatingSession
- Implements
- Inherited Members
- Extension Methods
Constructors
UpdatingSession(IApplication)
Initialize new UpdatingSession instance.
protected UpdatingSession(IApplication app)
Parameters
appIApplicationApplication.
Fields
ApplicationNameProperty
Property of ApplicationName
public static readonly ObservableProperty<string?> ApplicationNameProperty
Field Value
DownloadedPackageSizeProperty
Property of DownloadedPackageSize
public static readonly ObservableProperty<long> DownloadedPackageSizeProperty
Field Value
IsBackingUpApplicationProperty
Property of IsBackingUpApplication
public static readonly ObservableProperty<bool> IsBackingUpApplicationProperty
Field Value
IsDownloadingPackageProperty
Property of IsDownloadingPackage
public static readonly ObservableProperty<bool> IsDownloadingPackageProperty
Field Value
IsInstallingPackageProperty
Property of IsInstallingPackage
public static readonly ObservableProperty<bool> IsInstallingPackageProperty
Field Value
IsProgressAvailableProperty
Property of IsProgressAvailable
public static readonly ObservableProperty<bool> IsProgressAvailableProperty
Field Value
IsRefreshingApplicationIconProperty
Property of IsRefreshingApplicationIcon
public static readonly ObservableProperty<bool> IsRefreshingApplicationIconProperty
Field Value
IsResolvingPackageProperty
Property of IsResolvingPackage
public static readonly ObservableProperty<bool> IsResolvingPackageProperty
Field Value
IsRestoringApplicationProperty
Property of IsRestoringApplication
public static readonly ObservableProperty<bool> IsRestoringApplicationProperty
Field Value
IsUpdatingCancelledProperty
Property of IsUpdatingCancelled
public static readonly ObservableProperty<bool> IsUpdatingCancelledProperty
Field Value
IsUpdatingCancellingProperty
Property of IsUpdatingCancelling
public static readonly ObservableProperty<bool> IsUpdatingCancellingProperty
Field Value
IsUpdatingCompletedProperty
Property of IsUpdatingCompleted
public static readonly ObservableProperty<bool> IsUpdatingCompletedProperty
Field Value
IsUpdatingFailedProperty
Property of IsUpdatingFailed
public static readonly ObservableProperty<bool> IsUpdatingFailedProperty
Field Value
IsUpdatingProperty
Property of IsUpdating
public static readonly ObservableProperty<bool> IsUpdatingProperty
Field Value
IsUpdatingSucceededProperty
Property of IsUpdatingSucceeded
public static readonly ObservableProperty<bool> IsUpdatingSucceededProperty
Field Value
IsVerifyingPackageProperty
Property of IsVerifyingPackage
public static readonly ObservableProperty<bool> IsVerifyingPackageProperty
Field Value
MessageProperty
Property of Message
public static readonly ObservableProperty<string?> MessageProperty
Field Value
PackageSizeProperty
Property of PackageSize
public static readonly ObservableProperty<long?> PackageSizeProperty
Field Value
ProgressPercentageProperty
Property of ProgressPercentage
public static readonly ObservableProperty<double> ProgressPercentageProperty
Field Value
RefreshApplicationIconAutomaticallyProperty
Property of RefreshApplicationIconAutomatically
public static readonly ObservableProperty<bool> RefreshApplicationIconAutomaticallyProperty
Field Value
RefreshApplicationIconMessageProperty
Property of RefreshApplicationIconMessage
public static readonly ObservableProperty<string?> RefreshApplicationIconMessageProperty
Field Value
Properties
ApplicationBaseVersion
Get or set base version of application to update.
public Version? ApplicationBaseVersion { get; set; }
Property Value
ApplicationDirectoryPath
Get or set path to directory of application to update.
public string? ApplicationDirectoryPath { get; set; }
Property Value
ApplicationName
Get or set name of application to update.
public string? ApplicationName { get; set; }
Property Value
CancelUpdatingCommand
Command to cancel updating process.
public ICommand CancelUpdatingCommand { get; }
Property Value
DownloadedPackageSize
Get size of downloaded package in bytes.
public long DownloadedPackageSize { get; }
Property Value
IsBackingUpApplication
Check whether application is being backed-up or not.
public bool IsBackingUpApplication { get; }
Property Value
IsDownloadingPackage
Check whether update package is being downloaded or not.
public bool IsDownloadingPackage { get; }
Property Value
IsInstallingPackage
Check whether update package is being installed or not.
public bool IsInstallingPackage { get; }
Property Value
IsProgressAvailable
Check whether progress of updating is available or not.
public bool IsProgressAvailable { get; }
Property Value
IsRefreshingApplicationIcon
Check whether application icon refreshing is being performed or not.
public bool IsRefreshingApplicationIcon { get; }
Property Value
IsResolvingPackage
Check whether update package is being resolved or not.
public bool IsResolvingPackage { get; }
Property Value
IsRestoringApplication
Check whether application is being restored or not.
public bool IsRestoringApplication { get; }
Property Value
IsUpdating
Check whether updating processing is on-going or not.
public bool IsUpdating { get; }
Property Value
IsUpdatingCancelled
Check whether updating processing is cancelled or not.
public bool IsUpdatingCancelled { get; }
Property Value
IsUpdatingCancelling
Check whether updating processing is being cancelled or not.
public bool IsUpdatingCancelling { get; }
Property Value
IsUpdatingCompleted
Check whether updating processing is completed either successfully or unsuccessfully.
public bool IsUpdatingCompleted { get; }
Property Value
IsUpdatingFailed
Check whether updating processing is completed unsuccessfully or not.
public bool IsUpdatingFailed { get; }
Property Value
IsUpdatingSucceeded
Check whether updating processing is completed successfully or not.
public bool IsUpdatingSucceeded { get; }
Property Value
IsVerifyingPackage
Check whether downloaded update package is being verified or not.
public bool IsVerifyingPackage { get; }
Property Value
Message
Get message which describes status of updating.
public string? Message { get; }
Property Value
PackageManifestSource
Get or set source of package manifest.
public IStreamProvider? PackageManifestSource { get; set; }
Property Value
PackageRequestHeaders
Get collection of custom headers for requesting package download.
public IDictionary<string, string> PackageRequestHeaders { get; }
Property Value
PackageSize
Get size of package in bytes.
public long? PackageSize { get; }
Property Value
- long?
ProgressPercentage
Get current progress of updating in percentage. NaN if progress is unavailable.
public double ProgressPercentage { get; }
Property Value
RefreshApplicationIconAutomatically
Get or set whether refreshing application should be performed when needed or not.
public bool RefreshApplicationIconAutomatically { get; set; }
Property Value
RefreshApplicationIconMessage
Get or set message for refreshing application icon.
public string? RefreshApplicationIconMessage { get; set; }
Property Value
SelfContainedPackageOnly
Get or set whether only self-contained update package can be selected or not.
public bool SelfContainedPackageOnly { get; set; }
Property Value
StartUpdatingCommand
Command to start updating process.
public ICommand StartUpdatingCommand { get; }
Property Value
UpdaterProgress
Get progress reported by internal Updater.
protected double UpdaterProgress { get; }
Property Value
UpdaterState
Get state of internal Updater.
protected UpdaterState UpdaterState { get; }
Property Value
UpdatingVersion
Get version of application which is updating to.
protected Version? UpdatingVersion { get; }
Property Value
Methods
CreatePackageResolver(IStreamProvider)
Create IPackageResolver before updating process start.
protected virtual IPackageResolver CreatePackageResolver(IStreamProvider source)
Parameters
sourceIStreamProviderSource of package manifest.
Returns
Remarks
Will create XmlPackageResolver by default implementation.
Dispose(bool)
Dispose the instance.
protected override void Dispose(bool disposing)
Parameters
disposingboolTrue to dispose managed resources.
OnPropertyChanged(ObservableProperty, object?, object?)
Called when property changed.
protected override void OnPropertyChanged(ObservableProperty property, object? oldValue, object? newValue)
Parameters
propertyObservablePropertyChanged property.
oldValueobjectOld value.
newValueobjectNew value.
OnUpdaterProgressChanged()
Called when progress reported by internal Updater changed.
protected virtual void OnUpdaterProgressChanged()
OnUpdaterStateChanged()
Called when state of internal Updater changed.
protected virtual void OnUpdaterStateChanged()