/// <summary> /// Fluent step final - Use configured reader to read file /// </summary> /// <param name="path"></param> /// <returns></returns> IReaderResult IInitializedAndSecurizedReader.ReadFile(string path) { var accessGranted = true; if (_accessManager != null) { accessGranted = _accessManager.CanAccess(path, _identity); } if (!accessGranted) { return(new ReaderResult(false, string.Empty)); } var fileContent = File.ReadAllText(path); if (_encryptor != null) { fileContent = _encryptor.Decrypt(fileContent); } var contentRead = _textReader.Read(fileContent); return(new ReaderResult(true, contentRead)); }