public TDestination Map <TDestination>(object source) { var factory = new ResolverFactory(MapperContainer.Value); var resolveType = source is IEnumerable ? ResolveType.Collection : ResolveType.Single; IResolver resolver = factory.Create(resolveType); var destination = resolver.ResolveTypeMap(source); return((TDestination)destination); }
protected override void Populate(IProcess process, Parameters instance) { var parameters = (InsertPartParameters)instance; if (_resolver == null) { _resolver = ResolverFactory.Create(Part); } parameters.Target = (IProductType)_resolver.Resolve(process); }
protected override ParametersBase ResolveBinding(IProcess process) { if (_resolver == null) { _resolver = ResolverFactory.Create(Part); } return(new InsertPartParameters { Target = (IProductType)_resolver.Resolve(process) }); }
public void RegisterResolver() => ResolverFactory .Create() .Finally(resolver => _objectContainer .RegisterInstanceAs(resolver));