public NotificationHubConnectionSettings() { string accessSignature = Environment.GetEnvironmentVariable("DefaultFullSharedAccessSignature"); string hubName = Environment.GetEnvironmentVariable("NotificationHubName"); Hub = new NotificationHubClient(accessSignature, hubName); }
/// <summary> /// Builds this instance for specified executor type. /// </summary> /// <typeparam name="TExecutor">The type of the executor.</typeparam> public static TExecutor Build <TExecutor>( ILoggerFactory logger, IConfigurationStore configStore, IServiceExceptionHandler serviceExceptionHandler, string customerUid = null, string userId = null, string userEmailAddress = null, IHeaderDictionary headers = null, IProductivity3dV1ProxyCoord productivity3dV1ProxyCoord = null, IProductivity3dV2ProxyCompaction productivity3dV2ProxyCompaction = null, ITransferProxyFactory persistantTransferProxyFactory = null, IFilterServiceProxy filterServiceProxy = null, ITRexImportFileProxy tRexImportFileProxy = null, IProjectRepository projectRepo = null, IHttpContextAccessor httpContextAccessor = null, IDataOceanClient dataOceanClient = null, ITPaaSApplicationAuthentication authn = null, ISchedulerProxy schedulerProxy = null, IPegasusClient pegasusClient = null, ICwsProjectClient cwsProjectClient = null, ICwsDeviceClient cwsDeviceClient = null, ICwsProfileSettingsClient cwsProfileSettingsClient = null, IWebRequest gracefulClient = null, INotificationHubClient notificationHubClient = null ) where TExecutor : RequestExecutorContainer, new() { ILogger log = null; if (logger != null) { log = logger.CreateLogger <RequestExecutorContainer>(); } var executor = new TExecutor(); executor.Initialise( log, configStore, serviceExceptionHandler, customerUid, userId, userEmailAddress, headers, productivity3dV1ProxyCoord, productivity3dV2ProxyCompaction, persistantTransferProxyFactory, filterServiceProxy, tRexImportFileProxy, projectRepo, httpContextAccessor, dataOceanClient, authn, schedulerProxy, pegasusClient, cwsProjectClient, cwsDeviceClient, cwsProfileSettingsClient, gracefulClient, notificationHubClient ); return(executor); }
public TileGenerationJob(IConfigurationStore configurationStore, IPegasusClient pegasusClient, ITPaaSApplicationAuthentication authn, INotificationHubClient notificationHubClient, ILoggerFactory logger) { configStore = configurationStore; this.pegasusClient = pegasusClient; authentication = authn; this.notificationHubClient = notificationHubClient; log = logger.CreateLogger <DxfTileGenerationJob>(); }
public SendAlert(IWatchService watchService, IAlarmService alarmService, IMachineService machineService, IAlarmLogService alarmLogService, INotificationHubConnectionSettings hub) { _hub = hub.Hub; _watchService = watchService; _alarmService = alarmService; _machineService = machineService; _alarmLogService = alarmLogService; }
public async Task <FilterDescriptorSingleResult> PutFilter( //[FromServices] IGeofenceProxy geofenceProxy, [FromServices] IFileImportProxy fileImportProxy, [FromServices] INotificationHubClient notificationHubClient, string projectUid, [FromBody] FilterRequest request) { Log.LogInformation($"{nameof(PutFilter)}: CustomerUID={CustomerUid} FilterRequest: {JsonConvert.SerializeObject(request)}"); var filterExecutor = RequestExecutorContainer.Build <UpsertFilterExecutor>(ConfigStore, Logger, ServiceExceptionHandler, filterRepo, geofenceRepository, ProjectProxy, productivity3dV2ProxyNotification: Productivity3dV2ProxyNotification, productivity3dV2ProxyCompaction: Productivity3dV2ProxyCompaction, fileImportProxy: fileImportProxy /*, geofenceProxy: geofenceProxy */); var upsertFilterResult = await UpsertFilter(filterExecutor, await GetProject(projectUid), request); if (upsertFilterResult.FilterDescriptor.FilterType == FilterType.Persistent) { await notificationHubClient.Notify(new ProjectChangedNotification(Guid.Parse(projectUid))); } return(upsertFilterResult); }
public void Initialise(ILogger logger, IConfigurationStore configStore, IServiceExceptionHandler serviceExceptionHandler, string customerUid, string userId = null, string userEmailAddress = null, IHeaderDictionary headers = null, IProductivity3dV1ProxyCoord productivity3dV1ProxyCoord = null, IProductivity3dV2ProxyCompaction productivity3dV2ProxyCompaction = null, ITransferProxyFactory persistantTransferProxyFactory = null, IFilterServiceProxy filterServiceProxy = null, ITRexImportFileProxy tRexImportFileProxy = null, IProjectRepository projectRepo = null, IHttpContextAccessor httpContextAccessor = null, IDataOceanClient dataOceanClient = null, ITPaaSApplicationAuthentication authn = null, ISchedulerProxy schedulerProxy = null, IPegasusClient pegasusClient = null, ICwsProjectClient cwsProjectClient = null, ICwsDeviceClient cwsDeviceClient = null, ICwsProfileSettingsClient cwsProfileSettingsClient = null, IWebRequest gracefulClient = null, INotificationHubClient notificationHubClient = null) { log = logger; this.configStore = configStore; this.serviceExceptionHandler = serviceExceptionHandler; this.customerUid = customerUid; this.userId = userId; this.userEmailAddress = userEmailAddress; this.customHeaders = headers; this.productivity3dV1ProxyCoord = productivity3dV1ProxyCoord; this.productivity3dV2ProxyCompaction = productivity3dV2ProxyCompaction; this.persistantTransferProxyFactory = persistantTransferProxyFactory; this.filterServiceProxy = filterServiceProxy; this.tRexImportFileProxy = tRexImportFileProxy; this.projectRepo = projectRepo; this.httpContextAccessor = httpContextAccessor; this.dataOceanClient = dataOceanClient; this.authn = authn; this.schedulerProxy = schedulerProxy; this.pegasusClient = pegasusClient; this.cwsProjectClient = cwsProjectClient; this.cwsDeviceClient = cwsDeviceClient; this.cwsProfileSettingsClient = cwsProfileSettingsClient; this.gracefulClient = gracefulClient; this.notificationHubClient = notificationHubClient; }
public NotificationController(ILogger <NotificationController> logger, INotificationHubClient notificationHubClient) { _logger = logger; _notificationHubClient = notificationHubClient; }
public NotificationController(INotificationHubClient hubContext) { _hubContext = hubContext; }
public RedundantNotificationHubClient(string primaryConnectionString, string backupConnectionString, string hubName) { _primaryNotificationHubClient = NotificationHubClient.CreateClientFromConnectionString(primaryConnectionString, hubName); _backupNotificationHubClient = NotificationHubClient.CreateClientFromConnectionString(backupConnectionString, hubName); }
public AndroidNotifyer(ILogger <AndroidNotifyer> logger, INotificationHubClient hub) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.hub = hub; }
public GeoTiffTileGenerationJob(IConfigurationStore configurationStore, IPegasusClient pegasusClient, ITPaaSApplicationAuthentication authn, INotificationHubClient notificationHubClient, ILoggerFactory logger) : base(configurationStore, pegasusClient, authn, notificationHubClient, logger) { }