﻿<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <section name="Services" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
    <section name="Modules" type="Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite"/>
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
  <connectionStrings>
    <add name="Byk.SmartChart.MainDb" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source='bykmainDB_3.sdf'" />
  </connectionStrings>
  <entityFramework codeConfigurationType="Byk.DataServices.MainDbDbConfiguration, Byk.SmartChart.Data">
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <!--<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />-->
      <provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
    </providers>
  </entityFramework>
      
  <Services>
    <typeAliases>
      <!-- Lifetime manager types -->
      <typeAlias alias="singletonLifetime" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager,Microsoft.Practices.Unity"/>
      <typeAlias alias="applicationSettings" type="BYK.Settings.IApplicationSettings,BYK.Common.Infrastructure"/>
      <typeAlias alias="ServiceModule" type="BYK.Composite.Modularity.IServiceModule,BYK.Common.Infrastructure"/>
      <typeAlias alias="MeasurementsDataService" type="BYK.Services.IMeasurementsDataService,BYK.Module.Measurements.Data"/>
      <typeAlias alias="worker" type="BYK.ViewModel.IWorker,BYK.Common.PresentationV2"/>
      <typeAlias alias="workerSync" type="BYK.ViewModel.SyncWorker,BYK.Common.PresentationV2"/>
      <typeAlias alias="workerAsync" type="BYK.ViewModel.AsyncWorker,BYK.Common.PresentationV2"/>
    </typeAliases>
    <containers>
      <container>
        <types>

          <type type="ServiceModule" name="BYK.ProgramServiceModul" mapTo="BYK.ProgramServiceModul,MainDbConverter">
            <lifetime type="singletonLifetime"/>
          </type>

        </types>

        <instances>
          <add name="System.UI.ShowHelpTools" type="System.String" value="False"/>
          <!--<add name="System.UseRole"
							 type="System.String"
							 value="User|Administrator" />
							 <add name="System.UseApplication"
							 type="System.String"
							 value="<name der application>" />-->
        </instances>
      </container>
      <container name="MainDbConverter">
        <types>

          <type type="applicationSettings" mapTo="BYK.Settings.Xaml.ApplicationSettings, BYK.Common.Infrastructure">
            <lifetime type="singletonLifetime"/>
            <typeConfig extensionType="Microsoft.Practices.Unity.Configuration.TypeInjectionElement,Microsoft.Practices.Unity.Configuration">
              <property name="Directory" propertyType="System.String">
                <value value="BYK\smart-chart"/>
              </property>
              <property name="FileName" propertyType="System.String">
                <value value="Settings.config"/>
              </property>
              <method name="Load"/>
            </typeConfig>
          </type>
          <!--<type type="worker" mapTo="workerSync">
								<lifetime type="singletonLifetime" />
						</type>-->
          <type type="worker" mapTo="workerAsync">
            <lifetime type="singletonLifetime"/>
          </type>
        </types>
      </container>
      <container name="MainDbConverter.Debug">
      </container>
      <container name="MainDbConverter.Release">
      </container>

    </containers>
  </Services>

  <!-- *********************************************************************************************************
		loggingConfiguration
	**************************************************************************************************************-->
  <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
    <listeners>
      <add fileName="Trace.log" header="----------------------------------------" footer="----------------------------------------" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="FlatFile TraceListener"/>
    </listeners>
    <formatters>
      <add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}
)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Text Formatter"/>
    </formatters>
    <categorySources>
      <add switchValue="All" name="Debug">
        <listeners>
          <add name="FlatFile TraceListener"/>
        </listeners>
      </add>
      <add switchValue="All" name="Info">
        <listeners>
          <add name="FlatFile TraceListener"/>
        </listeners>
      </add>
      <add switchValue="All" name="General">
        <listeners>
          <add name="FlatFile TraceListener"/>
        </listeners>
      </add>
    </categorySources>
    <specialSources>
      <allEvents switchValue="All" name="All Events"/>
      <notProcessed switchValue="All" name="Unprocessed Category"/>
      <errors switchValue="All" name="Logging Errors &amp; Warnings">
        <listeners>
          <add name="FlatFile TraceListener"/>
        </listeners>
      </errors>
    </specialSources>
  </loggingConfiguration>
  
</configuration>