public ContentController(IUserContentAppService userContentAppService
                          , IGameAppService gameAppService
                          , INotificationAppService notificationAppService)
 {
     this.userContentAppService  = userContentAppService;
     this.gameAppService         = gameAppService;
     this.notificationAppService = notificationAppService;
 }
Exemple #2
0
 public TeamController(ITeamAppService teamAppService
                       , INotificationAppService notificationAppService
                       , IUserContentAppService userContentAppService)
 {
     this.teamAppService         = teamAppService;
     this.notificationAppService = notificationAppService;
     this.userContentAppService  = userContentAppService;
 }
Exemple #3
0
 public CountersViewComponent(IHttpContextAccessor httpContextAccessor
                              , IGameAppService gameAppService
                              , IProfileAppService profileAppService
                              , IUserContentAppService contentService
                              , ITeamAppService teamAppService) : base(httpContextAccessor)
 {
     this.gameAppService    = gameAppService;
     this.profileAppService = profileAppService;
     this.contentService    = contentService;
     this.teamAppService    = teamAppService;
 }
        public async Task Invoke(HttpContext context, IGameAppService gameAppService, IProfileAppService profileAppService, IUserContentAppService contentAppService)
        {
            StringBuilder sb = new StringBuilder();

            GameAppService    = gameAppService;
            ProfileAppService = profileAppService;
            ContentAppService = contentAppService;

            if (context.Request.Path.Value.Equals("/sitemap.xml", StringComparison.OrdinalIgnoreCase))
            {
                Stream stream = context.Response.Body;
                context.Response.StatusCode  = 200;
                context.Response.ContentType = "application/xml";
                sb.Append("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");

                Assembly assembly = Assembly.GetExecutingAssembly();

                List <Type> controllers = assembly.GetTypes()
                                          .Where(type => typeof(Controller).IsAssignableFrom(type) ||
                                                 type.Name.EndsWith("controller")).ToList();

                foreach (Type controller in controllers)
                {
                    sb.AppendLine(CheckController(controller));
                }

                sb.AppendLine("</urlset>");
                using (MemoryStream memoryStream = new MemoryStream())
                {
                    byte[] bytes = Encoding.UTF8.GetBytes(sb.ToString());
                    memoryStream.Write(bytes, 0, bytes.Length);
                    memoryStream.Seek(0, SeekOrigin.Begin);
                    await memoryStream.CopyToAsync(stream, bytes.Length);
                }
            }
            else
            {
                await _next(context);
            }
        }
Exemple #5
0
 public DeleteUserFromPlatformRequestHandler(IProfileAppService profileAppService, IUserContentAppService userContentAppService)
 {
     this.profileAppService     = profileAppService;
     this.userContentAppService = userContentAppService;
 }
 public FeedViewComponent(IHttpContextAccessor httpContextAccessor, IUserContentAppService userContentAppService, IUserPreferencesAppService userPreferencesAppService) : base(httpContextAccessor)
 {
     _userContentAppService = userContentAppService;
     _userPreferencesAppService = userPreferencesAppService;
 }
Exemple #7
0
 public JobPositionController(IJobPositionAppService jobPositionAppService
                              , IUserContentAppService userContentAppService)
 {
     this.jobPositionAppService = jobPositionAppService;
     this.userContentAppService = userContentAppService;
 }
Exemple #8
0
 public SearchController(IUserContentAppService userContentAppService)
 {
     this.userContentAppService = userContentAppService;
 }