/// <inheritdoc /> public override async Task InitializeAsync(CancellationToken cancellationToken) { if (_socketClient.IsClosed) { throw ThrowHelper.Protocol_CannotInitializeOnClosedSocket(); } await _sender .CommitAsync( x => x.WriteInitializeMessage(), cancellationToken) .ConfigureAwait(false); _receiver.Start(); }
public void StartExporter(MessagePipeline exporter) { if (Exporter == null || Exporter.Failed) { Exporter = exporter; OnExportStarted(); try { exporter.Start(); } catch (Exception ex) { Logger.Error("Failed to start exporter", ex); } } }
public void StartExporter(MessagePipeline exporter) { if (_exporter == null || _exporter.Failed) { _exporter = exporter; _exporter.SucceededMail += ExporterOnSucceededMail; _exporter.StateChanged += (sender, args) => OnPropertyChanged("ProgressText"); try { exporter.Start(); } catch (Exception ex) { Logger.Error("Failed to start exporter", ex); } } }
/// <inheritdoc /> public override async Task InitializeAsync(CancellationToken cancellationToken) { if (_socketClient.IsClosed) { throw ThrowHelper.Protocol_CannotInitializeOnClosedSocket(); } object?payload = await _socketClient .ConnectionInterceptor .CreateConnectionInitPayload(this, cancellationToken); await _sender .CommitAsync(x => x.WriteInitializeMessage(payload), cancellationToken) .ConfigureAwait(false); _receiver.Start(); }