public IFileReaderBuilder UseAuthorization(RoleBasedAuthorization authorization) { if (_fileReader == null) { InitFileReader(FileType.Text); } _fileReader = new SecuredFileReader(_fileReader, authorization); return(this); }
public SecuredFileReader(FileReader fileReader, RoleBasedAuthorization roleBasedAuthorization) : base(fileReader) { _roleBasedAuthorization = roleBasedAuthorization; }
public void SetAuthorization(RoleBasedAuthorization roleBasedAuthorization) { _roleBasedAuthorization = roleBasedAuthorization; }