C# 클래스 NetSparkle.Sparkle

Class to communicate with a sparkle-based appcast
상속: IDisposable
파일 보기 프로젝트 열기: Deadpikle/NetSparkle 1 사용 예제들

공개 메소드들

메소드 설명
CancelFileDownload ( ) : void

Cancels the install

CheckForUpdatesAtUserRequest ( ) : Task

Check for updates, using interaction appropriate for if the user just said "check for updates".

CheckForUpdatesQuietly ( ) : Task

Check for updates, using interaction appropriate for where the user doesn't know you're doing it, so be polite

CheckOnFirstApplicationIdle ( ) : void

The app will check once, after the app settles down.

Dispose ( ) : void

Is called in the using context and will stop all background activities

GetAbsoluteUrl ( string url ) : Uri

Converts an relative url to an absolute url based on the

GetApplicationConfig ( ) : NetSparkle.NetSparkleConfiguration

This method reads the local sparkle configuration for the given reference assembly

GetUpdateStatus ( NetSparkle.NetSparkleConfiguration config ) : Task

This method checks if an update is required. During this process the appcast will be downloaded and checked against the reference assembly. Ensure that the calling process has read access to the reference assembly. This method is also called from the background loops.

GetWebContentResponse ( string Url ) : WebResponse

TODO

GetWebContentStream ( string Url ) : Stream

TODO

ReportDiagnosticMessage ( string message ) : void

This method reports a message in the diagnostic window

ShowUpdateNeededUI ( NetSparkleAppCastItem updates ) : void

This method shows the update ui and allows to perform the update process

Sparkle ( String appcastUrl ) : System

ctor which needs the appcast url

Sparkle ( String appcastUrl, Icon applicationIcon ) : System

ctor which needs the appcast url

Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode ) : System

ctor which needs the appcast url

Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey ) : System

ctor which needs the appcast url

Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey, String referenceAssembly ) : System

ctor which needs the appcast url and a referenceassembly

Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey, String referenceAssembly, INetSparkleUIFactory factory ) : System

ctor which needs the appcast url and a referenceassembly

StartLoop ( System.Boolean doInitialCheck ) : void

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.

StartLoop ( System.Boolean doInitialCheck, System.Boolean forceInitialCheck ) : void

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.

StartLoop ( System.Boolean doInitialCheck, System.Boolean forceInitialCheck, System.TimeSpan checkFrequency ) : void

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.

StartLoop ( System.Boolean doInitialCheck, System.TimeSpan checkFrequency ) : void

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.

StopLoop ( ) : void

This method will stop the sparkle background loop and is called through the disposable interface automatically

UpdateSystemProfileInformation ( NetSparkle.NetSparkleConfiguration config ) : void

This method updates the profile information which can be sended to the server if enabled

보호된 메소드들

메소드 설명
GetInstallerCommand ( string downloadFileName ) : string

Return installer runner command. May throw InvalidDataException

비공개 메소드들

메소드 설명
AskApplicationToSafelyCloseUp ( ) : Task

Apps may need, for example, to let user save their work

CheckForUpdates ( bool useNotificationToast ) : Task

Does a one-off check for updates

InitDownloadAndInstallProcess ( NetSparkleAppCastItem item ) : void

Starts the download process

OnDownloadFinished ( object sender, AsyncCompletedEventArgs e ) : void

Called when the installer is downloaded

OnFirstApplicationIdle ( object sender, EventArgs e ) : void
OnProgressWindowInstallAndRelaunch ( object sender, EventArgs e ) : void

Called when the progress bar fires the update event

OnToastClick ( NetSparkleAppCastItem updates ) : void
OnUserWindowUserResponded ( object sender, EventArgs e ) : void

Called when the user responds to the "skip, later, install" question.

OnWindowsFormsApplicationExit ( object sender, EventArgs e ) : void

Called when a Windows forms application exits. Starts the installer.

OnWorkerDoWork ( object sender, DoWorkEventArgs e ) : void

This method will be executed as worker thread

OnWorkerProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

This method will be notified

ProfileDataThreadStart ( object obj ) : void

Profile data thread

RemoteCertificateValidation ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Determine if the remote X509 certificate is validate

RunDownloadedInstaller ( ) : System.Threading.Task

Runs the downloaded installer

ShowUpdateNeededUIInner ( NetSparkleAppCastItem updates ) : void
UnregisterEvents ( ) : void

Unregisters events so that we don't have multiple items updating

Update ( NetSparkleAppCastItem updates ) : void

Updates from appcast

메소드 상세

CancelFileDownload() 공개 메소드

Cancels the install
public CancelFileDownload ( ) : void
리턴 void

CheckForUpdatesAtUserRequest() 공개 메소드

Check for updates, using interaction appropriate for if the user just said "check for updates".
public CheckForUpdatesAtUserRequest ( ) : Task
리턴 Task

CheckForUpdatesQuietly() 공개 메소드

Check for updates, using interaction appropriate for where the user doesn't know you're doing it, so be polite
public CheckForUpdatesQuietly ( ) : Task
리턴 Task

CheckOnFirstApplicationIdle() 공개 메소드

The app will check once, after the app settles down.
public CheckOnFirstApplicationIdle ( ) : void
리턴 void

Dispose() 공개 메소드

Is called in the using context and will stop all background activities
public Dispose ( ) : void
리턴 void

GetAbsoluteUrl() 공개 메소드

