Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2012-11-12 22:33:11 +0400
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2012-11-12 22:33:11 +0400
commitd90a52595e24b1216c89f6cb5f245262db1810ae (patch)
tree4ea2356c49a1f95956dde3a4b238e0096e2eaa56
initial checkin for mono-specific files.
-rw-r--r--Rx.NET/README.mono8
-rw-r--r--Rx.NET/System.Reactive.Linq/internals-visibleto-workaround.patch91
-rw-r--r--Rx.NET/Tests.System.Reactive/replacer.sh24
-rw-r--r--Rx.NET/mono.patch15
4 files changed, 138 insertions, 0 deletions
diff --git a/Rx.NET/README.mono b/Rx.NET/README.mono
new file mode 100644
index 0000000..7da4dea
--- /dev/null
+++ b/Rx.NET/README.mono
@@ -0,0 +1,8 @@
+As of OSS release 1.0, there are only two steps are required to make it possible to build with mono in the source repo:
+
+- apply ReactiveAssert.cs change.
+- run replacer.sh
+
+Actually ObservableExTest.cs cannot be compiled due to insufficient
+type inference for lambdas, so I skipped it in Mono.Reactive.Testing_test.dll.
+
diff --git a/Rx.NET/System.Reactive.Linq/internals-visibleto-workaround.patch b/Rx.NET/System.Reactive.Linq/internals-visibleto-workaround.patch
new file mode 100644
index 0000000..e8a91dd
--- /dev/null
+++ b/Rx.NET/System.Reactive.Linq/internals-visibleto-workaround.patch
@@ -0,0 +1,91 @@
+diff --git "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Catch.cs" "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Catch.cs"
+index 71e0037..21dd86c 100644
+--- "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Catch.cs"
++++ "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Catch.cs"
+@@ -56,7 +56,8 @@ public override void OnError(Exception error)
+ public override void OnCompleted()
+ {
+ base._observer.OnCompleted();
+- base.Dispose();
++ Sink<TSource> sink = this;
++ sink.Dispose();
+ }
+
+ protected override void Done()
+@@ -66,7 +67,8 @@ protected override void Done()
+ else
+ base._observer.OnCompleted();
+
+- base.Dispose();
++ Sink<TSource> sink = this;
++ sink.Dispose();
+ }
+ }
+ }
+@@ -180,4 +182,4 @@ public void OnCompleted()
+ }
+ }
+ }
+-#endif
+\ No newline at end of file
++#endif
+diff --git "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Concat.cs" "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Concat.cs"
+index 5a9b2e4..62ea94b 100644
+--- "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Concat.cs"
++++ "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/Concat.cs"
+@@ -44,9 +44,10 @@ public override void OnNext(TSource value)
+ public override void OnError(Exception error)
+ {
+ base._observer.OnError(error);
+- base.Dispose();
++ Sink<TSource> sink = this;
++ sink.Dispose();
+ }
+ }
+ }
+ }
+-#endif
+\ No newline at end of file
++#endif
+diff --git "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/DoWhile.cs" "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/DoWhile.cs"
+index 3ef40eb..c7e0354 100644
+--- "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/DoWhile.cs"
++++ "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/DoWhile.cs"
+@@ -46,7 +46,8 @@ public override void OnNext(TSource value)
+ public override void OnError(Exception error)
+ {
+ base._observer.OnError(error);
+- base.Dispose();
++ Sink<TSource> sink = this;
++ sink.Dispose();
+ }
+ }
+ }
+diff --git "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/For.cs" "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/For.cs"
+index 85b9e03..79cd644 100644
+--- "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/For.cs"
++++ "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/For.cs"
+@@ -45,7 +45,8 @@ public override void OnNext(TResult value)
+ public override void OnError(Exception error)
+ {
+ base._observer.OnError(error);
+- base.Dispose();
++ Sink<TResult> sink = this;
++ sink.Dispose();
+ }
+ }
+ }
+diff --git "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/While.cs" "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/While.cs"
+index 178e4c8..c747e66 100644
+--- "a/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/While.cs"
++++ "b/Rx.NET/System.Reactive.Linq/Reactive/Linq/Observable/While.cs"
+@@ -45,7 +45,8 @@ public override void OnNext(TSource value)
+ public override void OnError(Exception error)
+ {
+ base._observer.OnError(error);
+- base.Dispose();
++ Sink<TSource> sink = this;
++ sink.Dispose();
+ }
+ }
+ }
diff --git a/Rx.NET/Tests.System.Reactive/replacer.sh b/Rx.NET/Tests.System.Reactive/replacer.sh
new file mode 100644
index 0000000..bcc15c1
--- /dev/null
+++ b/Rx.NET/Tests.System.Reactive/replacer.sh
@@ -0,0 +1,24 @@
+using System.IO;
+using System.Text;
+
+foreach (var file in Directory.GetFiles (".", "*.cs", SearchOption.AllDirectories)) {
+ var text = File.ReadAllText (file);
+ if (text.Contains ("#if NUNIT"))
+ continue;
+ Console.Error.WriteLine (file + " : " + text.Contains ("using Microsoft.VisualStudio.TestTools.UnitTesting;"));
+ text = text.Replace (
+"using Microsoft.VisualStudio.TestTools.UnitTesting;",
+@"#if NUNIT
+using NUnit.Framework;
+using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
+using TestMethodAttribute = NUnit.Framework.TestAttribute;
+using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
+#else
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+#endif".Replace ("\n", "\r\n"));
+
+ text = text.Replace ("[Timeout", "//[Timeout"); // no TimeoutAttribute in NUnit.
+
+ using (var tw = new StreamWriter (file, false, new UTF8Encoding (true, true)))
+ tw.Write (text);
+}
diff --git a/Rx.NET/mono.patch b/Rx.NET/mono.patch
new file mode 100644
index 0000000..4b45349
--- /dev/null
+++ b/Rx.NET/mono.patch
@@ -0,0 +1,15 @@
+diff --git a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+index e9715a4..86cd62e 100644
+--- a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
++++ b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+@@ -8,7 +8,9 @@
+ using System.Reactive.Disposables;
+ using System.Reactive.Linq;
+
+-#if WINDOWS8
++#if NUNIT
++using NUnit.Framework;
++#elif WINDOWS8
+ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
+ #else
+ using Microsoft.VisualStudio.TestTools.UnitTesting;