Figures


Figure 1.1: Reading and Writing Configuration Objects 9

Figure 1.2: Reading and Writing to XML Files 10

Figure 1.3: Storage Providers in Enterprise Library 16

Figure 1.4: Design for the DatabaseStorageProvider 19

Figure 1.5: Enterprise Library's ConfigurationChangedEventArgs Design 24

Figure 1.6: Result of Using the DatabaseStorageProvider 35

Figure 1.7: Enterprise Library Design for Transformers 37

Figure 1.8: Using Mvp.Xml.XGen to Create a Serializer 39

Figure 1.9: Design of Enterprise Library's Configuration Application Block 45

Figure 2.1: Enterprise Library Configuration Tool 64

Figure 2.2: Adding a Configuration Section 65

Figure 2.3: Configuring the XMLFileStorageProvider 66

Figure 2.4: Configuring the RegistryStorageProvider 71

Figure 2.5: Results from Using the RegistryStorageProvider 72

Figure 2.6: Configuring the SqlStorageProvider 73

Figure 2.7: Using the SqlStorageProvider 73

Figure 2.8: Configuring a Custom StorageProvider 75

Figure 2.9: Adding an XmlSerializerTransformer to a Configuration Section 77

Figure 2.10: Configuring a Section to Use the MvpSerializerTransformer 79

Figure 2.11: Adding a Custom Transformer to a Configuration Section 80

Figure 2.12: Selecting a Symmetric Algorithm 81

Figure 2.13: Using the File Key Algorithm Storage Wizard 82

Figure 2.14: The Configuration Hierarchy of the File Key Algorithm StorageProvider 83

Figure 2.15: Enabling Encryption for a Configuration Section 83

Figure 2.16: Encrypted Configuration Section Data 84

Figure 2.17: High-Level Design of the Configuration Application Block's Design-Time 85

Figure 2.18: ConfigurationNode Derives From Component 87

Figure 2.19: Configuration Nodes and the Property Pane 88

Figure 2.20: Properties and Methods of ConfigurationDesignHost 90

Figure 2.21: Properties and Methods of ConfigurationNodeSite 91

Figure 2.22: Properties and Methods of ServiceContainer 92

Figure 2.23: Configuration Menu Items and Commands 95

Figure 2.24: ConfigurationNodeCommand Hierarchy 97

Figure 2.25: DatabaseStorageProvider Configuration Node 106

Figure 3.1: Enterprise Library Database Providers 115

Figure 3.2: Enterprise Library Database Command Wrappers 125

Figure 3.3: DatabaseFactory and DatabaseProviderFactory 130

Figure 3.4: Hierarchy after Adding the Data Access Application Block to an Application 140

Figure 3.5: Adding the XmlFileDatabase Database Type to the Data Access Application Block 141

Figure 3.6: Setting the Connection String for the XmlFileDatabase 143

Figure 3.7: Changing the Properties for a Database Instance 144

Figure 3.8: Data Access Logic Components 171

Figure 4.1: Design of Enterprise Library's Caching Application Block 184

Figure 4.2: Expiration Policies in Enterprise Library's Caching Application Block 193

Figure 4.3: The ICacheItemRefreshAction Interface and Reasons for Removing an Item from Cache 199

Figure 4.4: Available BackingStores in Enterprise Library's Caching Application Block 203

Figure 4.5: Available BackingStores Now Include the XmlFileBackingStore 219

Figure 4.6: Hierarchy from Adding the Caching Application Block to an Application 221

Figure 4.7: Setting Properties for a CacheManager 222

Figure 4.8: Setting the DefaultCacheManager Property 223

Figure 4.9: Configuring an Isolated Storage BackingStore 224

Figure 4.10: Configuring a Data BackingStore 225

Figure 4.11: Selecting the Type for a Custom BackingStore 226

Figure 4.12: Adding Items to the Extensions Collection for a Custom BackingStore 227

Figure 4.13: Configuring the New XmlFileBackingStore 227

Figure 4.14: Configuring Encryption for the New XmlFileBackingStore 228

Figure 5.1: ApplicationException Class Hierarchy 246

