예제 #1
0
 /// <inheritdoc />
 public IOUploadFileWebRequestSettings(IOSettings settings)
     : base(settings)
 {
     if (settings is not IOUploadFileWebRequestSettings ioUploadFileWebRequestSettings)
     {
         return;
     }
     Method = ioUploadFileWebRequestSettings.Method;
 }
예제 #2
0
 /// <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;
 }
예제 #3
0
 public IOSettings(IOSettings settings)
 {
     if (settings == null)
     {
         return;
     }
     BufferSize = settings.BufferSize;
     Encoding   = settings.Encoding;
 }
예제 #4
0
 /// <inheritdoc />
 public IOFTPRequestSettings(IOSettings settings)
     : base(settings)
 {
     if (settings is not IOFTPRequestSettings ioftpRequestSettings)
     {
         return;
     }
     Method = ioftpRequestSettings.Method;
 }
예제 #5
0
 /// <inheritdoc />
 public IORequestSettings(IOSettings settings)
     : base(settings)
 {
     if (settings is not IORequestSettings iioRequestSettings)
     {
         return;
     }
     Timeout     = iioRequestSettings.Timeout;
     Credentials = iioRequestSettings.Credentials;
 }
예제 #6
0
 /// <inheritdoc />
 public IODownloadFileWebRequestSettings(IOSettings settings)
     : base(settings)
 {
     if (settings is not IODownloadFileWebRequestSettings ioDownloadFileWebRequestSettings)
     {
         return;
     }
     Method    = ioDownloadFileWebRequestSettings.Method;
     Overwrite = ioDownloadFileWebRequestSettings.Overwrite;
 }
예제 #7
0
 /// <inheritdoc />
 public IOResponseSettings(IOSettings settings)
     : base(settings)
 {
     if (settings is IIOOnResponseReceived responseReceived)
     {
         OnResponseReceived = responseReceived.OnResponseReceived;
     }
     if (settings is IOResponseSettings responseSettings)
     {
         Retries = responseSettings.Retries;
     }
 }
예제 #8
0
 /// <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;
            }
        }
예제 #10
0
 /// <inheritdoc />
 public IOReadSettings(IOSettings settings, [NotNull] Func <char[], int, bool> onRead)
     : base(settings)
 {
     OnRead = onRead;
 }