| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections.Generic;
- using Renci.SshNet.Sftp.Responses;
- namespace Renci.SshNet.Tests.Classes.Sftp
- {
- internal class SftpVersionResponseBuilder
- {
- private uint _version;
- private readonly IDictionary<string, string> _extensions;
- public SftpVersionResponseBuilder()
- {
- _extensions = new Dictionary<string, string>();
- }
- public SftpVersionResponseBuilder WithVersion(uint version)
- {
- _version = version;
- return this;
- }
- public SftpVersionResponseBuilder WithExtension(string name, string data)
- {
- _extensions.Add(name, data);
- return this;
- }
- public SftpVersionResponse Build()
- {
- var sftpVersionResponse = new SftpVersionResponse()
- {
- Version = _version,
- Extentions = _extensions
- };
- return sftpVersionResponse;
- }
- }
- }
|