예제 #1
0
        protected virtual void OnUpdateCheckSuccess(UpdateInformation information)
        {
            var evt = UpdateCheckCompleted;

            if (evt != null)
            {
                evt(this, new UpdateCheckCompletedEventArgs {
                    Success     = true,
                    Information = information
                });
            }
        }
예제 #2
0
        /// <summary>
        /// Asynchronous callback that handles the update check request.
        /// </summary>
        private void CheckForUpdateCallback(IAsyncResult result)
        {
            if (_checkRequest == null)
            {
                return;
            }

            try {
                var response = _checkRequest.EndGetResponse(result);
                LastInformation = ParseUpdateCheckResponse(response.GetResponseStream());

                OnUpdateCheckSuccess(LastInformation);
            }
            catch (Exception ex) {
                OnUpdateCheckError(ex);
            }

            _checkRequest = null;
        }
예제 #3
0
 protected virtual void OnUpdateCheckSuccess(UpdateInformation information)
 {
     var evt = UpdateCheckCompleted;
     if (evt != null) {
         evt(this, new UpdateCheckCompletedEventArgs {
             Success = true,
             Information = information
         });
     }
 }
예제 #4
0
 public static string Serialize(UpdateInformation information)
 {
     var serializer = new XmlSerializer(typeof(UpdateInformation));
     var sb = new StringBuilder();
     using(var writer = new StringWriter(sb)){
         serializer.Serialize(writer, information);
     }
     return sb.ToString();
 }