public void Initialize() { Terminated = false; _gpsQueue = new BlobQueue("gpsmessages", blobConnectionString, this, this); _gpsQueue.Initialize(); _iotHubReceiver = new Receiver(hubConnectionString, this); _iotHubReceiver.Initialize(this); BlobTable <SmartDevice> .Initialize(blobConnectionString); _gpsDevices = BlobTable <SmartDevice> .GetAllItems(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); string connString = ConfigurationManager.AppSettings["BlobStorageConnectionString"]; BlobTable <Parameter> .Initialize(connString); BlobTable <Account> .Initialize(connString); BlobTable <SmartDevice> .Initialize(connString); BlobTable <Setting> .Initialize(connString); BlobTable <UserGroup> .Initialize(connString); BlobTable <User> .Initialize(connString); BlobTable <Alarm> .Initialize(connString); BlobContent.Initialize(connString, this); string pushConnString = ConfigurationManager.AppSettings["PushHubConnectionString"]; string hubname = ConfigurationManager.AppSettings["PushHubName"]; PushManager.Start(hubname, pushConnString); //SmartMonitorDataManager<Parameter>.Initialize("Parameters"); //SmartMonitorDataManager<Account>.Initialize("Account"); //SmartMonitorDataManager<SmartDevice>.Initialize("SmartDevices"); //SmartMonitorDataManager<Setting>.Initialize("Settings"); //SmartMonitorDataManager<UserGroup>.Initialize("UserGroups"); //SmartMonitorDataManager<User>.Initialize("Users"); //PushNotificationManager.Instance.Initialize(); //AzureActiveDirectoryManager.Instance.Initialize(); //IoTHubEventManager.Instance.Initialize(); }