Skip to content

Commit 6201bbe

Browse files
committed
Merge pull request #2 from alarsoft/initial-release
Initial API port
2 parents 158611b + 61a56fd commit 6201bbe

12 files changed

+606
-5
lines changed

.gitattributes

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
5+
# Custom for Visual Studio
6+
*.cs diff=csharp
7+
*.sln merge=union
8+
*.csproj merge=union
9+
*.vbproj merge=union
10+
*.fsproj merge=union
11+
*.dbproj merge=union
12+
13+
# Standard to msysgit
14+
*.doc diff=astextplain
15+
*.DOC diff=astextplain
16+
*.docx diff=astextplain
17+
*.DOCX diff=astextplain
18+
*.dot diff=astextplain
19+
*.DOT diff=astextplain
20+
*.pdf diff=astextplain
21+
*.PDF diff=astextplain
22+
*.rtf diff=astextplain
23+
*.RTF diff=astextplain
24+
25+
# Needed for Mono build shell script
26+
*.sh -text eol=lf
27+
28+
# Needed for API Approvals
29+
*.txt text eol=crlf

.gitignore

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
2+
#GitExtensions
3+
us.stackdump
4+
5+
#KDiff3 and other git merge tools
6+
*.orig
7+
8+
#-------------------------------------------------------------------------------
9+
#Based on https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
10+
11+
## Ignore Visual Studio temporary files, build results, and
12+
## files generated by popular Visual Studio add-ons.
13+
14+
# User-specific files
15+
*.suo
16+
*.user
17+
*.sln.docstates
18+
19+
#MonoDevelop
20+
*.userprefs
21+
22+
# Build results
23+
[Dd]ebug/
24+
[Dd]ebugPublic/
25+
[Rr]elease/
26+
[Rr]eleases/
27+
x64/
28+
x86/
29+
build/
30+
bld/
31+
[Bb]in/
32+
[Oo]bj/
33+
34+
# Roslyn cache directories
35+
*.ide/
36+
37+
# MSTest test Results
38+
[Tt]est[Rr]esult*/
39+
[Bb]uild[Ll]og.*
40+
41+
# NBench results
42+
[Pp]erf[Rr]esult*/
43+
44+
#NUNIT
45+
*.VisualState.xml
46+
TestResult.xml
47+
48+
# Build Results of an ATL Project
49+
[Dd]ebugPS/
50+
[Rr]eleasePS/
51+
dlldata.c
52+
53+
*_i.c
54+
*_p.c
55+
*_i.h
56+
*.ilk
57+
*.meta
58+
*.obj
59+
*.pch
60+
*.pdb
61+
*.pgc
62+
*.pgd
63+
*.rsp
64+
*.sbr
65+
*.tlb
66+
*.tli
67+
*.tlh
68+
*.tmp
69+
*.tmp_proj
70+
*.log
71+
*.vspscc
72+
*.vssscc
73+
.builds
74+
*.pidb
75+
*.svclog
76+
*.scc
77+
78+
# Chutzpah Test files
79+
_Chutzpah*
80+
81+
# Visual C++ cache files
82+
ipch/
83+
*.aps
84+
*.ncb
85+
*.opensdf
86+
*.sdf
87+
*.cachefile
88+
89+
# Visual Studio profiler
90+
*.psess
91+
*.vsp
92+
*.vspx
93+
94+
# TFS 2012 Local Workspace
95+
$tf/
96+
97+
# Guidance Automation Toolkit
98+
*.gpState
99+
100+
# ReSharper is a .NET coding add-in
101+
_ReSharper*/
102+
*.[Rr]e[Ss]harper
103+
*.DotSettings.user
104+
105+
# JustCode is a .NET coding addin-in
106+
.JustCode
107+
108+
# TeamCity is a build add-in
109+
_TeamCity*
110+
111+
# DotCover is a Code Coverage Tool
112+
*.dotCover
113+
114+
# NCrunch
115+
_NCrunch_*
116+
.*crunch*.local.xml
117+
*.ncrunchsolution
118+
*.v2.ncrunchproject
119+
120+
121+
# MightyMoose
122+
*.mm.*
123+
AutoTest.Net/
124+
125+
# Web workbench (sass)
126+
.sass-cache/
127+
128+
# Installshield output folder
129+
[Ee]xpress/
130+
131+
# DocProject is a documentation generator add-in
132+
DocProject/buildhelp/
133+
DocProject/Help/*.HxT
134+
DocProject/Help/*.HxC
135+
DocProject/Help/*.hhc
136+
DocProject/Help/*.hhk
137+
DocProject/Help/*.hhp
138+
DocProject/Help/Html2
139+
DocProject/Help/html
140+
141+
# Click-Once directory
142+
publish/
143+
144+
# Publish Web Output
145+
*.[Pp]ublish.xml
146+
*.azurePubxml
147+
# TODO: Comment out the next line if you want to keep your passwords hidden
148+
*.pubxml
149+
150+
# NuGet Packages
151+
*.nupkg
152+
# The packages folder can be ignored because of Package Restore
153+
**/packages/*
154+
# except build/, which is used as an MSBuild target.
155+
!**/packages/build/
156+
# If using the old MSBuild-Integrated Package Restore, uncomment this:
157+
!**/packages/repositories.config
158+
159+
# Windows Azure Build Output
160+
csx/
161+
*.build.csdef
162+
163+
# Windows Store app package directory
164+
AppPackages/
165+
166+
# Others
167+
sql/
168+
*.Cache
169+
ClientBin/
170+
[Ss]tyle[Cc]op.*
171+
~$*
172+
*~
173+
*.dbmdl
174+
*.dbproj.schemaview
175+
*.pfx
176+
*.publishsettings
177+
node_modules/
178+
179+
# RIA/Silverlight projects
180+
Generated_Code/
181+
182+
# Backup & report files from converting an old project file
183+
# to a newer Visual Studio version. Backup files are not needed,
184+
# because we have git ;-)
185+
_UpgradeReport_Files/
186+
Backup*/
187+
UpgradeLog*.XML
188+
UpgradeLog*.htm
189+
190+
# SQL Server files
191+
*.mdf
192+
*.ldf
193+
194+
# make exception for Akka.Persistence.SqlServer database file
195+
!AkkaPersistenceSqlServerSpecDb.mdf
196+
!AkkaPersistenceSqlServerSpecDb_log.ldf
197+
198+
# Business Intelligence projects
199+
*.rdl.data
200+
*.bim.layout
201+
*.bim_*.settings

