Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

About the Enterprise Library 3.1 – May 2007 Release

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

This release of Enterprise Library includes two new application blocks (the Validation Application Block and the Policy Injection Application Block), two guidance packages, and a configuration editor that is integrated with Visual Studio. There are also additions in functionality to the Data Access Application Block and to the Logging Application Block. The following sections discuss these and other changes in the current release.

Changes That Affect All Application Blocks

The changes to the Enterprise Library that affect all the application blocks are the following:

  • This version of Enterprise Library now includes pre-compiled strong-named assemblies for all the source code. For more information, see Using the Enterprise Library Binaries.
  • A separate Microsoft Windows Installer (.msi file) now provides the source code for Enterprise Library. This Windows Installer is installed by the main .msi file. The source code .msi file allows you to extract a copy of the source code and place it in a file location that you can specify as many times as you want.
  • The partial trust patch 2554 for Enterprise Library – January 2006 has been incorporated into the Enterprise Library core.
  • The manageability extensions for Enterprise Library – January 2006 have been incorporated into the Enterprise Library core.
  • You can now use Visual Studio to create and modify configuration files. This configuration tool is named the Configuration Editor. The Configuration Editor has the same functionality as the stand-alone Configuration Console, but it uses the Visual Studio Properties window to display an application block's properties and uses the errors list to display configuration errors. Collectively, the Configuration Editor and the stand-alone Configuration Console are referred to as configuration tools. For more information, see The Enterprise Library Configuration Tools. The following describes some of the activities the configuration tools help you with:
    • You can now use the configuration tools to create and modify standard .NET Framework <appSettings> sections. For more information, see Configuring <appSettings>.
    • You can now use the configuration tools to tailor an application block's configuration to a particular run-time environment. For more information, see Customizing the Run-Time Settings.
    • You can now use the configuration tools to encrypt and decrypt the data contained in configuration sections. For more information, see Encrypting Configuration Data.

Changes to Individual Application Blocks

The significant changes to the individual application blocks are described in the following sections. They discuss changes to the Data Access Application Block, the Exception Handling Application Block, and the Logging Application Block.

Data Access Application Block

The May 2007 release of the Data Access Application Block includes the following improvements:

  • It now includes a new class named SqlCeDatabase that allows you to use SQL Server Compact Edition (CE). This is a lightweight, in-process version of SQL Server that includes the essential functions of a relational database.
  • It now includes a new overload of the Database.UpdateDatabase method that uses the updateBatchSize parameter. Setting the UpdateBatchSize parameter to a positive integer value causes the DataAdapter object to send updates to the database as batches of the specified size. This reduces the number of database round trips.

For more information, see the Data Access Application Block documentation.

Exception Handling Application Block

The May 2007 release of the Exception Handling Application Block includes the following improvements:

  • The Exception Handling Application Block can be used to implement exception shielding at the service interface of a Windows Communication Foundation (WCF) application. The ExceptionShieldingAttribute can be defined on a service implementation class to invoke an exception policy at the service boundary. The FaultContractExceptionHandler can be used to map exceptions to fault contracts and to prevent sensitive information from being returned to untrusted callers.
  • The ExceptionPolicy.HandleException method includes a new overload that calls the exception policy and returns the resulting exception in an out parameter, instead of throwing the resulting exception.
  • The Wrap and Replace Exception Handlers include additional configuration properties that allow you to specify exception messages in external resources instead of directly in the configuration file. This capability can be used to support localization of exception messages.

    For more information, see the Exception Handling Application Block documentation.

Logging Application Block

The May 2007 release of the Logging Application Block includes the following improvements:

  • It now includes a Rolling Flat File Trace Listener. This trace listener creates a new log file when the current log file exceeds a predefined time or size limit.
  • It now includes a WCF adapter that allows you to you to log WCF messages.
  • It now includes an enhanced version of the TimeStampToken class. Earlier releases of the Logging Application Block only allowed timestamps to be logged in Coordinated Universal Time (UTC). In this release, the timestamp token now supports a local: prefix that indicates that the timestamp should be displayed in local time. For more information, see Trace Listener Properties.
  • It now includes the ReflectedPropertyToken class. This release of the Logging Application Block supports a new formatting token that allows you to log custom properties on custom classes that either derive from the LogEntry class or modify it. For more information, see Extending and Modifying the Logging Application Block.

For more information, see the Logging Application Block documentation.

Additions to Enterprise Library

Enterprise Library 3.1 – May 2007 includes two new application blocks, two guidance packages, and a configuration editor that is integrated with Visual Studio. The following sections describe each of these.

The Validation Application Block

The Validation Application Block allows developers to create validation rules that they can use in their applications. It provides the following benefits:

  • It provides a common approach to defining validation rules for your business objects that allows them to be reused across different layers of your application.
  • It provides a set of common validation rule types, and the ability for developers to easily define their own rule types.
  • It provides technology adapters that make it easy to integrate the Validation Application Block with ASP.NET, Windows Forms, and WCF.

For more information, see the Validation Application Block documentation.

The Policy Injection Application Block

The Policy Injection Application Block allows developers to specify the crosscutting behavior of objects in terms of a set of policies. Crosscutting concerns are the necessary tasks, features, or processes that are common across different objects. Examples are logging, authorization, validation, and instrumentation. A policy is the combination of a series of handlers that execute when client code calls methods of the class and—with the exception of attribute-based policies—a series of matching rules that select the classes and class members (methods and properties) to which the application block attaches the handlers. The purpose of the Policy Injection Application Block is to help separate the core and crosscutting concerns, and to minimize potential issues associated with implementing common features.

The Policy Injection Application Block provides a ready-built solution that is easy to implement in new and existing applications, and in particular in applications that already take advantage of the features of the Enterprise Library. It ships with pre-built handlers for these application blocks to speed up development when using the Enterprise Library, while helping to manage crosscutting concerns. Developers can also create custom handlers and policies that carry out almost any required interception processing for methods and properties of their objects.

For more information, see Introduction to the Policy Injection Application Block.

The Strong-Naming Guidance Package

This release of the Enterprise Library includes a new strong-naming guidance package that is integrated with Visual Studio. It automates the process of strong-naming collections of projects and it also modifies any [InternalsVisibleTo] attributes to include a public key.

For more information, see Strong-Naming Enterprise Library Assemblies.

The Application Block Software Factory

The Application Block Software Factory provides automated and written guidance that simplifies the process of building custom application blocks and application block provider classes. The Application Block Software Factory includes guidance automation recipes for a variety of tasks, such as the following:

  • Creating a new application block
  • Creating a new provider library
  • Creating a new typed or untyped provider for the Enterprise Library application blocks
  • Creating a new typed or untyped provider (generic)
  • Converting an untyped provider to a typed provider
  • Creating a new provider factory and base class
  • Creating a new design-time provider base node
  • Creating a provider design-time node

For more information, see the Application Block Software Factory documentation.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.