现在的位置: 首页 > 综合 > 正文

Web.config中跟注入式相关的配置节点有哪些?

2012年09月26日 ⁄ 综合 ⁄ 共 2545字 ⁄ 字号 评论关闭

下面是所有跟注入式相关的配置节点,如果您的项目要从3.0的工作流升级到4.0,那就需要加入以下这些配置节。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
</configSections>

<system.web>
<httpModules>
<add name="UnityModule" type="InfoWeb.UnityModule, InfoWeb" />
</httpModules>
</system.web>
<system.webServer>
<modules>
<add name="UnityModule" type="InfoWeb.UnityModule, InfoWeb" />
</modules>
</system.webServer>
<unity>
<typeAliases>
<!-- Lifetime manager types -->
<typeAlias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<typeAlias alias="SecurityProvider" type="WayGo.Enterprise.Providers.SecurityProvider,WayGo.Enterprise.Providers" />
<typeAlias alias="OrganizationProvider" type="WayGo.Enterprise.Providers.OrganizationProvider,WayGo.Enterprise.Providers" />
<typeAlias alias="ConnectionNameTypeConverter" type="WayGo.Enterprise.Util.ConnectionNameTypeConverter,WayGo.Enterprise.Util" />
<typeAlias alias="IDbConnection" type="System.Data.IDbConnection,System.Data,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<typeAlias alias="ISecurityObjectHelper" type="Bingosoft.Workflow.Providers.DB.ISecurityObjectHelper,Bingosoft.Workflow.Providers.DB" />
<typeAlias alias="IApplicationHelper" type="Bingosoft.Workflow.WFAPI.IApplicationHelper,Bingosoft.Workflow.WFAPI" />
</typeAliases>
<containers>
<container name="session">
<types>
<type type="OrganizationProvider" mapTo="Bingosoft.Workflow.Providers.DB.DBWayGoOrganizaiontProvider,Bingosoft.Workflow.Providers.DB">
<lifetime type="singleton" />
</type>
<type type="SecurityProvider" mapTo="Bingosoft.Workflow.Providers.DB.DBWayGoSecurityProvider,Bingosoft.Workflow.Providers.DB">
<lifetime type="singleton" />
</type>
<type type="Bingosoft.Workflow.Providers.DB.OrganizationDB,Bingosoft.Workflow.Providers.DB">
<typeConfig extensionType="Microsoft.Practices.Unity.Configuration.TypeInjectionElement, Microsoft.Practices.Unity.Configuration">
<constructor>
<param name="connection" parameterType="IDbConnection">
<value value="center" type="IDbConnection" typeConverter="ConnectionNameTypeConverter" />
</param>
</constructor>
</typeConfig>
</type>
<type type="ISecurityObjectHelper" mapTo="Bingosoft.Workflow.Providers.DB.SecurityObjectHelper,Bingosoft.Workflow.Providers.DB">
</type>
<type type="IApplicationHelper" mapTo="Bingosoft.Workflow.WFAPI.ApplicationHelper,Bingosoft.Workflow.WFAPI">
<lifetime type="singleton">
</lifetime>
</type>
</types>
</container>
</containers>
</unity>
</configuration>

 

抱歉!评论已关闭.