
//============================================================================================================
// Microsoft Updater Application Block for .NET
//  http://msdn.microsoft.com/library/en-us/dnbda/html/updater.asp
//	
// IPostProcessor.cs
//
// Interface to define Post-Processor contract.
// 
// For more information see the Updater Application Block Implementation Overview. 
// 
//============================================================================================================
// Copyright (C) 2000-2001 Microsoft Corporation
// All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
// FITNESS FOR A PARTICULAR PURPOSE.
//============================================================================================================


using System;

namespace Microsoft.ApplicationBlocks.ApplicationUpdater.Interfaces
{
	/// <summary>
	/// Interface for post-processing assemblies.  they are downloaded during updates then activated to do post-processing when
	/// validation is complete
	/// </summary>
	public interface IPostProcessor : IDisposable
	{
		/// <summary>
		/// well-known entry point for AppUpdater to call
		/// </summary>
		void Run();
		//  ****  NOTE  ****
		//  The IPP is run on a separate thread by the DownloaderManager so:
		//  1)  we are not attempting to clean up this thread, catch exceptions, etc.
		//  2)  IF the IPP needs to Dispose(), it must do so internally when it unwinds its stack--
		//		so when Run() is complete, call Dispose() internally
		//	 3)  the IPP should be aware that the parent app might shut down ungracefully--SO it should sink the 
		//		ProcessExit event and do cleanup
		//	 4)  in case it is Abort()'ed or Interrupt()'ed, it should catch both those exceptions and clean up.
	}
}