CopyrightWaivers.txt

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Underwriting parties:
1818

1919
github name | Real Name, Email Address used for git commits, Company
2020
---------------+----------------------------------------------------------------------------
21+
cconstantin | Chris Constantin, [email protected], Aligned Software Solutions, Inc.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Reactive Streams .NET#
2-
3-
The purpose of Reactive Streams is to provide a standard for asynchronous stream processing with non-blocking backpressure.
4-
5-
For now, see the details for the (JVM)[https://github.com/reactive-streams/reactive-streams-jvm/blob/master/README.md].
1+
# Reactive Streams .NET#
2+
3+
The purpose of Reactive Streams is to provide a standard for asynchronous stream processing with non-blocking backpressure.
4+
5+
For now, see the details for the [JVM](https://github.com/reactive-streams/reactive-streams-jvm/blob/master/README.md).

src/Reactive.Streams.sln

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25123.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reactive.Streams", "Reactive.Streams\Reactive.Streams.csproj", "{68FBB4DF-6D83-4CF1-8105-A1D41912852F}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{68FBB4DF-6D83-4CF1-8105-A1D41912852F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{68FBB4DF-6D83-4CF1-8105-A1D41912852F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{68FBB4DF-6D83-4CF1-8105-A1D41912852F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{68FBB4DF-6D83-4CF1-8105-A1D41912852F}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

src/Reactive.Streams/IProcessor.cs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace Reactive.Streams
2+
{
3+
/// <summary>
4+
/// A Processor represents a processing stage—which is both a <see cref="ISubscriber"/>
5+
/// and a <see cref="IPublisher"/> and obeys the contracts of both.
6+
/// </summary>
7+
public interface IProcessor : ISubscriber, IPublisher
8+
{
9+
}
10+
11+
/// <summary>
12+
/// A Processor represents a processing stage—which is both a <see cref="ISubscriber{T}"/>
13+
/// and a <see cref="IPublisher{T}"/> and obeys the contracts of both.
14+
/// </summary>
15+
/// <typeparam name="T1">The type of element signaled to the <see cref="ISubscriber{T}"/></typeparam>
16+
/// <typeparam name="T2">The type of element signaled to the <see cref="IPublisher{T}"/></typeparam>
17+
public interface IProcessor<in T1, out T2> : IProcessor, ISubscriber<T1>, IPublisher<T2>
18+
{
19+
}
20+
}

src/Reactive.Streams/IPublisher.cs

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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

Comments
 (0)