Value Injector – How to Use

One of the main tasks that you may face during development is how to translate from one object to another that is very similar in term of properties and attributes. There are many ready to use code to be downloaded from Internet and use.

I tried Value Injector DLL; it was good enough for my needs and it satisfy my needs in very good way. you can download the Value Injector DLL from this link.

The overall performance of this component was very good and it didn’t hit the performance of the system that I’m working on.

The Basic usage of this component is as follow.

using Omu.ValueInjecter;public class DemoClass
{

public void MethodInjector( mySourceClass source)
{
MyClass destination = new MyClass();

destination.InjectFrom(source);

//inject using your own injector calss.
destination .InjectFrom<MyInjection>(source);

}

}

The good thing about ValueInjector is that you can build your own Injector class and use it; that is needed if the current implementation for ValueInjector is not satisfying your needs.

for more information about value injector, please visit this link