Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
SPECIAL OFFER: Upgrade this ebook with O’Reilly
A Note Regarding Supplemental Files
Preface
Scope of This Book
Some Assumptions About the Reader
Conventions Used in This Book
Comments and Questions
Safari Enabled
Acknowledgments
1. Introducing Component-Oriented Programming
1.1. Basic Terminology
1.2. Component-Oriented Versus Object-Oriented Programming
1.2.1. Building Blocks Versus Monolithic Applications
1.2.2. Interfaces Versus Inheritance
1.3. Principles of Component-Oriented Programming
1.3.1. Separation of Interface from Implementation
1.3.2. Binary Compatibility Between Client and Server
1.3.3. Language Independence
1.3.4. Location Transparency
1.3.5. Concurrency Management
1.3.6. Versioning Support
1.3.7. Component-Based Security
1.4. .NET Adherence to Component Principles
1.5. Developing .NET Components
1.5.1. The .NET Base Classes
1.5.2. Declarative Programming
1.5.3. Component-Oriented Security
1.5.4. Simplified Deployment
2. .NET Component-Oriented Programming Essentials
2.1. Language Independence: The CLR
2.1.1. Intermediate Language and the JIT Compiler
2.1.2. .NET Programming Languages
2.1.3. .NET Components Are Language-Independent
2.1.4. Choosing a .NET Language
2.2. Packaging and Deployment: Assemblies
2.2.1. DLLs and COM Components
2.2.2. .NET Assemblies
2.2.3. Assemblies and Visual Studio 2005
2.2.4. Client and Server Assemblies
2.2.5. Managing Component Visibility in Assemblies
2.2.6. Assembly Metadata
2.2.7. The Assembly Manifest
2.2.8. Friend Assemblies
2.2.9. Composing Assemblies
2.2.10. The Assembly Type
2.3. Binary Compatibility
2.3.1. COM Binary Compatibility
2.3.2. .NET Binary Compatibility
2.3.3. Binary Inheritance
3. Interface-Based Programming
3.1. Separating Interface from Implementation
3.1.1. Interface Implementation
3.1.2. Explicit Interface Implementation
3.2. Working with Interfaces
3.2.1. Interfaces and Type Safety
3.2.2. Interface Methods, Properties, and Events
3.2.3. Interfaces and Structs
3.2.4. Interfaces and Partial Types
3.2.5. Implementing Multiple Interfaces
3.2.6. Interfaces and Class Hierarchies
3.3. Interfaces and Generics
3.3.1. Deriving from a Generic Interface
3.3.2. Explicit Generic Interface Implementation
3.3.3. Generic Interfaces as Operators
3.3.4. Interface-Level Constraints
3.3.5. Generic Derivation Constraints
3.3.6. Generics, Interfaces, and Casting
3.3.7. Generic Interface Methods
3.4. Designing and Factoring Interfaces
3.4.1. Interface Factoring
3.4.2. Factoring Metrics
3.5. Interfaces in Visual Studio 2005
3.5.1. Interface Refactoring
4. Lifecycle Management
4.1. The Managed Heap
4.2. Traditional Memory De-allocation Schemas
4.3. .NET Garbage Collection
4.4. Object Finalization
4.4.1. Explicit Garbage Collection
4.4.2. Finalize() Method Implementation
4.5. Deterministic Finalization
4.5.1. The Open/Close Pattern
4.5.2. The Dispose() Pattern
4.5.3. The IDisposable Pattern
4.5.4. Disposing and Error Handling
4.5.5. Dispose() and Finalize()
4.5.6. Deterministic Finalization Template
5. Versioning
5.1. Assembly Version Number
5.1.1. Version Number Elements
5.1.2. Providing the Version Number
5.2. Assembly Deployment Models
5.3. Strong Assembly Names
5.3.1. Signing Your Assembly
5.3.2. Strong Names and Private Assemblies
5.3.3. Friend Assemblies and Strong Names
5.3.4. Installing a Shared Assembly
5.4. Visual Studio 2005 and Versioning
5.4.1. Specific Reference Version
5.5. Custom Version Policies
5.5.1. Application Custom Policies
5.5.2. Global Custom Policies
5.6. CLR Versioning
5.6.1. CLR Side-by-Side Execution
5.6.2. Version Unification
5.6.3. Specifying a CLR Version
6. Events
6.1. Delegate-Based Events
6.1.1. Delegate Inference
6.1.2. Generic Delegates
6.1.3. The event Keyword
6.1.4. Events in Visual Basic 2005
6.2. Working with .NET Events
6.2.1. Defining Delegate Signatures
6.2.2. Defining Custom Event Arguments
6.2.3. The Generic Event Handler
6.2.4. Publishing Events Defensively
6.2.5. Event Accessors
6.2.6. Managing Large Numbers of Events
6.2.7. Writing Sink Interfaces
7. Asynchronous Calls
7.1. Requirements for an Asynchronous Mechanism
7.2. Revisiting Delegates
7.3. Asynchronous Call Programming Models
7.3.1. Using BeginInvoke() and EndInvoke()
7.3.2. Using Completion Callback Methods
7.3.3. Performing Asynchronous Operations Without Delegates
7.4. Asynchronous Error Handling
7.5. Asynchronous Events
7.5.1. Asynchronous EventsHelper
7.6. Asynchronous Invocation Pitfalls
7.6.1. Threading Concurrency and Synchronization
7.6.2. Thread-Pool Exhaustion
7.6.3. Premature Access by Reference and Reference Types
7.6.4. Lengthy Constructors
7.6.5. Cleaning Up After EndInvoke
7.7. Synchronous Versus Asynchronous Processing
8. Multithreading and Concurrency Management
8.1. Threads and Multithreading
8.2. Components and Threads
8.3. Working with Threads
8.3.1. Creating Threads
8.3.2. Blocking Threads
8.3.3. Aborting a Thread
8.3.4. Thread States
8.3.5. Foreground and Background Threads
8.3.6. Thread Priority and Scheduling
8.4. Synchronizing Threads
8.5. Automatic Synchronization
8.5.1. Synchronization Domains
8.5.2. Synchronization Domains and Contexts
8.5.3. Configuring Synchronization Domains
8.5.4. Synchronization-Domain Reentrancy
8.5.5. Synchronization Domain Pros and Cons
8.6. Manual Synchronization
8.6.1. The Monitor
8.6.2. Waitable Handles
8.6.3. The Mutex
8.6.4. Waitable Events
8.6.5. The Semaphore
8.6.6. The Interlocked
8.6.7. The Reader/Writer Lock
8.7. The WorkerThread Wrapper Class
8.7.1. Launching a New Worker Thread
8.7.2. Joining WorkerThread and the Thread Handle
8.7.3. Terminating the Worker Thread
8.8. Synchronizing Delegates
8.9. Using .NET Multithreading Services
8.9.1. Thread-Relative Static Variables
8.9.2. Thread Local Storage
8.9.3. The Thread Pool
8.9.4. ISynchronizeInvoke
8.9.5. Windows Forms and Asynchronous Calls
8.9.6. Timers
8.9.7. Volatile Fields
8.9.8. .NET and COM's Apartments
9. Serialization and Persistence
9.1. Automatic Serialization
9.1.1. The Serializable Attribute
9.1.2. Non-Serializable Members
9.2. Serialization Formatters
9.2.1. The Binary Formatter
9.2.2. The SOAP Formatter
9.2.3. Generic Formatters
9.2.4. Serialization of Generic Type Parameters
9.3. Serialization Events
9.3.1. Applying the Event Attributes
9.3.2. Serialization Events and Class Hierarchies
9.3.3. Serialization and Versioning
9.3.4. Type-Version Tolerance
9.4. Serialization and Streams
9.4.1. Serializing Multiple Objects
9.5. Custom Serialization
9.5.1. The ISerializable Interface
9.5.2. Implementing ISerializable
9.5.3. Constraining Serialization
9.6. Serialization and Class Hierarchies
9.6.1. Custom Serialization and Base Classes
9.6.2. Manual Base-Class Serialization
10. Remoting
10.1. Application Domains
10.1.1. App Domains Versus Physical Processes
10.1.2. App Domains and the .NET Platform
10.1.3. App Domains and Remoting
10.1.4. The AppDomain Class
10.1.5. The Host App Domain
10.2. Remote Object Types
10.2.1. Marshaling by Value
10.2.2. Marshaling by Reference
10.3. Marshaling-by-Reference Activation Modes
10.3.1. Client-Activated Object
10.3.2. Server-Activated Single Call
10.3.3. Server-Activated Singleton
10.3.4. Activation Modes and Synchronization
10.4. The .NET Remoting Architecture
10.4.1. Client-Side Processing
10.4.2. Server-Side Processing
10.4.3. Formatters
10.4.4. Transport Channels
10.4.5. Object Locations and Identity
10.4.6. Error Handling
10.5. Building a Distributed Application
10.5.1. Programmatic Channel Registration
10.5.2. Programmatic Type Registration
10.5.3. Programmatic Configuration Example
10.5.4. Administrative Configuration
10.5.5. Administrative Channel Registration
10.5.6. Administrative Type Registration
10.5.7. Administrative Configuration Example
10.5.8. Creating Remote Objects
10.5.9. Remote Callbacks
10.5.10. Separating the Server Code from its Metadata
10.5.11. Providing a Host as a System Service
10.6. Leasing and Sponsorship
10.6.1. Lease Properties
10.6.2. Configuring a Lease
10.6.3. Renewing a Lease
10.6.4. Providing a Sponsor
10.6.5. Leasing and Remote Activation Modes
10.6.6. Sponsorship Management
10.7. .NET and Location Transparency
11. Context and Interception
11.1. .NET Component Services
11.1.1. Contexts and Object Types
11.1.2. Component Services Types
11.2. The .NET Context
11.2.1. Assigning Objects to Contexts
11.2.2. The Call Interception Architecture
11.2.3. Same-Context Calls
11.2.4. Context-Bound Objects and Remoting
11.3. Custom Component Services
11.3.1. Building a Custom Context Attribute
11.3.2. Installing a Custom Message Sink
11.3.3. The Logbook Service
11.3.4. The Transaction Management Service
12. Security
12.1. The .NET Security Architecture
12.1.1. Permissions
12.1.2. Permission Sets
12.1.3. Security Evidence
12.1.4. Code Groups and Security Policies
12.1.5. How It All Works Together
12.2. Configuring Permissions
12.2.1. .NET Default Configuration
12.2.2. Custom Permission Sets
12.2.3. Custom Code Groups
12.2.4. Administrating Security for ClickOnce Applications
12.2.5. Custom Security Policies
12.2.6. Security Administration Utilities
12.2.7. Security Infrastructure Benefits
12.3. Programmatic Security
12.3.1. The Permission Classes
12.3.2. Stack-Walk Modifiers
12.3.3. Permission Attributes
12.3.4. Permission Set Classes
12.3.5. Permission Set Attributes
12.3.6. Assembly-Wide Permissions
12.4. Visual Studio 2005 and Security
12.4.1. ClickOnce Permissions
12.4.2. Calculating Required Permissions
12.4.3. Partial-Trust Debugging
12.4.4. Visual Basic 2005 and Security
12.5. Principal-Based Security
12.5.1. Declarative Role-Based Security
12.5.2. Programmatic Role-Based Security
12.5.3. Windows Security Principal
12.5.4. Custom Security Principal
12.6. Addressing Other Security Issues
12.6.1. Link-Time Demand and Reflection
12.6.2. Link-Time Demand and Inheritance
12.6.3. Strongly Named Assemblies and Full Trust
12.6.4. Unsafe Code
12.6.5. Security and Remote Calls
12.6.6. Serialization
12.6.7. Transactions
A. Interface-Based Web Services
.NET Web Services Support
Problem Statement
Solution
Service-Side Steps
Client-Side Steps
B. Unifying Windows Forms and ASP.NET Security
ASP.NET Security Infrastructure
ASP.NET Custom Authentication and Authorization
Solution Architecture
Implementing IPrincipal
The LoginControl Class
The AspNetLoginControl
Implementing IUserManager
AspNetLoginControl and Code Access Security
The UserManager Web Service
The WSLoginControl
WSLoginControl and Code Access Security
The Sample Application
The LoginDialog Class
C. Reflection and Attributes
System.Type
Attributes
Using Attributes
Kinds of Attributes
Implementing Custom Attributes
Reflecting Custom Attributes
Generics and Reflection
Attributes and Generics
D. Generics
Generics Problem Statement
What Are Generics?
Generics Implementation
Applying Generics
Multiple Generic Types
Generic Constraints
Derivation Constraint
Constructor Constraint
Class/Struct Type Constraint
E. C# Coding Standard
Naming Conventions and Styles
Coding Practices
Project Settings and Project Structure
Framework-Specific Guidelines
Multithreading
Serialization
Remoting
Security
SPECIAL OFFER: Upgrade this ebook with O’Reilly
← Prev
Back
Next →
← Prev
Back
Next →