Figure 5.2: ExceptionPolicy and Related Classes 251

Figure 5.3: Configuration for the SqlException Policy 254

Figure 5.4: ExceptionHandlers Provided by the Exception Handling Application Block 257

Figure 5.5: Logging Exception Information 261

Figure 5.6: ExceptionFormatters in the Exception Handling Application Block 263

Figure 5.7: Results of CsvExceptionFormatter 274

Figure 5.8: Exception Thrown with the AppMessageExceptionHandler 276

Figure 5.9: Adding a Contextual WrapHandler to an Application's Configuration 288

Figure 5.10: Hierarchy After Adding the Exception Handling Application Block 291

Figure 5.11: Adding an Exception Type to an Exception Policy 292

Figure 5.12: PostHandlingAction for an Exception Type 293

Figure 5.13: Configuration for a WrapHandler 294

Figure 5.14: Configuration for a Logging Handler (Including Configuration in the Logging and Instrumentation Application Block) 296

Figure 5.15: Changing the ExceptionFormatter for a Logging Handler 298

Figure 5.16: Setting the TypeName for a Custom Handler 299

Figure 5.17: Setting Attributes for the AppMessageExceptionHandler 300

Figure 5.18: Moving a Handler Up in the Chain So It Is Executed First 302

Figure 6.1: Primary Classes for Creating Logs 312

Figure 6.2: Synchronous Distribution of Logs 313

Figure 6.3: ExTRaInformationProvider Classes 316

Figure 6.4: Classes Involved in Filtering 329

Figure 6.5: Filtering Out Category A 330

Figure 6.6: Log Distribution Classes 332

Figure 6.7: MsmqLogDistributionStrategy and the Distributor Service 336

Figure 6.8: A Closer Look at the Distributor Service 337

Figure 6.9: Selecting the Database Distribution Strategy 341

Figure 6.10: Configuring the Database Distributor Service 344

Figure 6.11: LogSinks in Enterprise Library 346

Figure 6.12: Adding Attributes to a Custom Sink 353

Figure 6.13: Configuring the DebugSink 356

Figure 6.14: Classes Involved in Formatting 357

Figure 6.15: The Template Editor 358

Figure 6.16: Tracing and Logging in an Application 367

Figure 6.17: The TRacer Class 368

Figure 6.18: Configuring Filters 378

Figure 6.19: Configuring Asynchronous Log Distribution 379

Figure 6.20: Selecting the MSMQ Distributor Service 381

Figure 6.21: Configuring Asynchronous Distributor Settings to Match Client Distribution Strategy Settings 382

Figure 6.22: Adding a New TextFormatter 383

Figure 6.23: Adding an EmailSink 384

Figure 6.24: Configuring an EmailSink 386

Figure 6.25: Adding a New Category387

Figure 6.26: Configuring the Formatter and Sink for a Destination 388

Figure 6.27: Setting the Default Formatter and Category 389

Figure 7.1: The Security Database 401

Figure 7.2: Authentication in the Security Application Block 404

Figure 7.3: Adding a Custom AuthenticationProvider 408

Figure 7.4: Adding the Active Directory AuthenticationProvider 412

Figure 7.5: The Security Application Block's Security Cache Design 414

Figure 7.6: Configuring the HttpCachingStoreProvider 420

Figure 7.7: Role-Based Authorization Example 422

Figure 7.8: Authorization in the Security Application Block 424

Figure 7.9: Classes Used for the AuthorizationRuleProvider 427

Figure 7.10: AuthorizationRuleProvider Finite State Machine 429

Figure 7.11: Authorization Manager Role Definition Example 434

Figure 7.12: Enterprise Library's AzManAuthorizationProvider 437

Figure 7.13: Role Management in the Security Application Block 444

Figure 7.14: Configuring the AzManRolesProvider 449

Figure 7.15: Profile Management in the Security Application Block 450

Figure 7.16: A PortalProfile Typed DataSet 453

Figure 7.17: Configuring the PortalProfileProvider 458

Figure 7.18: Configuration for the Security Database Administration Console 459

Figure 7.19: The Security Database Administration Console 461

Figure 7.20: Configuring a Database AuthenticationProvider 464

