using System;
using System.Text;
using Renci.SshNet.Common;
using Renci.SshNet.Sftp;
namespace Renci.SshNet
{
///
/// Basic factory for creating new services.
///
internal partial class ServiceFactory : IServiceFactory
{
///
/// Creates a new with the specified .
///
/// The to use for creating a new session.
///
/// An for the specified .
///
/// is null.
public ISession CreateSession(ConnectionInfo connectionInfo)
{
return new Session(connectionInfo);
}
///
/// Creates a new in a given and with
/// the specified operation timeout and encoding.
///
/// The to create the in.
/// The operation timeout.
/// The encoding.
///
/// An .
///
public ISftpSession CreateSftpSession(ISession session, TimeSpan operationTimeout, Encoding encoding)
{
return new SftpSession(session, operationTimeout, encoding);
}
///
/// Create a new .
///
///
/// A .
///
public PipeStream CreatePipeStream()
{
return new PipeStream();
}
}
}