Questions tagged [auto-registration]
25 questions
4
votes
2 answers
Automatic discovery of automapper configurations
When you create a controller in MVC, you don't have to do any additional registration for it. Same goes with adding areas. As long as your global.asax has an AreaRegistration.RegisterAllAreas() call, no additional setup is necessary.
With…

danludwig
- 46,965
- 25
- 159
- 237
3
votes
0 answers
StructureMap RegistrationConvention for decorator pattern
I'm using the decorator pattern to implement caching for my Repositories as such:
IFooRepository()
IFooRepository FooRepository()
IFooRepository CachedFooRepository(IFooRepository fooRepository)
The Cached repository checks the cache for the…

smathson
- 108
- 2
- 6
3
votes
1 answer
How To Get Automatic Registration With Castle Windsor
I recently read Ayende's blog post on automatic registration working with XML Configuration. I would like to do exactly what he does, but his code snippet doesn't work for me. The Register method doesn't exist on my container object.
Here's his…

Scott Muc
- 2,873
- 27
- 38
2
votes
2 answers
Unity.AutoRegistration not auto-registering
I'm trying to use Unity.AutoRegistration to auto wire my interfaces to the implementations. My configuration looks like this:
public static class UnityConfigurator
{
public static UnityContainer Configure()
{
var container = new…

Charlie
- 10,227
- 10
- 51
- 92
2
votes
2 answers
Spring cloud DiscoveryClient. getLocalServiceInstance() deprecated, how to use Registration?
I have a requirement to get the current instance-id of the running microservice, the problem is that I have the requirement that if the process is not registered a "random generated" instance id has to be provided.
I'm trying to get the service…

Panthro
- 3,247
- 2
- 32
- 37
2
votes
1 answer
Castle Windsor: Find an implementing assembly and used it
How do I tell castle to pick up an interface implementation from the assemblies in the executing directory.
E.g.
How do I tell castle to find an implementation for ILog and then If I drop log4net among the assemblies in the executing directory, it…

Quintin Par
- 15,862
- 27
- 93
- 146
2
votes
1 answer
castle windsor auto registration from two different assembly?
container.Register(
AllTypes.Pick().FromAssembly(typeof (UserRepository).Assembly)
.WithService.FirstInterface());
Currently the code above will work fine if the interface are also in the same assembly but it will blow up if…

firefly
- 285
- 3
- 12
2
votes
2 answers
Registration with Unity
I'm accustomed to using Autofac and with autofac with one line of code I can register all the interfaces in the assembly so that they resolve to whatever classes implement that interface.
In Unity it's looking like I need to register every interface…

Honorable Chow
- 3,097
- 3
- 22
- 22
1
vote
0 answers
Collect MAC address of Zabbix agents
I would like to get the MAC address of the Zabbix agents (both Windows & Linux) and automatically fill in the inventory of the particular hosts.
I've used the key system.hw.macaddr to do this, but I think the key is only supported in Linux hosts.…

sreehari s kumar
- 23
- 5
1
vote
2 answers
create graph over hosts against single item in zabbix
I am trying to create a graph in zabbix over multiple hosts against a single item say "cpu utilization". But the hosts are getting discovered through auto-registration process and are added to group "zServers" and are attached with template…

Yogesh Jilhawar
- 5,605
- 8
- 44
- 59
1
vote
1 answer
Auto Register using Unity Loader exception
I have recently added unity to my project and I am looking for a cleaner way to register classes.
I have got to the point where it auto registers fine but attempts to auto register everything. Including Mircrosoft.Web.Mvc which includes several…

RyanCosans
- 442
- 1
- 4
- 13
1
vote
0 answers
StructureMap auto registration of generic types that are not referenced
I am getting this error: No Default Instance defined for PluginFamily IReadModelRepository
This is my registry
public class DependencyRegistry : Registry
{
public DependencyRegistry()
{
//Must reference…

ton.yeung
- 4,793
- 6
- 41
- 72
1
vote
1 answer
How to specify named instance as constructor parameter for type that are auto-registered for StructureMap
Using StructureMap, We have all types that are auto registered.
public class MessageRegistry : Registry
{
public MessageRegistry(){
Scan(x =>
{
x.AssemblyContainingType(typeof (FormatHelper));
…

Pii
- 13
- 4
1
vote
0 answers
Register by complex naming convention in Castle Windsor
I'm a newbie in the world of DI container. I am currently using Windsor Castle and I'm trying to configure my container by naming convention. Here is an example of what I'm trying to do:
interface INode{}
interface INodeType1: INode{}
interface…

P. St-John
- 11
- 2
1
vote
1 answer
can StructureMap auto-register Handler for IHandler?
I posted an issue on SM repo.
My question is similar to this one, but I'd like to localize a problem.
Let's say I have generic interface IPrinter and its generic implementation Printer. I'd like StructureMap to resolve the concrete closed type…

vorou
- 1,869
- 3
- 18
- 35