Figure 7.21: Configuring a Custom AuthenticationProvider 466

Figure 7.22: Configuring the Security Cache 468

Figure 7.23: Using Profiles to Personalize a Portal Size 473

Figure 7.24: Properties for Configuring the AzManProvider 475

Figure 7.25: The Rule Expression Editor 476

Figure 7.26: Configuring the Database RolesProvider 478

Figure 7.27: Properties for the ActiveDirectoryRoles Provider 479

Figure 7.28: Configuring the DatabaseProfileProvider 481

Figure 7.29: Configuring the Security Application Block's Default Providers 485

Figure 8.1: Cryptographer, HashProviderFactory, and SymmetricCryptoProviderFactory 494

Figure 8.2: Classes Used for Providing Support for Symmetric Algorithms 496

Figure 8.3: Using a Custom Symmetric Algorithm with the Cryptography Application Block 502

Figure 8.4: Classes Used for Providing Support for Hashing Algorithms 503

Figure 8.5: Using a Custom Hash Algorithm with the Cryptography Application Block 508

Figure 8.6: Hierarchy of the Cryptography Application Block 509

Figure 8.7: Configuring a DpapiSymmetricCryptography Provider 511

Figure 8.8: Selecting the RijndaelManaged SymmetricAlgorithmProvider 511

Figure 8.9: Adding a Key for the SymmetricAlgorithmProvider 512

Figure 8.10: Key Modification Options 513

Figure 8.11: Creating a New FileKeyAlgorithmStorageProvider in the Configuration Application Block 514

Figure 8.12: Saving the Master Key515

Figure 8.13: Turning Encryption On for an Application Block 516

Figure 8.14: Adding the SHA1Managed HashAlgorithm Provider 520

Figure 8.15: Changing the SaltEnabled Value for a Hash Provider 521

Figure 9.1: Classes Representing Core Functionality for the Data Mapping Application Block 531

Figure 9.2: Primary Classes Used for DataSetMapping Provider Implementation 533

Figure 9.3: Factory Classes in the Data Mapping Application Block 544

Figure 9.4: Runtime Configuration Object Graph for the Data Mapping Application Block 546

Figure 9.5: Data Mapping Application Blocks DesignTime Objects 558

Figure 9.6: The DataMappingConfigurationDesignManager Class 568

Figure 9.7: Configuration Hierarchy for the Data Mapping Application Block 574

Figure 9.8: The Order Manager Administrator's Quick Start Application 577

Figure A.1: Design of the Data Mapping Application Block 581

Figure A.2: Classes Used to Provide Caching Support in the Data Mapping Application Block 592

Figure A.3: DataMapping Factories and Providers in the Data Mapping Application Block 594

Figure A.4: DataSetMappingDataCollection Object Hierarchy 596

Figure A.5: Creating a Simple Strongly Typed DataSet in Visual Studio.NET 597

Figure A.6: Configuration Hierarchy After Adding the Data Mapping Application Block 599

Figure A.7: Renaming the DataSetMapping and Setting the DatabaseInstance 600

Figure A.8: Configuring a SelectCommandMapping 601

Figure A.9: Adding More SelectCommandMappings 603

Figure A.10: Enabling Caching and Setting the Cache Manager 605

Figure A.11: Configuring a DatabaseDependencyExpirationNode 606

Figure A.12: Adding a RefreshAction 608

Figure A.13: Adding a DataTableMapping 609

Figure A.14: Creating a New CommandMapping for a DataTable 611

Figure A.15: Adding CommandParameterMappings for a Command 613

Figure A.16: Setting Explicit Parameters for CommandParameterMappings 615

Figure A.17: Setting the Transaction IsolationLevel for a Data Access Logic Component 618

Figure C.1: Setting Configuration for Instrumentation 655




Fenster Effective Use of Microsoft Enterprise Library(c) Building Blocks for Creating Enterprise Applications and Services 2006
Effective Use of Microsoft Enterprise Library: Building Blocks for Creating Enterprise Applications and Services
ISBN: 0321334213
EAN: 2147483647
Year: 2004
Pages: 103
Authors: Len Fenster

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net