Files
Firebird_2D/FireBird2D.Interfaces/Interfaces/IPipeline.cs
T

42 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Firebird2D.Interfaces
{
public interface IPipelineBase
{
/// <summary>
/// Class witch owns the Pipeline and has the right to send events or delete the pipeline
/// </summary>
object PipelineMaster { get; }
/// <summary>
/// Check if no one subscribed to the event
/// </summary>
bool IsEventEmpty { get; }
/// <summary>
/// Subscribe to this event Pipeline
/// </summary>
/// <param name="handler">Handler witch should be Invoked when the event is send</param>
void Subscribe(Delegate handler);
/// <summary>
/// Unsubscribe from this event Pipeline
/// </summary>
/// <param name="handler">Handler witch should be removed from the Pipeline</param>
void Unsubscribe(Delegate handler);
}
/// <summary>
/// Interface for the Firebird event Pipeline
/// </summary>
public interface IPipeline<T> : IPipelineBase where T : EventArgs
{
void SendEvent(object sender, T args);
}
}