Exemplo n.º 1
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ApplicationDbContext applicationDbContext,
     IFloorContext argFloorContext)
 {
     _userManager          = userManager;
     _signInManager        = signInManager;
     _applicationDbContext = applicationDbContext;
     _floorContext         = argFloorContext;
 }
Exemplo n.º 2
0
        public DataReceiverController(
            UserManager <ApplicationUser> argUserManager,
            ILogger <DataReceiverController> argLogger,
            IConnectionManager argConnectionManager,
            IFloorContext argSiteContext)
        {
            // check if the Datapoint is already in the database
            _userManager = argUserManager;
            _logger      = argLogger;

            // SignalR3
            _machineStateHubContext = (argConnectionManager.GetHubContext <BuildingControlHub>());

            ////SignalR2
            //_machineStateHubContext = GlobalHost.ConnectionManager.GetHubContext<MachineStateHub>();

            _siteContext = argSiteContext;
        }
Exemplo n.º 3
0
 // The following code creates the database and schema if they don't exist.
 // This is a temporary workaround since deploying database through EF migrations is
 // not yet supported in this release.
 // Please see this http://go.microsoft.com/fwlink/?LinkID=615859 for more information on how to do deploy the database
 // when publishing your application.
 private static void EnsureDatabaseCreated(ApplicationDbContext argAppDBContext, IFloorContext argFloorContext)
 {
     if (!_databaseChecked)
     {
         _databaseChecked = true;
         argAppDBContext.Database.Migrate();
         // FloorContext and MachineStateContext...
         argFloorContext.Database.Migrate();
     }
 }
 public BuildingControlHub(ILogger <DataReceiverController> argLogger, IFloorContext argFloorContext)
 {
     _logger = argLogger;
     _logger.LogInformation("Instance of BuildingControlHub created...");
     _floorContext = argFloorContext;
 }