using System;

namespace CodeJam.Extensibility.EventBroker
{
	/// <summary>
	/// Áðîêåð ñîáûòèé.
	/// </summary>
	public interface IEventBroker
	{
		/// <summary>
		/// Îïîâåñòèòü ïîäïèñ÷èêîâ î ñîáûòèè.
		/// </summary>
		void Fire<T>(string eventName, T arg);

		/// <summary>
		/// Ïîäïèñàòüñÿ íà ñîáûòèå.
		/// </summary>
		IDisposable Subscribe<T>(string eventName, IObserver<T> observer);
	}
}