public Authenticator(IConnection connection, OmniSecureConnectionType type, OmniDigitalSignature?digitalSignature, IBytesPool bytesPool) { _connection = connection; _type = type; _digitalSignature = digitalSignature; _bytesPool = bytesPool; }
public SecureConnection(IConnection connection, OmniSecureConnectionOptions options) { _connection = connection ?? throw new ArgumentNullException(nameof(connection)); if (options == null) { throw new ArgumentNullException(nameof(options)); } if (!EnumHelper.IsValid(options.Type)) { throw new ArgumentException(nameof(options.Type)); } _type = options.Type; _passwords = options.Passwords ?? Array.Empty <string>(); _bytesPool = options.BufferPool ?? BytesPool.Shared; }
public OmniSecureConnection(IConnection connection, OmniSecureConnectionOptions options) { if (connection == null) { throw new ArgumentNullException(nameof(connection)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } if (!EnumHelper.IsValid(options.Type)) { throw new ArgumentException(nameof(options.Type)); } _connection = connection; _type = options.Type; _passwords = new ReadOnlyCollection <string>(options.Passwords ?? Array.Empty <string>()); _bufferPool = options.BufferPool ?? BufferPool.Shared; }