Example #1
0
        protected PriceServiceClient GetClientStandard()
        {
            var address = new EndpointAddress(serviceUrl);
            var binding = new BasicHttpBinding();
            var client  = new PriceServiceClient(binding, address);

            return(client);
        }
Example #2
0
        public RegisterInvoice()
        {
            InitializeComponent();
            _priceServiceClient = new PriceServiceClient();
            _userController     = UserController.Instance;

            Title += " | Uživatel: " + _userController.LoggedUser.UserName;
        }
Example #3
0
        protected PriceServiceClient GetClientWithDefaultLogging()
        {
            var    address          = new EndpointAddress(serviceUrl);
            string useCustomHandler = Boolean.FalseString;

            CustomBinding customBinding = new CustomBinding();

            customBinding.Elements.Add(new LoggingBindingElement(logPathClient, useCustomHandler));
            customBinding.Elements.Add(new HttpTransportBindingElement());

            var client = new PriceServiceClient(customBinding, address);

            return(client);
        }
Example #4
0
        protected PriceServiceClient GetClientWithDefaultLogging()
        {
            var            address = new EndpointAddress(serviceUrl);
            const bool     saveOriginalBinaryBody = false;
            const bool     useCustomHandler       = false;
            MessageVersion messageVersion         = MessageVersion.Soap11;

            CustomBinding customBinding = new CustomBinding();

            customBinding.Elements.Add(new LoggingBindingElement(logPathClient, saveOriginalBinaryBody, useCustomHandler, messageVersion));
            customBinding.Elements.Add(new HttpTransportBindingElement());

            var client = new PriceServiceClient(customBinding, address);

            return(client);
        }
Example #5
0
 public OrderService(OrderContext orderContext
                     , UserContext userContext
                     , BucketRepository bucketRepository
                     , PriceServiceClient pricingClient
                     , WarehouseServiceClient warehouseServiceClient
                     , RabbitMQMessageSender mqSender
                     , MetricReporter metricReporter
                     , IDistributedCache distributedCache)
 {
     _orderContext           = orderContext;
     _userContext            = userContext;
     _pricingClient          = pricingClient;
     _warehouseServiceClient = warehouseServiceClient;
     _bucketRepository       = bucketRepository;
     _mqSender         = mqSender;
     _metricReporter   = metricReporter;
     _distributedCache = distributedCache;
 }