public PurchasingRepositery(ApplicationDbContext _context, IHostingEnvironment hostingEnvironment, UserManager <ApplicationUser> userManager, IHubContext <NotificationHub> hubContext) { context = _context; util = new utilities(context, hostingEnvironment); UserManager = userManager; _hubContext = hubContext; }
public HomeController(IModelRepositery imodelRepositery, IHubContext <NotificationHub> _hubContext, IHostingEnvironment hostingEnvironment, UserManager <ApplicationUser> usermanager, IHomeRepoitery _homeRepoitery, ApplicationDbContext myApp) { iModelRepositery = imodelRepositery; homeRepoitery = _homeRepoitery; Usermanager = usermanager; util = new utilities(myApp, hostingEnvironment); this._hubContext = _hubContext; }
// It is the CreateProtector() method of IDataProtectionProvider interface // that creates an instance of IDataProtector. CreateProtector() requires // a purpose string. So both IDataProtectionProvider and the class that // contains our purpose strings are injected using the contructor public OrderController(IorderRepositery IorderRepository, ApplicationDbContext context, IHostingEnvironment hosting, UserManager <ApplicationUser> _userManager, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender, IDataProtectionProvider dataProtectionProvider, DataProctectionPurposeString dataProtectionPurposeStrings) { iOrderRepositery = IorderRepository; userManager = _userManager; util = new utilities(context, hosting); _emailSender = emailSender; this.protector = dataProtectionProvider.CreateProtector( dataProtectionPurposeStrings.OrderId); }
public OrderRepositery(ApplicationDbContext _context, IHostingEnvironment hostingEnvironment, UserManager <ApplicationUser> userManager, IHubContext <NotificationHub> _hubContext, IDataProtectionProvider dataProtectionProvider, DataProctectionPurposeString dataProtectionPurposeStrings, ILogger <OrderRepositery> _logger) { context = _context; util = new utilities(context, hostingEnvironment); Usermanager = userManager; this._hubContext = _hubContext; this.protector = dataProtectionProvider.CreateProtector( dataProtectionPurposeStrings.OrderId); logger = _logger; }
public AdministrationController(RoleManager <IdentityRole> rolemanager, UserManager <ApplicationUser> usermanager, SignInManager <ApplicationUser> signinmanager, IHostingEnvironment hostingEnvironment, ApplicationDbContext db, IConfiguration configuration, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender, IHubContext <NotificationHub> _hubContext) { Rolemanager = rolemanager; Usermanager = usermanager; Signinmanager = signinmanager; this.hostingEnvironment = hostingEnvironment; hubContext = _hubContext; _emailSender = emailSender; util = new utilities(db, hostingEnvironment, configuration); }
public AccountController(UserManager <ApplicationUser> usermanager, SignInManager <ApplicationUser> signinmanager, RoleManager <IdentityRole> roleManager, Microsoft.AspNetCore.Identity.UI.Services.IEmailSender emailSender, IConfiguration configuration, ApplicationDbContext _context, IHostingEnvironment hostingEnvironment, IHubContext <NotificationHub> _hubContext) { Usermanager = usermanager; Signinmanager = signinmanager; Rolemanager = roleManager; _emailSender = emailSender; Configuration = configuration; this.hostingEnvironment = hostingEnvironment; util = new utilities(_context, hostingEnvironment, configuration); hubContext = _hubContext; }
public HttpResponseMessage IsExcelExported() { string DestinationPath = ""; try { if (ExportdataSet != null) { utilities utilities = new utilities(); utilities.ExportExcel(ExportdataSet, out DestinationPath); } return(getGenetatedExcel(DestinationPath)); } catch (Exception ex) { throw ex; } }
public ModelRepositery(ApplicationDbContext _context, IHostingEnvironment hostingEnvironment) { context = _context; this.hostingEnvironment = hostingEnvironment; util = new utilities(context, hostingEnvironment); }
public StockRepositery(ApplicationDbContext _context) { context = _context; util = new utilities(context); }
public MainWindow() { InitializeComponent(); AppWindow = this; util = utilities.GetInstance(); }
private void Form1_Load(object sender, EventArgs e) { addToLog("Loading..."); menuStrip1.Visible = true; dualmon.Checked = desktops[0].Length > 1; timer.Tick += new EventHandler(timer_Tick); trayicon.Icon = this.Icon; denombox.SelectedIndex = 1; Utilities = new utilities("DesktopSwitcher"); getSettings(); log.Capacity = 50; if (progfilter == null) progfilter = ""; if (startmintool.Checked) this.WindowState = FormWindowState.Minimized; if (useParse = alwaysparse.Checked) parseParse(); else { autoparse.Checked = false; getdirpics(); } if (autoparse.Checked) parsepics(false); getscreens(); if (autostart.Checked) start_timer(); Microsoft.Win32.SystemEvents.DisplaySettingsChanged += new System.EventHandler(displaySettingsChanged); stat = new stats(dirtb.Text); inputfrm = new InputForm(this); //dir = new directory(dirtb.Text); //lastpic = dir.getpic(0); if(update.Checked) checkForUpdate(); addToLog("Loaded"); }
public StoreController(IStoreRepositery _storeRepositery, ApplicationDbContext _context, IHostingEnvironment hostingEnvironment, UserManager <ApplicationUser> usermanager) { storeRepositery = _storeRepositery; util = new utilities(_context, hostingEnvironment); Usermanager = usermanager; }
public PurchasingController(IPurchasingRepositery IPurchasingRepositery, ApplicationDbContext context, UserManager <ApplicationUser> _userManager) { iPurchasingRepositery = IPurchasingRepositery; util = new utilities(context); userManager = _userManager; }
public NotificationHub(UserManager <ApplicationUser> userManager, ApplicationDbContext context) { UserManager = userManager; util = new utilities(context); }
public QuantityController(IStockRepositery _stockRepositery, UserManager <ApplicationUser> userManager, ApplicationDbContext _context) { stockRepositery = _stockRepositery; Usermanager = userManager; util = new utilities(_context); }
public StoreRepositery(ApplicationDbContext _context, IHostingEnvironment hostingEnvironment) { context = _context; util = new utilities(_context, hostingEnvironment); }
public ActionResult Index(string siteToParse) { ViewBag.Message = ""; ViewBag.topTenWords = ""; ViewBag.nameOfWebsite = ""; ViewBag.totalWordCount = ""; utilities util = new utilities(); List <htmlImageViewModels> listOfImages = new List <htmlImageViewModels>(); // Download string. var userAgent = Request.UserAgent; //string HTMLString = "https://www.nytimes.com"; string HTMLString = siteToParse; var value = util.getHTMLContent(HTMLString, userAgent); if (value.Count() > 0) { // Write values. string imgPattern = @"<img.+?src=[""'](.+?)[""'].*?>"; string picturePattern = @"<source.+?srcset=[""'](.+?)[""'].*?>"; Regex imgReg = new Regex(imgPattern); Regex picReg = new Regex(picturePattern); MatchCollection imgMatches = imgReg.Matches(value); MatchCollection picMatches = picReg.Matches(value); foreach (Match match in imgMatches) { htmlImageViewModels vImage = new htmlImageViewModels(); vImage.imageSource = match.Groups[1].Value; listOfImages.Add(vImage); } foreach (Match match in picMatches) { htmlImageViewModels vImage = new htmlImageViewModels(); vImage.imageSource = match.Groups[1].Value; listOfImages.Add(vImage); } string remainderText = util.stripHTML(value); int totalCountofWords = util.countWords(remainderText); IEnumerable <htmlWordCoundViewModels> orderedWords = Regex.Split(remainderText.ToLower(), @"\W+").GroupBy(s => s).Select(term => new htmlWordCoundViewModels { popularWord = term.Key, totalPageWordCount = totalCountofWords, wordCount = term.Count() }).OrderByDescending(g => g.wordCount).Take(10); var popularTerms = orderedWords; ViewBag.topTenWords = orderedWords; ViewBag.nameOfWebsite = siteToParse; ViewBag.totalWordCount = totalCountofWords; } else { ViewBag.Message = "Whoops! Seems like we aren't able to find this webpage right now. Please verify what you entered is accurate."; } ViewData.Model = listOfImages; return(View()); }
public VendorController(IVendorRepositery IVendorRepositery, ApplicationDbContext context, IHostingEnvironment hosting) { iVendorRepositery = IVendorRepositery; util = new utilities(context, hosting); }
public CustomerController(ICustomerRepositery ICustomerRepositery, ApplicationDbContext _context, IHostingEnvironment hostingEnvironment, UserManager <ApplicationUser> usermanager) { iCustomerRepositery = ICustomerRepositery; userManager = usermanager; util = new utilities(_context, hostingEnvironment); }
public CompanyModelController(IModelRepositery imodelRepositery, ApplicationDbContext context, IHostingEnvironment hosting) { iModelRepositery = imodelRepositery; util = new utilities(context, hosting); }