/// <summary>
 /// Initializes a new instance of the <see cref="FactsListFormatter"/> class.
 /// </summary>
 /// <param name="user">The user to create this formatter for</param>
 /// <param name="enumerator">The enumerator for the directory listing to format</param>
 /// <param name="activeFacts">The active facts to return for the entries</param>
 /// <param name="absoluteName">Returns an absolute entry name</param>
 public FactsListFormatter(FtpUser user, DirectoryListingEnumerator enumerator, ISet<string> activeFacts, bool absoluteName)
 {
     _user = user;
     _enumerator = enumerator;
     _activeFacts = activeFacts;
     _absoluteName = absoluteName;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FactsListFormatter"/> class.
 /// </summary>
 /// <param name="user">The user to create this formatter for</param>
 /// <param name="fileSystem">The file system where the file system entries are from</param>
 /// <param name="pathEntries">The current path</param>
 /// <param name="activeFacts">The active facts to return for the entries</param>
 public FactsListFormatter(FtpUser user, IUnixFileSystem fileSystem, Stack<IUnixDirectoryEntry> pathEntries, ISet<string> activeFacts)
 {
     _user = user;
     _fileSystem = fileSystem;
     _pathEntries = pathEntries;
     _activeFacts = activeFacts;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberValidationResult"/> class.
 /// </summary>
 /// <param name="status">The success status for the validation</param>
 /// <param name="user">The validated user</param>
 public MemberValidationResult(MemberValidationStatus status, FtpUser user)
 {
     if (user == null)
         throw new ArgumentNullException(nameof(user));
     if (status != MemberValidationStatus.Anonymous && status != MemberValidationStatus.AuthenticatedUser)
         throw new ArgumentOutOfRangeException(nameof(status), "User object must only be specified when validation was successful.");
     Status = status;
     _user = user;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberValidationResult"/> class.
 /// </summary>
 /// <param name="status">The success status for the validation</param>
 /// <param name="user">The validated user</param>
 public MemberValidationResult(MemberValidationStatus status, FtpUser user)
 {
     if (user == null)
     {
         throw new ArgumentNullException(nameof(user));
     }
     if (status != MemberValidationStatus.Anonymous && status != MemberValidationStatus.AuthenticatedUser)
     {
         throw new ArgumentOutOfRangeException(nameof(status), "User object must only be specified when validation was successful.");
     }
     Status = status;
     _user  = user;
 }