3 // grep -h "#if" /svn/mono/external/rx/Rx.NET/System.Reactive.*/*.cs /svn/mono/external/rx/Rx.NET/System.Reactive.*/*/*.cs /svn/mono/external/rx/Rx.NET/System.Reactive.*/*/*/*.cs | sort | uniq
5 using System.Diagnostics;
8 using System.Xml.XPath;
10 var asses = new string [] {
11 "System.Reactive.Interfaces",
12 "System.Reactive.Core",
13 "System.Reactive.PlatformServices",
14 "System.Reactive.Linq",
15 "System.Reactive.Debugger", // maybe needed for testing assembly.
16 "System.Reactive.Experimental", // needed for testing assembly.
17 "System.Reactive.Providers",
18 "System.Reactive.Runtime.Remoting",
19 "System.Reactive.Windows.Forms",
20 "System.Reactive.Windows.Threading",
21 "Microsoft.Reactive.Testing",
22 "Tests.System.Reactive",
25 var blacklist = new string [] {
26 // FIXME: this is the only source that we cannot build.
27 //Test/../../../../external/rx/Rx.NET/Tests.System.Reactive/Tests/ObservableExTest.cs(1478,27): error CS0411: The type arguments for method `System.Reactive.Linq.ObservableEx.ManySelect<TSource,TResult>(this System.IObservable<TSource>, System.Func<System.IObservable<TSource>,TResult>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
28 "ObservableExTest.cs",
30 // WPF Dispatcher.Invoke() is not implemented.
31 "DispatcherSchedulerTest.cs",
32 // This is not limited to Dispatcher, but many of them are relevant to it, or Winforms (we filter it out by not defining HAS_WINFORMS)
33 "ObservableConcurrencyTest.cs",
36 foreach (var ass in asses) {
38 var monoass = ass == "Microsoft.Reactive.Testing" ?
39 "Mono.Reactive.Testing" : ass;
40 var basePath = "../../external/rx/Rx.NET";
41 var csproj = Path.Combine (basePath, ass, ass + ".csproj");
42 var pathPrefix = ass == "Tests.System.Reactive" ? "../../" : "../";
44 // tests are built under Mono.Reactive.Testing directory.
46 monoass == "Tests.System.Reactive" ?
47 Path.Combine ("Mono.Reactive.Testing", "Mono.Reactive.Testing_test.dll.sources") :
48 Path.Combine (monoass, monoass + ".dll.sources");
50 var doc = XDocument.Load (csproj);
51 var rootNS = doc.XPathSelectElement ("//*[local-name()='RootNamespace']").Value;
52 using (var tw = File.CreateText (sources)) {
53 foreach (var path in doc.XPathSelectElements ("//*[local-name()='Compile']")
54 .Select (el => el.Attribute ("Include").Value)
55 .Select (s => s.Replace ("\\", "/")))
56 if (!blacklist.Any (b => path.Contains (b)))
57 tw.WriteLine (Path.Combine (pathPrefix, basePath, ass, path));
60 var argsPath = Path.Combine (Path.GetDirectoryName (sources), "more_build_args");
61 using (var tw = File.CreateText (argsPath)) {
62 tw.WriteLine ("-d:SIGNED");
63 tw.WriteLine ("-delaysign");
64 tw.WriteLine ("-keyfile:../reactive.pub");
66 foreach (var path in doc.XPathSelectElements ("//*[local-name()='EmbeddedResource']")) {
67 var res = path.Attribute ("Include").Value;
68 var resx = Path.Combine (basePath, ass, res);
69 var resFileName = res.Replace ("resx", "resources");
70 var resxDest = Path.Combine (monoass, res);
71 var resPath = Path.Combine (monoass, resFileName);
72 if (File.Exists (resxDest))
73 File.Delete (resxDest);
74 File.Copy (resx, resxDest);
75 //Process.Start ("resgen", String.Format ("{0} {1}", resx, resPath));
76 tw.WriteLine ("-resource:{0},{1}.{2}", resFileName, rootNS, resFileName);