Converts an relative url to an absolute url based on the
public GetAbsoluteUrl ( string url ) : Uri
url string relative or absolute url
리턴 System.Uri

GetApplicationConfig() 공개 메소드

This method reads the local sparkle configuration for the given reference assembly
public GetApplicationConfig ( ) : NetSparkle.NetSparkleConfiguration
리턴 NetSparkle.NetSparkleConfiguration

GetInstallerCommand() 보호된 메소드

Return installer runner command. May throw InvalidDataException
protected GetInstallerCommand ( string downloadFileName ) : string
downloadFileName string
리턴 string

GetUpdateStatus() 공개 메소드

This method checks if an update is required. During this process the appcast will be downloaded and checked against the reference assembly. Ensure that the calling process has read access to the reference assembly. This method is also called from the background loops.
public GetUpdateStatus ( NetSparkle.NetSparkleConfiguration config ) : Task
config NetSparkle.NetSparkleConfiguration the configuration
리턴 Task

GetWebContentResponse() 공개 메소드

TODO
public GetWebContentResponse ( string Url ) : WebResponse
Url string
리턴 System.Net.WebResponse

GetWebContentStream() 공개 메소드

TODO
public GetWebContentStream ( string Url ) : Stream
Url string
리턴 Stream

ReportDiagnosticMessage() 공개 메소드

This method reports a message in the diagnostic window
public ReportDiagnosticMessage ( string message ) : void
message string
리턴 void

ShowUpdateNeededUI() 공개 메소드

This method shows the update ui and allows to perform the update process
public ShowUpdateNeededUI ( NetSparkleAppCastItem updates ) : void
updates NetSparkleAppCastItem updates to show UI for
리턴 void

Sparkle() 공개 메소드

ctor which needs the appcast url
public Sparkle ( String appcastUrl ) : System
appcastUrl String the URL for the appcast file
리턴 System

Sparkle() 공개 메소드

ctor which needs the appcast url
public Sparkle ( String appcastUrl, Icon applicationIcon ) : System
appcastUrl String the URL for the appcast file
applicationIcon System.Drawing.Icon If you're invoking this from a form, this would be this.Icon
리턴 System

Sparkle() 공개 메소드

ctor which needs the appcast url
public Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode ) : System
appcastUrl String the URL for the appcast file
applicationIcon System.Drawing.Icon If you're invoking this from a form, this would be this.Icon
securityMode SecurityMode Sparkle Security mode
리턴 System

Sparkle() 공개 메소드

ctor which needs the appcast url
public Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey ) : System
appcastUrl String the URL for the appcast file
applicationIcon System.Drawing.Icon If you're invoking this from a form, this would be this.Icon
securityMode SecurityMode
dsaPublicKey String The dsa public key to verfiy the sigatures.
리턴 System

Sparkle() 공개 메소드

ctor which needs the appcast url and a referenceassembly
public Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey, String referenceAssembly ) : System
appcastUrl String the URL for the appcast file
applicationIcon System.Drawing.Icon If you're invoking this from a form, this would be this.Icon
securityMode SecurityMode
dsaPublicKey String
referenceAssembly String the name of the assembly to use for comparison
리턴 System

Sparkle() 공개 메소드

ctor which needs the appcast url and a referenceassembly
public Sparkle ( String appcastUrl, Icon applicationIcon, SecurityMode securityMode, String dsaPublicKey, String referenceAssembly, INetSparkleUIFactory factory ) : System
appcastUrl String the URL for the appcast file
applicationIcon System.Drawing.Icon If you're invoking this from a form, this would be this.Icon
securityMode SecurityMode
dsaPublicKey String
referenceAssembly String the name of the assembly to use for comparison
factory INetSparkleUIFactory UI factory to use
리턴 System

StartLoop() 공개 메소드

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.
public StartLoop ( System.Boolean doInitialCheck ) : void
doInitialCheck System.Boolean
리턴 void

StartLoop() 공개 메소드

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.
public StartLoop ( System.Boolean doInitialCheck, System.Boolean forceInitialCheck ) : void
doInitialCheck System.Boolean true if this instance should do an initial check.
forceInitialCheck System.Boolean true if this instance should force an initial check.
리턴 void

StartLoop() 공개 메소드

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.
public StartLoop ( System.Boolean doInitialCheck, System.Boolean forceInitialCheck, System.TimeSpan checkFrequency ) : void
doInitialCheck System.Boolean true if this instance should do an initial check.
forceInitialCheck System.Boolean true if this instance should force an initial check.
checkFrequency System.TimeSpan the frequency between checks.
리턴 void

StartLoop() 공개 메소드

The method starts a NetSparkle background loop If NetSparkle is configured to check for updates on startup, proceeds to perform the check. You should only call this function when your app is initialized and shows its main window.
public StartLoop ( System.Boolean doInitialCheck, System.TimeSpan checkFrequency ) : void
doInitialCheck System.Boolean true if this instance should do an initial check.
checkFrequency System.TimeSpan the frequency between checks.
리턴 void

StopLoop() 공개 메소드

This method will stop the sparkle background loop and is called through the disposable interface automatically
public StopLoop ( ) : void
리턴 void

UpdateSystemProfileInformation() 공개 메소드

This method updates the profile information which can be sended to the server if enabled
public UpdateSystemProfileInformation ( NetSparkle.NetSparkleConfiguration config ) : void
config NetSparkle.NetSparkleConfiguration the configuration
리턴 void