Projektdateien hinzufügen.
This commit is contained in:
23
WindowsFormsApp1/OP/ISubject.cs
Normal file
23
WindowsFormsApp1/OP/ISubject.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace WindowsFormsApp1.OP
|
||||
{
|
||||
public interface ISubject<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Attach an observer to the object.
|
||||
/// </summary>
|
||||
/// <param name="observer">Your Observer.</param>
|
||||
void Subscribe(IObserver<T> observer);
|
||||
/// <summary>
|
||||
/// Detach an observer from an object.
|
||||
/// </summary>
|
||||
/// <param name="observer">Your observer.</param>
|
||||
void Unsubscribe(IObserver<T> observer);
|
||||
/// <summary>
|
||||
/// Notify all observers about an event.
|
||||
/// </summary>
|
||||
void Notify();
|
||||
|
||||
void SetState(T state);
|
||||
T GetState();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user