|
Hi there,
can anyone help?
I have created a WCF library (not application) and i will be hosting this in a SVC IIS page..
But i was wanting to load the unity stuff in generic place... I could load it in the global.asax but then its tied to the IIS Asp....
Started by mark smith on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can use an IInstanceProvider to create service objects using Unity or another IOC container.
|
|
We are using ASP.net MVC.
Which of these is the best DI framework Ninject or Unity and why?
Started by Miral on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I personally....
Unity seems to rely mostly on XML configuration David Hayden said on DotNet Rocks that Unity is the preferred choice if you use the rest of EntLib and are familiar with that.
Ninject has a better fluent-configuration scheme.
|
|
Is it possible to configure ms Unity container from an xml document and NOT from a file? thx
Started by Gil on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It's ashame the XMLDocument in some file localy on the machine and then load that XML file in the Unity container.
Your own xml file, read settings and programmatically setup your Unity container.
|
Ask your Facebook Friends
|
Hello,
i“have read the Ms-PL under the Homepage of Unity, but its not clear for me what i need to do, when i use Unity in my commercial programm?
I only use the binary files and i want to distribute them along with my programm.
Do i have to provide a ...
Started by Jehof on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The upshot....
4) Edit the source code and release it under a different (well, incompatible) license .
_.28Ms-PL.29
A while ago, i asked the guys from Unity Application Block, about the commercial use in the Unity software and continue to use it.
|
|
Guys, is there an easiest way to learn unity ? I haven't read much about IoC etc, but I need to learn IoC based on Unity for my future reference. Please help. Thanks
Started by Funky81 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
unity
All you need is to understand basic conception of IoC/DI, and in order to do that you need related post here: http://stackoverflow.com/questions/1232643/getting-started-with-unity-framework.
|
|
Can I test if a type has been registered in a Unity container without calling for a Resolve and trapping the exception?
Started by johnc on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
See the release and tested Unity 2.0 beta 1....
The Beta1 of Unity 2.0 is available on Codeplex as of Feb 10th.
Unity 2.0 will have an IsRegistered method that you can use to find out if a type has been registered in the container.
|
|
Can someone explain to me what is the purpose of the Unity Application Block? I tried looking through the documentation but its all very abstract.
What are some practical uses for the Unity block?
Started by Dave on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For more on Unity MSDN has some great resources, and I highly suggest reading more)....
I think the best simple definition using the DI Container as a configurable factory class .
The Unity Application Block is used for dependency injection .
|
|
Unity's documentation says of the RegisterInstance<> method that registers an instance so that that particular instance is returned everytime Resolve<> is called .
However, this example below shows that each time Resolve<> is called,...
Started by Edward Tanguay on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You have configured your container with IValidator so you will have to resolve using IValidator... .
Var validator2 = container.Resolve<IValidator>(); ...
I think if you called Resolve with IValidator as the type parameter, it would work as you expect:
.. .
|
|
Hi,
What's pros and cons of using Enterprise Library Unity between other IoC (Windsor ..)
Started by Yoann. B on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Namely: AutoFac, MEF, Ninject, Spring.Net, StructureMap, Unity, and Windsor(InstanceScope.Singleton); x.ForConcreteType....
The biggest advantage that Unity has over the competition is that it is provided through a bunch of them.
And there.
|
|
Does Ninject have and equivalent method for unity's registerinstance.
I want to create a mock object and register it.
Thanks
Started by Ryu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Bind<IMyType>().ToConstant(mock.Object)....
Here's the simple answer
Bind<IMyType>().ToConstant<MyType>(new MyType());
So here's an example using Moq:
var mock = new Mock<IMyType>(); //Setup your mock expectations / etc here .
|