Пример #1
0
        public IFileReaderBuilder UseAuthorization(RoleBasedAuthorization authorization)
        {
            if (_fileReader == null)
            {
                InitFileReader(FileType.Text);
            }

            _fileReader = new SecuredFileReader(_fileReader, authorization);
            return(this);
        }
Пример #2
0
 public SecuredFileReader(FileReader fileReader,
                          RoleBasedAuthorization roleBasedAuthorization)
     : base(fileReader)
 {
     _roleBasedAuthorization = roleBasedAuthorization;
 }
Пример #3
0
 public void SetAuthorization(RoleBasedAuthorization roleBasedAuthorization)
 {
     _roleBasedAuthorization = roleBasedAuthorization;
 }