In the DLL released by RX, it is mainly for the system. core expansion is actually to put all the required components out of 4.0 here, So RX can run on version 3.5.
System
1) extended action <…> And func <…> All to support 16 parameters (. NET 3.5 is up to 4)
2) added the iobserver <tvalue, tresult> interface:
1: public interface IObserver<TValue, TResult>
2: {
3: // Methods
4: TResult OnCompleted();
5: TResult OnError(Exception exception);
6: TResult OnNext(TValue value);
7: }
This interface enables the iobserver object to return messages in any status. If the iobserver returns void, it is inevitable that the iobserver will always act as a "Commander"-always directing others to work or not important (no return value is required) (This kind of activity is often well managed, and now has a lot of experience and components ).
3) the implementation method of the struct unit here is very strange:
1: [StructLayout(LayoutKind.Sequential, Size=1)]
2: public struct Unit : IEquatable<Unit>
3: {
4: public bool Equals(Unit other)
5: {
6: return true;
7: }
8:
9:
System. Collections. GenericAndSystem. Concurrency
The two namespaces add things.
System. Diagnostics
This is extended below:
1: public static class ExceptionExtensions
2: {
3: // Fields
4: private const string ExceptionPrepForRemotingMethodName = "PrepForRemoting";
5: private static readonly MethodInfo prepForRemoting = typeof(Exception).GetMethod("PrepForRemoting", BindingFlags.NonPublic | BindingFlags.Instance);
6:
7: // Methods
8: public static Exception PrepareForRethrow(this Exception exception)
9: {
10: if (exception == null)
11: {
12: throw new ArgumentNullException("exception");
13: }
14: prepForRemoting.Invoke(exception, new object[0]);
15: return exception;
16: }
17: }
18:
System. disposables
This namespace is more practical. Because each iobservable <t> must implement a subscribe method that returns idisposable, in different scenarios, we need to use different implementation methods of idisposable (for example, in the first article, the purpose of implementation is to provide the unsubscribe function ), therefore, this namespace provides some common implementation methods.
System. LINQ
The namespace provides two struct types: timeinterval <t> and timestamped <t>.