OSDN Git Service

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