-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
IFtpDataConnectionValidator.cs
32 lines (29 loc) · 1.29 KB
/
IFtpDataConnectionValidator.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// <copyright file="IFtpDataConnectionValidator.cs" company="Fubar Development Junker">
// Copyright (c) Fubar Development Junker. All rights reserved.
// </copyright>
using System.ComponentModel.DataAnnotations;
using System.Threading;
using System.Threading.Tasks;
using FubarDev.FtpServer.Features;
namespace FubarDev.FtpServer.DataConnection
{
/// <summary>
/// Interface for FTP data connection validation.
/// </summary>
public interface IFtpDataConnectionValidator
{
/// <summary>
/// Checks if the FTP data connection is valid.
/// </summary>
/// <param name="connection">The FTP connection that created the data connection.</param>
/// <param name="dataConnectionFeature">The FTP data connection feature that crated the data connection.</param>
/// <param name="dataConnection">The created data connection that needs to be validated.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The task returning the validation result.</returns>
Task<ValidationResult?> ValidateAsync(
IFtpConnection connection,
IFtpDataConnectionFeature dataConnectionFeature,
IFtpDataConnection dataConnection,
CancellationToken cancellationToken);
}
}