Configuring Pipeline Handlers

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.

The next procedure describes how to add one of the built-in handlers to an application using the configuration tools.

To configure a built-in handler

  1. Right-click the Handlers node in the Enterprise Library Configuration Console or Visual Studio Configuration Editor, point to New, and then click the type of handler you want to add.
  2. In the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, select the Name property, and then change the default name to the name you want to use for the new handler.
  3. The remaining properties shown in the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, depend on the type of handler you selected. Edit the properties to suit the requirements of your application. For details about the settings for each type of handler, see Configuring and Using Pipeline Handlers.
  4. Repeat this procedure to add additional handlers as required.

The next procedure describes how to add a custom handler to an application using the configuration tools.

To configure a custom handler

  1. Right-click the Handlers node in the Enterprise Library Configuration Console or Visual Studio Configuration Editor, point to New, and then click Custom Handler.
  2. In the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, select the Name property, and then change the default name to the name you want to use for the new handler.
  3. In the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, select the Type property, and then click the ellipsis button (...) to open the TypeSelector dialog box. Select the class that implements the custom handler, and then click OK.
  4. If the list does not show the assembly that contains the custom handler, click Load an Assembly, navigate to the assembly that contains the handler, select the assembly, and then click Open. Back in the Type Selector dialog box, select the required custom handler class, and then click OK.
  5. In the right pane of the Enterprise Library Configuration Console, or in the Visual Studio Properties window, select the Attributes property, and then click the ellipsis button (...) to open the EditableKeyValue Collection Editor dialog box.
  6. Click Add, and then, in the right pane of the dialog box, enter the name of the attribute (the key) and the corresponding value for the attributes the custom handler requires.
  7. Repeat the previous step to add all the required attributes, and then click OK to close the EditableKeyValue Collection Editor dialog box.
    Ff647729.note(en-us,PandP.10).gifNotes:

    The Custom Call Handler entry allows you to configure any custom handler class you create. The configuration editor creates an entry in the configuration that contains the name and the class type, plus all the attributes you enter in the EditableKeyValue Collection Editor dialog box. These values are all available to the custom handler at run time through a NameValueCollection passed to the custom class.

    Only classes that implement the ICallHandler interface and carry the attribute [ConfigurationElementType(typeof(CustomCallHandlerData))] will be visible in the Type Selector dialog box and available for configuration with Enterprise Library Configuration Console or Visual Studio Configuration Editor.

    For details about how you can create custom handlers, see Creating a New Handler.

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.