Permalink
Browse files

- Updated .gitignore to exclude *.vs10x files

- Fixed bug in WindsorContainerAdapter to register components as Transient for non-singleton components
- Fixed recursive stack overflow bug in UnityContainerAdapter
- Updated UnitOfWorkTransaction to dispose of attached unit of work and transaction before firing off TransactionDisposing event.
- Fixed invalid xml comment in ThreadLocalState

Signed-off-by: Ritesh Rao <rao.ritesh@gmail.com>
  • Loading branch information...
1 parent 3aaf20c commit 337a0080c9de00bbe8d11d75879cb986d3e6696e @riteshrao committed Jul 20, 2010
View
@@ -11,4 +11,5 @@ _ReSharper.*
*.user
*.cache
build
-output
+output
+*.vs10x
@@ -87,7 +87,10 @@ public void Register(Type service, Type implementation)
/// <param name="named">string. The service name with which the implementation is registered.</param>
public void Register(Type service, Type implementation, string named)
{
- _container.Register(Component.For(service).ImplementedBy(implementation).Named(named));
+ _container.Register(Component.For(service)
+ .ImplementedBy(implementation)
+ .LifeStyle.Is(LifestyleType.Transient)
+ .Named(named));
}
///<summary>
@@ -95,7 +95,7 @@ public void Register(Type service, Type implementation, string named)
///<param name="implementation">The type representing the implementation registered for the service.</param>
public void RegisterGeneric(Type service, Type implementation)
{
- RegisterGeneric(service, implementation);
+ Register(service, implementation);
}
///<summary>
@@ -106,7 +106,7 @@ public void RegisterGeneric(Type service, Type implementation)
///<param name="named">string. The service name with which the implementation is registerd.</param>
public void RegisterGeneric(Type service, Type implementation, string named)
{
- RegisterGeneric(service, implementation, named);
+ Register(service, implementation, named);
}
/// <summary>
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<configuration>
<connectionStrings>
- <add name="HREntities" connectionString="metadata=res://*/HRData.csdl|res://*/HRData.ssdl|res://*/HRData.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLExpress;Initial Catalog=DevelopmentDB;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
- <add name="OrderEntities" connectionString="metadata=res://*/OrdersData.csdl|res://*/OrdersData.ssdl|res://*/OrdersData.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLExpress;Initial Catalog=DevelopmentDB;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
+ <add name="HREntities" connectionString="metadata=res://*/HRData.csdl|res://*/HRData.ssdl|res://*/HRData.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=(local);Initial Catalog=Sandbox;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
+ <add name="OrderEntities" connectionString="metadata=res://*/OrdersData.csdl|res://*/OrdersData.ssdl|res://*/OrdersData.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=(local);Initial Catalog=Sandbox;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
@@ -3,6 +3,6 @@
<configSections>
</configSections>
<connectionStrings>
- <add name="testDb" connectionString="Data Source=.\SQLExpress;Initial Catalog=DevelopmentDB;Integrated Security=True" providerName="System.Data.SqlClient"/>
+ <add name="testDb" connectionString="Data Source=(local);Initial Catalog=Sandbox;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<configuration>
<connectionStrings>
- <add name="testdb" connectionString="Data Source=.\SQLExpress;Initial Catalog=DevelopmentDB;Trusted_Connection=true"/>
+ <add name="testdb" connectionString="Data Source=(local);Initial Catalog=Sandbox;Integrated Security=true"/>
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
@@ -160,15 +160,15 @@ void Dispose(bool disposing)
if (disposing)
{
_logger.Info(x => x("Disposing off transction {0}", _transactionId));
- if (TransactionDisposing != null)
- TransactionDisposing(this);
-
if (_unitOfWork != null)
_unitOfWork.Dispose();
if (_transaction != null)
_transaction.Dispose();
+ if (TransactionDisposing != null)
+ TransactionDisposing(this);
+
if (_attachedScopes != null && _attachedScopes.Count > 0)
{
_attachedScopes.ForEach(scope =>
@@ -37,6 +37,7 @@ public Hashtable State
}
}
+ /// <summary>
/// Gets state data stored with the default key.
/// </summary>
/// <typeparam name="T">The type of data to retrieve.</typeparam>
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 337a008

Please sign in to comment.