1
+ namespace Reactive . Streams
2
+ {
3
+ /// <summary>
4
+ /// <para>
5
+ /// A <see cref="IPublisher"/> is a provider of a potentially unbounded number of sequenced elements,
6
+ /// publishing them according to the demand received from its <see cref="ISubscriber"/>.
7
+ /// </para>
8
+ /// <para>
9
+ /// A <see cref="IPublisher"/> can serve multiple <see cref="ISubscriber"/>s subscribed dynamically
10
+ /// at various points in time.
11
+ /// </para>
12
+ /// </summary>
13
+ public interface IPublisher
14
+ {
15
+ /// <summary>
16
+ /// <para>
17
+ /// Request <see cref="IPublisher"/> to start streaming data.
18
+ /// </para>
19
+ /// <para>
20
+ /// This is a "factory method" and can be called multiple times, each time starting a new
21
+ /// <see cref="ISubscription"/>.
22
+ /// </para>
23
+ /// <para>
24
+ /// Each <see cref="ISubscription"/> will work for only a single <see cref="ISubscriber"/>.
25
+ /// </para>
26
+ /// <para>
27
+ /// A <see cref="ISubscriber"/> should only subscribe once to a single
28
+ /// <see cref="IPublisher"/>.
29
+ /// </para>
30
+ /// <para>
31
+ /// If the <see cref="IPublisher"/> rejects the subscription attempt or otherwise fails
32
+ /// it will signal the error via <see cref="ISubscriber.OnError"/>.
33
+ /// </para>
34
+ /// </summary>
35
+ /// <param name="subscriber">The <see cref="ISubscriber"/> that will consume signals
36
+ /// from this <see cref="IPublisher"/></param>
37
+ void Subscribe ( ISubscriber subscriber ) ;
38
+ }
39
+
40
+ /// <summary>
41
+ /// <para>
42
+ /// A <see cref="IPublisher{T}"/> is a provider of a potentially unbounded number of sequenced elements,
43
+ /// publishing them according to the demand received from its <see cref="ISubscriber{T}"/>.
44
+ /// </para>
45
+ /// <para>
46
+ /// A <see cref="IPublisher{T}"/> can serve multiple <see cref="ISubscriber{T}"/>s subscribed dynamically
47
+ /// at various points in time.
48
+ /// </para>
49
+ /// </summary>
50
+ /// <typeparam name="T">The type of element signaled.</typeparam>
51
+ public interface IPublisher < out T > : IPublisher
52
+ {
53
+ /// <summary>
54
+ /// <para>
55
+ /// Request <see cref="IPublisher{T}"/> to start streaming data.
56
+ /// </para>
57
+ /// <para>
58
+ /// This is a "factory method" and can be called multiple times, each time starting a new
59
+ /// <see cref="ISubscription"/>.
60
+ /// </para>
61
+ /// <para>
62
+ /// Each <see cref="ISubscription"/> will work for only a single <see cref="ISubscriber{T}"/>.
63
+ /// </para>
64
+ /// <para>
65
+ /// A <see cref="ISubscriber{T}"/> should only subscribe once to a single
66
+ /// <see cref="IPublisher{T}"/>.
67
+ /// </para>
68
+ /// <para>
69
+ /// If the <see cref="IPublisher{T}"/> rejects the subscription attempt or otherwise fails
70
+ /// it will signal the error via <see cref="ISubscriber.OnError"/>.
71
+ /// </para>
72
+ /// </summary>
73
+ /// <param name="subscriber">The <see cref="ISubscriber{T}"/> that will consume signals
74
+ /// from this <see cref="IPublisher{T}"/></param>
75
+ void Subscribe ( ISubscriber < T > subscriber ) ;
76
+ }
77
+ }
0 commit comments