Reactive extensions (RX) entry (2) -- install reactive extensions

Source: Internet
Author: User
Tags silverlight

Original article: http://www.atmarkit.co.jp/fdotnet/introrx/introrx_01/introrx_01_02.html

Author: Hehe Yiwen


Installation Method

For RX installation, you can directly download and install through the reactive extensions (RX) Home Page, of course, you can also use nuget to import DLL (http://nuget.org/packages/Rx-Main: nuget is an online DLL Deployment Tool integrated with vs, which is very convenient]. RX, Whether installed by installer or nuget, has two types: stable and experimental.

The stable version is the Chinese API method and will not be changed, while the experimental version adds some experimental methods to the stable version. For example, the await/async keyword and expand method added in C #5.0 are only available in experimental. Only methods in experimental version are identified by the [experimentalattribute] feature, which can be distinguished by the metadata representation in Visual Studio. Therefore, when using the experimental version, these methods with the [experimentalattribute] feature identifier may change the parameter list in the future.

In addition, experimental is included in. NET Framework 4.5 and winrt (Windows 8 runtime environment) in Developer Preview (Developer Preview. C #5.0, especially for asynchronous programming, is already reflected in experimental.


Assembly Classification
RX assembly is divided by the following functions.

Set Name Nuget package name (* 1) Function
System. Reactive RX-Main Basic Core API
System. Reactive. Windows. Forms RX-winforms Controlscheduler class (* 2) and Extension Method Used in Windows form
System. Reactive. Windows. threading RX-WPF
RX-Silverlight
Dispatcherscheduler class (* 2) and Extension Method Used in WPF/Silverlight
System. Reactive. Providers RX-providers Iqbservable interface and other class libraries (* 3)
Microsoft. Reactive. Testing RX-Testing Unittest and mockup
RX Assembly Overview
RX assembly files are generally stored in "C: \ Program Files \ microsoft reactive extensions SDK" (32bit version), while 64bit is stored in "C: \ Program Files (x86) \ microsoft reactive extensions SDK 」)
* 1 the package mentioned in the list refers to the stable version, while the experimental version carries "_ experimental" such as: "Rx_Experimental-Main 」
* 2 scheduler is a Class Based on RX time and thread management. The controlscheduler class calls begininvoke for winform and controls, and the dispatcherschedcher class calls begininvoke for dispatcher.
* 3 the "iqbservable" interface name is taken from "queryable observable 」. The expression tree can generate an observable object. The relationship between the iobservable interface and the iqbservable interface is equivalent to that between the ienumerable interface and the iqueryable interface.

As a core, the system. Reactive assembly must be referenced. You can add references as needed. For example, if you want to use WPF, you must also reference system. Reactive. Windows. threading.
The standard RX Assembly integrated in the Windows Phone 7 SDK is somewhat different from the above:

Set Name Function
System. observable Iobservable <t>/iobserver <t> Interface
Microsoft. Phone. Reactive Core API and dispatcherscheduler class
Overview of Windows Phone 7 SDK assembly

In Windows Phone 7, you can also directly reference the Assembly released in the Data Developer Center to use Rx. However, pay attention to the difference between the two, some APIs are different. For example, if the namespace is different, the class names are also different, the parameter lists of methods are also different, and methods for adding and deleting methods are also available. In general, data Developer Center should provide high performance and more powerful features.
If you pay more attention to whether a standard assembly is used and no additional reference is required, you can directly use Microsoft. phone. reactive; if you want to port data in WPF and sliverlight, select the data Developer Center version.

Related Libraries
The javascript version is not included in install, but you can download the zip code at the bottom of the RX homepage. The main body of the library is Rx. JS, in addition to jquery and prototype. js.

Namespace category
Rx is mainly centered on the extension method. It cannot be used if using/import is not properly used to import the namespace. The following lists the main namespaces and their functions and classes.

Blank before name Features
System

How to extend the lambda expression used by subscribe to the iobservable Interface

System. Reactive

Main interfaces and some basic classes

System. Reactive. Concurrency Classes that implement the ischeduler Interface
System. Reactive. disposables Classes that implement the idisposable Interface
System. Reactive. Joins Class for the join operation using the observable. And/observable. Then Method
System. Reactive. LINQ Some extension methods of the main RX namespaces, the observable class, And the iobservable Interface
System. Reactive. Subjects

Classes that implement the isubject interface (events that implement RX semantics)

System. Reactive. Threading. Tasks

Extension of task mutual conversion

RX namespaces, representative functions, and classes

In addition, in Windows Phone, Rx in the Microsoft. Phone. Reactive assembly is all in the Microsoft. Phone. Reactive namespace.

[Series of articles]
Reactive extensions (RX) entry (1) -- reactive extensions Overview
Reactive extensions (RX) entry (2) -- install reactive extensions
Reactive extensions (RX) entry (3) -- RX event programming ①

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.