public UsersController(IMapper mapper, IUserService userService, ICountService countService, IAuthService authService)
 {
     _mapper       = mapper;
     _userService  = userService;
     _countService = countService;
     _authService  = authService;
 }
 public LikesController(ICountService countService, ILikeService likeService, IMapper mapper, IPhotoService photoService)
 {
     _likeService  = likeService;
     _mapper       = mapper;
     _photoService = photoService;
     _countService = countService;
 }
示例#3
0
 public PhotosController(IPhotoService photoService, IMapper mapper, IPhotoUpload photoUpload, ICountService countService)
 {
     _photoService = photoService;
     _mapper       = mapper;
     _photoUpload  = photoUpload;
     _countService = countService;
 }
 public ChannelsController(IChannelService channelService, IMapper mapper, IPhotoUpload photoUpload, ICountService countService)
 {
     _channelService = channelService;
     _mapper         = mapper;
     _photoUpload    = photoUpload;
     _countService   = countService;
 }
示例#5
0
 private void ViewClientForm_Load(object sender, EventArgs e)
 {
     _clientService                  = new ClientService();
     _countService                   = new CountService();
     monthForShowPicker.Format       = DateTimePickerFormat.Custom;
     monthForShowPicker.CustomFormat = "MM/yyyy";
     Reload();
 }
示例#6
0
 public TestController(
     ICountService srvCount,
     //Func<ICountService> srvCountFactory,
     IReadCountService srvReadCount)
 {
     _srvCount = srvCount;
     //_srvCountFactory = srvCountFactory;
     _srvReadCount = srvReadCount;
 }
示例#7
0
 public ReadCountService(ICountService srv)
 {
     System.Diagnostics.Debug.WriteLine(nameof(ReadCountService) + " created");
     _srv = srv;
 }
示例#8
0
 public CountServiceController(ICountService countService, IParamsValidator paramvValidator)
 {
     this._countService    = countService;
     this._paramvValidator = paramvValidator;
 }
示例#9
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ICountService srv)
        {
            //app.Map("/x", (map) =>
            //{
            //    map.Run(async (context) =>
            //    {
            //        await context.Response.WriteAsync("Run middleware for x branch");
            //    });
            //});
            //app.Map("/y", (map) =>
            //{
            //    map.Use(async (context, next) =>
            //    {
            //        await context.Response.WriteAsync("Run middleware for y branch");
            //        await next.Invoke();
            //    });
            //});

            //app.Use(async (context, next) =>
            //{
            //    await context.Response.WriteAsync("xxxx<br />");
            //    await next.Invoke();
            //});

            //app.Use(async (context, next) =>
            //{
            //    try
            //    {
            //        context.Response.ContentType = "text/html";
            //    }
            //    catch (Exception ex)
            //    {
            //        await context.Response.WriteAsync(ex.Message);
            //    }
            //    finally
            //    {
            //        await next.Invoke();
            //    }
            //});

            //app.UseMvcWithDefaultRoute();

            //app.UseMyAuthentication();
            //app.UseMyAuthorization();
            app.UseStaticFiles();
            app.UseMvcWithDefaultRoute();

            app.Use(async(context, next) =>
            {
                await context.Response.WriteAsync("FirstUse<br />");
                await context.Response.WriteAsync($"Counter:{srv.IncCount()}<br/>");
                await next.Invoke();
            });
            app.Use(async(context, next) =>
            {
                if (context.Request.Query.ContainsKey("id"))
                {
                    await context.Response.WriteAsync($"SecondUse=>{context.Request.Query["id"]}<br />");
                }
                else
                {
                    await next.Invoke();
                }
            });
            app.Use(async(context, next) =>
            {
                await context.Response.WriteAsync("ThirdUse<br />");
                await next.Invoke();
            });

            app.Map("/z", (map) =>
            {
                map.Run(async(context) =>
                {
                    await context.Response.WriteAsync("Run middleware for z branch");
                });
            });

            app.MapWhen(ctx => ctx.Request.Path.Value.Contains("a"),
                        (map) => {
                map.Run(async(context) =>
                {
                    await context.Response.WriteAsync("Run middleware for conditional branch");
                });
            });

            app.Run(async(context) =>
            {
                await context.Response.WriteAsync("FirstRun<br />");
            });
            app.Run(async(context) =>
            {
                await context.Response.WriteAsync("SecondRun<br />");
            });
        }
示例#10
0
 public CountController(ICountService counter)
 {
     _counter = counter;
 }
示例#11
0
 public HomeController(IHomeService homeService, IMapper mapper, ICountService countService)
 {
     _homeService  = homeService;
     _mapper       = mapper;
     _countService = countService;
 }
示例#12
0
 public CommentsController(ICommentService commentService, IMapper mapper, ICountService countService)
 {
     _commentService = commentService;
     _mapper         = mapper;
     _countService   = countService;
 }
 public CounterController(ILogger <CounterController> logger, ICountService countService)
 {
     _logger       = logger;
     _countService = countService;
 }
示例#14
0
 public SearchController(IMapper mapper, ISearchService searchService, ICountService countService)
 {
     _mapper        = mapper;
     _searchService = searchService;
     _countService  = countService;
 }
示例#15
0
 public CountHub(ICountService countService)
 {
     this.countService = countService;
 }