-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am currently following instructions in a book to develop an application. It asks me to download StructureMap and then move the StructureMap.Dll file and the Log4Net.dll into the bin files. The problem is there doesnt seem to be a Log4Net.dll file in the StructureMap files, the only other dll apart…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I can't figure out how to define the default constructor (when it exists overloads) for a type in StructureMap (version 2.5) by code.
I want to get an instance of a service and the container has to inject a Linq2Sql data context instance into it.
I wrote this in my 'bootstrapper' method :
ForRequestedType<MyDataContext>()…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
This has completely baffled me on a number of configurations. I keep reading the documentation, and I just don't get it. Here is my registration code:
ForRequestedType<SimpleWorkItemProcessor>().TheDefault.Is.OfConcreteType<SimpleWorkItemProcessor>();
ForRequestedType<WorkItemRetryProcessor>()…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Is there any way to request an instance from the StructureMap ObjectFactory by the string name of the type? For example, it would be nice to do something like this:
var thing = ObjectFactory.GetInstance("Thing");
The use case here is a messaging scenario in which the message is very generic and…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm getting a "timeout expired" exception thrown from a relatively heavily trafficked ASP.NET MVC 2 site I developed using StructureMap and Fluent NHibernate.
I think that perhaps the connections aren't being disposed properly. What do you think may be causing this? Could it be my use of InstanceScope…
>>> More