Exemplo n.º 1
0
        public IFormulaUsablePath MapFrom(FlatRateObjectPath flatRateObjectPath)
        {
            var rateObjectContainerPath = _objectPathMapper.MapFrom(flatRateObjectPath);

            return(_objectPathFactory.CreateFormulaUsablePathFrom(rateObjectContainerPath.ToArray())
                   .WithAlias(flatRateObjectPath.Alias)
                   .WithDimension(_dimensionRepository.DimensionByName(flatRateObjectPath.Dimension)));
        }
        public IEventAssignmentBuilder MapFrom(FlatEventChangedObject flatEventChangedObject)
        {
            var eventAssignmentBuilder = _objectBaseFactory.Create <IEventAssignmentBuilder>();

            eventAssignmentBuilder.ObjectPath = _objectPathMapper.MapFrom(flatEventChangedObject);
            eventAssignmentBuilder.UseAsValue = flatEventChangedObject.UseAsValue;
            eventAssignmentBuilder.Formula    = _formulaFactory.RateFor(flatEventChangedObject, _formulaCache);
            eventAssignmentBuilder.Dimension  = eventAssignmentBuilder.Formula.Dimension;
            return(eventAssignmentBuilder);
        }