Inheritance: IUpdateSource
		public void can_download_ansi_feed()
		{
			const string expected = "NHibernate.Profiler-Build-";

			var ws = new SimpleWebSource("http://builds.hibernatingrhinos.com/latest/nhprof");
			var str = ws.GetUpdatesFeed();

			Assert.AreEqual(expected, str.Substring(0, expected.Length));
		}
 public static void CheckForUpdatesAndApply()
 {
     var updateManager = UpdateManager.Instance;
     IUpdateSource src = new SimpleWebSource(@"http://updates.btsdevelopment.com.au/LogQuery/Latest/LogQuery.xml");
     updateManager.UpdateSource = src;
     updateManager.ReinstateIfRestarted();
     updateManager.CheckForUpdates();
     updateManager.PrepareUpdates();
     updateManager.ApplyUpdates(false, true, false);
 }
Exemple #3
0
		private void btnCheckForUpdatesCustom_Click(object sender, EventArgs e)
		{
			string feedUrl = InputBox("Please enter a Url for a valid NauXml feed", "Feed Url required", "");

			if (string.IsNullOrEmpty(feedUrl)) return;

			IUpdateSource source = UpdateManager.Instance.UpdateSource;
			if (source is SimpleWebSource) {
				// All we need to do is set the feed url and we are all set, no need to create new objects etc
				((SimpleWebSource)source).FeedUrl = feedUrl;
				CheckForUpdates(source);
			} else {
				// No idea what we had there, so we create a new feed source and pass it along - note the
				// source for retreiving the actual updates will keep intact, and will be used when preparing
				// the updates
				source = new SimpleWebSource(feedUrl);
				CheckForUpdates(source);
			}
		}