structuremap Questions
2
Can anyone point me in the direction of some samples or instructions on how to achieve this please?
Selene asked 28/8, 2014 at 9:25
1
Solved
When implementing DI in WebAPI with StructureMap, we used the ServiceActivator found in
Configuring Dependency Injection with ASP.NET WebAPI 2.1
WebAPI + APIController with structureMap
publ...
Bullpup asked 28/8, 2014 at 14:9
1
I have registered 5 derived classes for the same interface using named instances. All these classes are registered as Singleton
For<IBaseInterface>().Singleton().Use<DerivedClass1>().N...
Cobnut asked 24/5, 2013 at 10:2
1
Solved
So I have an AngularJs/MVC project with normal Controllers and decided to move more to an SPA app and add WebApi2 to pass data back to my UI instead of using MVC.
In my Global.asax I had the foll...
Hydromechanics asked 10/7, 2014 at 8:11
4
Solved
I'm getting below error. I setup it similar to asp.net mvc 4.
No parameterless constructor defined for this object. Description: An
unhandled exception occurred during the execution of the curr...
Corset asked 20/10, 2013 at 11:32
1
In StructureMap 2 I had something like this:
For<ILogger>().HybridHttpOrThreadLocalScoped().Use<Logger>();
When using Structure Map 3 should I use the following?
For<ILogger>(...
Cryoscope asked 22/4, 2014 at 21:42
1
Solved
How unity can get all instances of an interface and then access them?
Code pieces are taken from here : Fail-Tracker
In StrcutureMap its possible to register all types of an interface from an ass...
Batty asked 27/4, 2014 at 16:28
1
Solved
am kinnda new to IOC and StructureMap. WHen i am trying to call the TheCallingAssembly() method, its not recognising it.
Someone please help
ObjectFactory.Configure(x =>
{
x.Scan(y =>
{...
Adviser asked 19/4, 2014 at 4:19
1
I have an existing application using the last build from the 2.x version of Structuremap, and it works fine. StructureMap 3 just went live recently and I decided to try updating to it and see how i...
Donofrio asked 3/4, 2014 at 18:46
2
Solved
With structuremap 2.6.4.1 my container is configured like this:
existingContainer.Configure(expression =>
{
expression.For<IDocumentSession>()
.HybridHttpOrThreadLocalScoped()
.Use(co...
Prem asked 13/4, 2014 at 9:7
1
Solved
I have a application that uses IOC and DI to create and inject services.
I have a service layer that handles some business logic, in the service layer I have a repository that communicates with th...
Assumption asked 4/4, 2014 at 5:26
2
Between various Stack Overflow questions and blog posts there is a pretty reasonable amount of documentation on the topic of open generics and StructureMap. Unfortunately, I must be missing somethi...
Prader asked 28/9, 2010 at 21:29
3
Solved
I am using mvc.net with StructureMap to scan and register all repositories and services for me. Now I want to register and cache by Singleton. How can I do?
IContainer container = new Container(x...
Sorilda asked 10/6, 2009 at 20:4
2
Solved
That's my AccountController:
[Authorize]
public class AccountController : Controller
{
private UserManager<User> _userManager { get; set; }
public AccountController() : this(new UserManag...
Monostich asked 10/3, 2014 at 10:35
2
I have a build configured with CI post which some tests are run. Although the tests run successfully, the build shows warnings:
: Cannot generate stub for StructuremapMvc: type is sealed.
: Canno...
Dyak asked 15/10, 2013 at 11:6
1
I am trying to setup setter/property injection for my MVC project using StructureMap, but I can't seem to get it to set the properties. I am well aware that Constructor injection is the recommended...
Kristofor asked 21/9, 2012 at 2:4
1
I have two services that require an XPathDocument. I want to be able to define named instances of XPathDocumnet to use in the configuration of the two services. I also want to be able to tell Stuct...
Superposition asked 11/12, 2008 at 15:30
1
Why I am not able to inject the SetterProperty via StructureMap to an MVC ActionFilter?
public class LockProjectFilter : ActionFilterAttribute
{
[SetterProperty]
public ISecurityService Securi...
Advert asked 14/11, 2013 at 12:24
3
I have been working on injecting AutoMapper into controllers. I like the implementation of Code Camp Server. It creates a wrapper around AutoMapper's IMappingEngine. The dependency injection is don...
Apothecary asked 12/11, 2009 at 3:37
4
Solved
public interface IRepository<T> where T : Entity
{
void Delete(T entity);
T[] GetAll();
T GetById(int id);
void SaveOrUpdate(T enity);
void Merge(T entity);
}
public interface ITeamEmpl...
Jedjedd asked 31/10, 2010 at 12:9
2
Solved
I'm working on an Asp.Net MVC 3 application using Fluent NHibernate. I'm just attempting to add an IoC container using StructureMap.
I have implemented a custom controller factory which uses Struc...
Midwest asked 28/10, 2011 at 14:52
2
Solved
I want to create a Structuremap named instance in code, without config file
I want to be able to create the instance like this:
var namedInjector = ObjectFactory.GetNamedInstance<IInjectable&g...
Flout asked 22/3, 2009 at 18:37
1
Solved
We are currently writing a nuget package that acts as a service gateway. Its responsibility is to wrap up the call to an external service, so that is made in the correct way and the response is dea...
Circumlunar asked 16/8, 2013 at 8:46
4
Solved
I am using SignalR in my MVC3 application, and since I have implemented StructureMap Dependency Injection on my controllers I would like to do the same in my hub, but I can't seem to get it working...
Biron asked 20/3, 2012 at 16:4
1
Solved
In my StructureMap bootstrapping code I'm using a custom convention to scan assemblies and add interface/implementation pairs to the object graph as named instances. Essentially I have some logic w...
Succession asked 28/5, 2013 at 13:8
© 2022 - 2024 — McMap. All rights reserved.