-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathITransient.cs
executable file
·43 lines (34 loc) · 1.25 KB
/
ITransient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// (C) 2012 christian.schladetsch@gmail.com See https://github.com/cschladetsch/Flow.
using System;
namespace Flow {
public delegate void TransientHandler(ITransient sender);
public delegate void TransientHandlerReason(ITransient sender, ITransient reason);
/// <inheritdoc cref="INamed" />
/// <inheritdoc cref="IDisposable" />
/// <summary>
/// An ITransient object has-a IKernel and notifies observers when it
/// has been Disposed.
/// </summary>
public interface ITransient
: INamed {
/// <summary>
/// True if the transient has not been Completed.
/// </summary>
bool Active { get; }
/// <summary>
/// The kernel that made this transient.
/// </summary>
IKernel Kernel { get; /* TODO internal: */ set; }
event TransientHandler Completed;
void Complete();
ITransient Named(string name);
ITransient AddTo(IGroup group);
/// <summary>
/// Resume the given process after this one completes.
/// </summary>
/// <param name="next"></param>
//ITransient Then(IGenerator next);
//ITransient Then(Action action);
//ITransient Then(Action<ITransient> action);
}
}