示例#1
0
 public RateController(ILogger <SegmentController> logger, IConfiguration configuration, ISegmentService segmentService, IRateService rateService)
 {
     _logger         = logger;
     _configuration  = configuration;
     _segmentService = segmentService;
     _rateService    = rateService;
 }
 public ProductViewedViewComponent(
     ILogger logger,
     ISegmentService segmentService)
 {
     _logger         = logger;
     _segmentService = segmentService;
 }
 public OrderCompletedViewComponent(
     ILogger logger,
     ISegmentService segmentService)
 {
     _logger         = logger;
     _segmentService = segmentService;
 }
示例#4
0
        public ProfileServiceGetByIdTests()
        {
            repository = A.Fake <ICosmosRepository <JobProfileModel> >();

            segmentService    = A.Fake <ISegmentService>();
            mapper            = A.Fake <IMapper>();
            jobProfileService = new JobProfileService(repository, segmentService, mapper);
        }
        public SubscriberRecordService(ISubscriberRecordRepository repository, ISegmentService subscriberRecordRepository)
        {
            Check.If(repository).IsNotNull();
            Check.If(subscriberRecordRepository).IsNotNull();

            _subscriberRecordRepository = repository;
            _segmentService = subscriberRecordRepository;
        }
示例#6
0
 public ProfileController(ILogService logService, IJobProfileService jobProfileService, AutoMapper.IMapper mapper, FeedbackLinks feedbackLinks, ISegmentService segmentService, IRedirectionSecurityService redirectionSecurityService)
 {
     this.logService                 = logService;
     this.jobProfileService          = jobProfileService;
     this.mapper                     = mapper;
     this.feedbackLinks              = feedbackLinks;
     this.segmentService             = segmentService;
     this.redirectionSecurityService = redirectionSecurityService;
 }
示例#7
0
 public RoutesController(ISegmentService segmentService, IRouteService routeService, ICityService cityService, IPriceService priceService, IParcelCategoryService parcelCategoryService, ApplicationDbContext context)
 {
     _segmentService            = segmentService;
     _routeService              = routeService;
     _cityService               = cityService;
     this.priceService          = priceService;
     this.parcelCategoryService = parcelCategoryService;
     this.context               = context;
 }
示例#8
0
 public JobProfileService(
     ICosmosRepository <Data.Models.JobProfileModel> repository,
     ISegmentService segmentService,
     IMapper mapper)
 {
     this.repository     = repository;
     this.segmentService = segmentService;
     this.mapper         = mapper;
 }
示例#9
0
        public override void Setup()
        {
            base.Setup();

#if UNIT
            SegmentService = new SegmentService(WebClient);
#elif INT
            SegmentService = ServiceLocator.Get <ISegmentService>();
#endif
        }
示例#10
0
 public IntegrationController(ApplicationDbContext context,
                              ISegmentService segmentService,
                              IPriceService priceService,
                              IParcelService parcelService)
 {
     this.context        = context;
     this.segmentService = segmentService;
     this.priceService   = priceService;
     this.parcelService  = parcelService;
 }
示例#11
0
        public async Task <Rate> Convert(Rate rat, ISegmentService segmentService)
        {
            #region [ variable ]

            decimal brl   = 0;
            decimal cur   = 0;
            decimal conv  = 0;
            decimal value = 0;

            #endregion

            try
            {
                decimal segmentRate = await segmentService.GetSegmentRate(rat.Segment.Value);

                HttpResponseMessage response = await HttpClient.GetAsync(url);

                if (response.IsSuccessStatusCode)
                {
                    string apiReturn = await response.Content.ReadAsStringAsync();

                    JObject fields = JObject.Parse(apiReturn);

                    string strBrl = fields["rates"]["BRL"].ToString();
                    string strCur = fields["rates"][rat.Currency].ToString();

                    if (decimal.TryParse(strBrl, out brl))
                    {
                        if (decimal.TryParse(strCur, out cur))
                        {
                            conv  = brl / cur;
                            value = (rat.Qty.Value * conv) * (1 + (segmentRate / 100));
                        }
                    }
                }
            }
            catch (Exception ex) { }

            rat.Value = string.Format("{0:C}", value);
            return(rat);
        }
示例#12
0
 public SegmentController(ISegmentService SegmentService)
 {
     _SegmentService = SegmentService;
 }
示例#13
0
 public SegmentsController(ISegmentService segmentService, IAdvertiserService advertiserService, IMappingEngine mapping)
 {
     _segmentService    = segmentService;
     _advertiserService = advertiserService;
     _mapping           = mapping;
 }
示例#14
0
 public DataPointManagementController(IDatapointService datapointService, ISegmentService segmentService)
 {
     this._datapointService = datapointService;
     this._segmentService   = segmentService;
 }
 public VIPSeatsController(ISegmentService segmentService)
 {
     _segmentService = segmentService;
 }
 public SegmentController(ISegmentService segmentService)
 {
     _segmentService = segmentService;
 }
 public DiscountTicketsController(ISegmentService segmentService)
 {
     _segmentService = segmentService;
 }
示例#18
0
 public EventConsumer(ISegmentService segmentService)
 {
     _segmentService = segmentService;
 }
 public SegmentManagementController(ISegmentService segmentService, ISegmentCategoryService segmentCategoryService)
 {
     this._segmentService         = segmentService;
     this._segmentCategoryService = segmentCategoryService;
 }