/* UpdateCheckInformation.cs $ This file is part of the HandBrake source code. Homepage: . It may be used under the terms of the GNU General Public License. */ namespace Handbrake.Functions { using System; using System.Threading; /// /// Provides information about an update check. /// public struct UpdateCheckInformation { /// /// Gets or sets a value indicating whether a New Version is Available. /// public bool NewVersionAvailable { get; set; } /// /// Gets a value indicating whether an Error Occured. /// public bool ErrorOccured { get { return this.Error != null; } } /// /// Gets or sets information about the new build, if any. This will be null if there is no new verison. /// public AppcastReader BuildInformation { get; set; } /// /// Gets or sets the error that occurred, if any. This will be null if no error occured. /// public Exception Error { get; set; } } /// /// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern. /// public class UpdateCheckResult : IAsyncResult { /// /// Initializes a new instance of the class. /// /// /// The async state. /// /// /// The info. /// public UpdateCheckResult(object asyncState, UpdateCheckInformation info) { this.AsyncState = asyncState; this.Result = info; } /// /// Gets whether the check was executed in debug mode. /// public object AsyncState { get; private set; } /// /// Gets the result of the update check. /// public UpdateCheckInformation Result { get; private set; } /// /// Gets AsyncWaitHandle. /// /// /// public WaitHandle AsyncWaitHandle { get { throw new NotImplementedException(); } } /// /// Gets a value indicating whether CompletedSynchronously. /// /// /// public bool CompletedSynchronously { get { throw new NotImplementedException(); } } /// /// Gets a value indicating whether IsCompleted. /// /// /// public bool IsCompleted { get { throw new NotImplementedException(); } } } }