Creating Providers

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.

Once you have created the provider factory and base, you can define the provider classes. The Application Block Software Factory allows you to define either typed providers or untyped providers. Both typed and untyped providers derive from the provider base class and supply the necessary functions, such as transferring information to and from a database or logging information to an event file. The difference is the design-time experience.

Typed providers contain their own strongly-typed configuration classes. These classes contain configuration information that appears in the configuration tools. By creating typed providers, you can ensure that all the required properties are available and that users enter correct values for the properties they need to set.

Untyped providers use a generic name/value collection. Users must use the configuration tools to enter the properties and values themselves. For examples of untyped providers, see the custom classes included with Enterprise Library, such as the CustomTraceListener class. The Application Block Software Factory allows you to first create an untyped provider and then convert it to a typed provider. You may first want to create a simple, untyped provider and then, once your application is working, convert it to the more complex typed provider.

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.