public async Task SendMessage(CancellationToken cancellationToken) { if (!ReferenceDataHubUserHandler.AnyConnectionIds(ReferenceDataTypes.OnsPostcodes)) { return; } var stateModel = await _referenceDataService.GetSubmissionsPerCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.OnsPostcodes, ReportTypes.OnsPostcodesReportName, cancellationToken : cancellationToken); var state = _serialisationHelperService.SerialiseToCamelCase(stateModel); await _hubContext.Clients.All.SendAsync("ReceiveMessage", state, cancellationToken); }
public async Task SendMessage(CancellationToken cancellationToken) { if (!ReferenceDataHubUserHandler.AnyConnectionIds(ReferenceDataTypes.FisReferenceData2021)) { return; } var stateModel = await _referenceDataService.GetProcessOutputsForCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.DevolvedPostcodesPublication, ReportTypes.DevolvedPostcodesPublicationSummaryReportName, FileNameExtensionConsts.CSV, ReferenceDataOutputTypes.DevolvedPostcodesPublicationZipPreFix, FileNameExtensionConsts.ZIP, cancellationToken : cancellationToken); var state = _serialisationHelperService.SerialiseToCamelCase(stateModel); await _hubContext.Clients.All.SendAsync("ReceiveMessage", state, cancellationToken); }
public async Task SendMessage(CancellationToken cancellationToken) { if (!ReferenceDataHubUserHandler.AnyConnectionIds(ReferenceDataTypes.DevolvedPostcodes)) { return; } var collection = (await _referenceDataService.GetSubmissionsPerCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.DevolvedPostcodesFullName, ReportTypes.DevolvedPostcodesFullNameReportName, cancellationToken: cancellationToken)).Files.ToList(); collection.AddRange((await _referenceDataService.GetSubmissionsPerCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.DevolvedPostcodesSof, ReportTypes.DevolvedPostcodesSofReportName, cancellationToken: cancellationToken)).Files.ToList()); collection.AddRange((await _referenceDataService.GetSubmissionsPerCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.DevolvedPostcodesLocalAuthority, ReportTypes.DevolvedPostcodesLocalAuthorityReportName, cancellationToken: cancellationToken)).Files.ToList()); collection.AddRange((await _referenceDataService.GetSubmissionsPerCollectionAsync( Constants.ReferenceDataStorageContainerName, CollectionNames.DevolvedPostcodesOnsOverride, ReportTypes.DevolvedPostcodesOnsOverride, cancellationToken: cancellationToken)).Files.ToList()); var model = new ReferenceDataViewModel() { Files = collection }; var state = _serialisationHelperService.SerialiseToCamelCase(model); await _hubContext.Clients.All.SendAsync("ReceiveMessage", state, cancellationToken); }