-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from ARKlab/feature/AddEncodingToArxOneFtpClient
Add nullable FtpClientParameters to FtpConfig
- Loading branch information
Showing
5 changed files
with
46 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
// Copyright (c) 2023 Ark Energy S.r.l. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE file for license information. | ||
using Ark.Tools.FtpClient.Core; | ||
|
||
using ArxOne.Ftp; | ||
|
||
using EnsureThat; | ||
using System; | ||
using System.Net; | ||
using System.Text; | ||
|
||
namespace Ark.Tools.FtpClient | ||
{ | ||
public class FtpClientPoolArxOneFactory : IFtpClientPoolFactory | ||
{ | ||
private readonly Action<FtpClientParameters>? _configurer; | ||
|
||
public FtpClientPoolArxOneFactory(Action<FtpClientParameters>? configurer = null) | ||
{ | ||
_configurer = configurer; | ||
} | ||
|
||
public IFtpClientPool Create(int maxPoolSize, FtpConfig ftpConfig) | ||
{ | ||
EnsureArg.IsNotNull(ftpConfig); | ||
EnsureArg.IsNotNull(ftpConfig.Uri); | ||
EnsureArg.IsNotNull(ftpConfig.Credentials); | ||
|
||
return new FtpClientPoolArxOne(maxPoolSize, ftpConfig); | ||
return new FtpClientPoolArxOne(maxPoolSize, ftpConfig, _configurer); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters