public ProductCountViewComponent(IRestClient restClient, IMapper mapper, UserManager <SiteUser> userManager , RoutingConfig routingConfig, IHttpContextAccessor contextAccessor) { this.restClient = restClient; this.mapper = mapper; this.userManager = userManager; this.routingConfig = routingConfig; this.contextAccessor = contextAccessor; }
public ShoppingCartService(IRestClient restClient, IMapper mapper , RoutingConfig routingConfig, UserManager <SiteUser> userManager, IHttpContextAccessor contextAccessor, AnoymousIdHandler anonHandler) { this.restClient = restClient; this.mapper = mapper; this.routing = routingConfig.ShoppingCartService; this.contextAccessor = contextAccessor; this.anonHandler = anonHandler; this.userManager = userManager; }
public void Configure( IApplicationBuilder app, IWebHostEnvironment env ) { ExceptionConfig.Apply(app, env, Configuration); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); RoutingConfig.Apply(app, env, Configuration); }
public static void Register(HttpConfiguration config) { //var cors = new EnableCorsAttribute("*", "*", "*"); //config.EnableCors(cors); MediaTypeFormattingConfig.Configure(config); RoutingConfig.Configure(config); IoCConfig.Configure(config); TracingConfig.Configure(config, IoCConfig.Container); LoggingConfig.Configure(); ExceptionHandlingConfig.Configure(config); ValidationConfig.Configure(config); LocalizationConfig.Configure(config); //configure authentication config.MessageHandlers.Insert(0, new AuthenticationHandler()); //for gzip compression use: // config.MessageHandlers.Insert(0, new ServerCompressionHandler(new GZipCompressor(), new DeflateCompressor())); }
static void Main(string[] args) { var requestDispatcher = new RequestDispatcher(); var routingConfig = new RoutingConfig(); var createCutomerCommand = new CreateCustomerCommand(); routingConfig.Register(createCutomerCommand.MessageType, new Tuple <Parse, DispatchCommand>(createCutomerCommand.Parse, requestDispatcher.CreateCustomer)); var placeOrderCommand = new PlaceOrderCommand(); routingConfig.Register(placeOrderCommand.MessageType, new Tuple <Parse, DispatchCommand>(placeOrderCommand.Parse, requestDispatcher.PlaceOrder)); var routeDispatcher = new RouteDispatcher(routingConfig); var server = new SocketServer(new IPEndPoint(IPAddress.Loopback, 11000), routeDispatcher.Dispatch); server.StartListening(); Console.ReadKey(); }
public ProductService(IRestClient client, RoutingConfig routingConfig) { this.client = client; this.routing = routingConfig.ProductService; }
public OrderPurchaseViewComponent(IOrderRestService restClient, RoutingConfig routingConfig, IMapper mapper) { this.restClient = restClient; this.routingConfig = routingConfig; this.mapper = mapper; }
public OrderRestService(IRestClient client, RoutingConfig routingConfig, IMapper mapper) { this.client = client; this.routingConfig = routingConfig.OrderService; this.mapper = mapper; }
public CustomerRestService(IRestClient client, RoutingConfig routingConfig, IMapper mapper) { this.client = client; this.routingConfig = routingConfig; this.mapper = mapper; }
public OrderConfirmationViewComponent(IRestClient restClient, RoutingConfig routingConfig, IMapper mapper) { this.restClient = restClient; this.routingConfig = routingConfig; this.mapper = mapper; }