15.01.2013 Views

Free-ebooks-library - Bahar Ali Khan

Free-ebooks-library - Bahar Ali Khan

Free-ebooks-library - Bahar Ali Khan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

22. Parallel Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873<br />

Why PFX? 874<br />

PLINQ 877<br />

The Parallel Class 892<br />

Task Parallelism 898<br />

Working with AggregateException 912<br />

Concurrent Collections 914<br />

SpinLock and SpinWait 920<br />

23. Asynchronous Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927<br />

Why Asynchronous Methods Exist 927<br />

Asynchronous Method Signatures 928<br />

Asynchronous Methods Versus Asynchronous Delegates 930<br />

Using Asynchronous Methods 930<br />

Asynchronous Methods and Tasks 934<br />

Writing Asynchronous Methods 937<br />

Fake Asynchronous Methods 940<br />

Alternatives to Asynchronous Methods 941<br />

24. Application Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943<br />

Application Domain Architecture 943<br />

Creating and Destroying Application Domains 945<br />

Using Multiple Application Domains 946<br />

Using DoCallBack 948<br />

Monitoring Application Domains 949<br />

Domains and Threads 950<br />

Sharing Data Between Domains 951<br />

25. Native and COM Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957<br />

Calling into Native DLLs 957<br />

Type Marshaling 958<br />

Callbacks from Unmanaged Code 961<br />

Simulating a C Union 962<br />

Shared Memory 963<br />

Mapping a Struct to Unmanaged Memory 965<br />

COM Interoperability 969<br />

Calling a COM Component from C# 971<br />

Embedding Interop Types 975<br />

Primary Interop Assemblies 975<br />

Exposing C# Objects to COM 976<br />

26. Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977<br />

Regular Expression Basics 977<br />

Quantifiers 982<br />

Zero-Width Assertions 983<br />

Table of Contents | xi

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!