Since i am new to this framework, i now noticed this nice snippet in the forum.
Instead of registration inside a dictionary, u could use a factory like this:
Instead of registration inside a dictionary, u could use a factory like this:
public class StructureMapValidatorFactory : ValidatorFactoryBase {
public override IValidator CreateInstance(Type validatorType) {
return ObjectFactory.TryGetInstance(validatorType) as IValidator;
}
}