Esempio n. 1
0
 public ApplicationUserService(ApplicationDbContext dbContext, ICdnService cdnService, ISignInManager signInManager, IEmailSender emailSender, IConfiguration configuration, ITokenHelper tokenHelper, IUrlUtility urlUtility, IUserManager userManager)
 {
     this.dbContext     = dbContext;
     this.cdnService    = cdnService;
     this.signInManager = signInManager;
     this.emailSender   = emailSender;
     this.configuration = configuration;
     this.tokenHelper   = tokenHelper;
     this.urlUtility    = urlUtility;
     this.userManager   = userManager;
 }
        public HomeController(IUrlUtility utility, IStopWordsProvider provider, ISEOAnalyser textAnalyser, ISEOAnalyser bodyAnalyser, ISEOAnalyser metaAnalyser, ISEOAnalyser linkAnalyser)
        {
            Utility = utility;

            Provider      = provider;
            Provider.Path = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["StopWordsFileLocation"]);

            TextAnalyser = textAnalyser;
            BodyAnalyser = bodyAnalyser;
            MetaAnalyser = metaAnalyser;
            LinkAnalyser = linkAnalyser;

            TextAnalyser.Provider = BodyAnalyser.Provider = MetaAnalyser.Provider = provider;
        }
Esempio n. 3
0
        private static HomeController GetHomeController(IUrlUtility utility)
        {
            var provider = new StopWordsProvider();

            var controller = new HomeController(
                utility,
                provider,
                new TextAnalyser(),
                new HtmlBodyAnalyser(),
                new HtmlMetaAnalyser(),
                new HtmlAnchorAnalyser()
                );

            provider.Path = Path.Combine(Environment.CurrentDirectory, ConfigurationManager.AppSettings["StopWordsFileLocation"]);

            return(controller);
        }