Archive. Posts from 2004 to 2016, kept as they were written. My current blog is at dariuszparys.com.

Auf MSDN findet man nun die Enterprise Library welche eine Konsolidierung mehrerer Application Building Blocks ist.

The patterns & practices**Enterprise Library is a library of application blocks designed to assist developers with common enterprise development challenges. Application blocks are a type of guidance, provided as source code that can be used "as is," extended, or modified by developers to use on enterprise development projects. Enterprise Library features new and updated versions of application blocks that were previously available as stand-alone application blocks. All Enterprise Library application blocks have been updated with a particular focus on consistency, extensibility, ease of use, and integration.

Das schöne daran ist das man nun die Building Blocks mit einem Konfigurationstool anpassen kann und nicht gleich in eine XML Schlacht verwickelt wird...

[Image not archived]

...und dazu die passende Konfigurationsdatei ausgespuckt bekommt.

<configuration>

  <configSections>

    <sectionname="enterpriselibrary.configurationSettings"type="Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManagerSectionHandler, Microsoft.Practices.EnterpriseLibrary.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>

  </configSections>

  <enterpriselibrary.configurationSettingsxmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"applicationName="Meine Anwendung"xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">

  <configurationSections>

    <configurationSectionname="myConfiguration"encrypt="false">

      <storageProviderxsi:type="XmlFileStorageProviderData"name="XML File Storage Provider"path="myconfig.config"/>

      <dataTransformerxsi:type="XmlSerializerTransformerData"name="Xml Serializer Transformer">

        <includeTypes/>

      </dataTransformer>

    </configurationSection>

    <configurationSectionxsi:type="ReadOnlyConfigurationSectionData"name="dataConfiguration"encrypt="true">

      <storageProviderxsi:type="XmlFileStorageProviderData"name="XML File Storage Provider"path="dataConfiguration.config"/>

      <dataTransformerxsi:type="XmlSerializerTransformerData"name="Xml Serializer Transformer">

        <includeTypes/>

      </dataTransformer>

    </configurationSection>

  </configurationSections>

  <keyAlgorithmStorageProviderxsi:type="FileKeyAlgorithmPairStorageProviderData"name="File Key Algorithm Storage Provider"path="C:\Documents and Settings\dparys\Desktop\myapp\mykey.key">

    <dpapiSettingsxsi:nil="true"/>

  </keyAlgorithmStorageProvider>

  <includeTypes/>

</enterpriselibrary.configurationSettings>

</configuration>

Mehr Informationen kann man noch unter dem Workspace finden.