/// <inheritdoc /> public IOUploadFileWebRequestSettings(IOSettings settings) : base(settings) { if (settings is not IOUploadFileWebRequestSettings ioUploadFileWebRequestSettings) { return; } Method = ioUploadFileWebRequestSettings.Method; }
/// <inheritdoc /> public IOReadSettings([NotNull] IOSettings settings) : base(settings) { if (settings is not IIOOnRead iioOnRead) { throw new InvalidOperationException(nameof(settings) + " must implement IIOOnRead interface."); } OnRead = iioOnRead.OnRead; }
public IOSettings(IOSettings settings) { if (settings == null) { return; } BufferSize = settings.BufferSize; Encoding = settings.Encoding; }
/// <inheritdoc /> public IOFTPRequestSettings(IOSettings settings) : base(settings) { if (settings is not IOFTPRequestSettings ioftpRequestSettings) { return; } Method = ioftpRequestSettings.Method; }
/// <inheritdoc /> public IORequestSettings(IOSettings settings) : base(settings) { if (settings is not IORequestSettings iioRequestSettings) { return; } Timeout = iioRequestSettings.Timeout; Credentials = iioRequestSettings.Credentials; }
/// <inheritdoc /> public IODownloadFileWebRequestSettings(IOSettings settings) : base(settings) { if (settings is not IODownloadFileWebRequestSettings ioDownloadFileWebRequestSettings) { return; } Method = ioDownloadFileWebRequestSettings.Method; Overwrite = ioDownloadFileWebRequestSettings.Overwrite; }
/// <inheritdoc /> public IOResponseSettings(IOSettings settings) : base(settings) { if (settings is IIOOnResponseReceived responseReceived) { OnResponseReceived = responseReceived.OnResponseReceived; } if (settings is IOResponseSettings responseSettings) { Retries = responseSettings.Retries; } }
/// <inheritdoc /> public IOHttpRequestSettings(IOSettings settings) : base(settings) { if (settings is not IOHttpRequestSettings ioHttpRequestSettings) { return; } Method = ioHttpRequestSettings.Method; AllowAutoRedirect = ioHttpRequestSettings.AllowAutoRedirect; AllowWriteStreamBuffering = ioHttpRequestSettings.AllowWriteStreamBuffering; Accept = ioHttpRequestSettings.Accept; }
/// <inheritdoc /> public IOFileWebRequestSettings(IOSettings settings) : base(settings) { switch (settings) { case IOFileWebRequestSettings ioFileWebRequestSettings: Progress = ioFileWebRequestSettings.Progress; break; case IOHttpFileWebRequestSettings ioHttpFileWebRequestSettings: Progress = ioHttpFileWebRequestSettings.Progress; break; } }
/// <inheritdoc /> public IOReadSettings(IOSettings settings, [NotNull] Func <char[], int, bool> onRead) : base(settings) { OnRead = onRead; }