public IFileInfo[] GetFiles()
 {
     return((_files ?? (_files = _client.Query <Attachment>()
                                 .OrderBy(attachment => attachment.FileName)
                                 .Select(attachment => (IFileInfo) new AttachmentFileInfo(_client, _formMode, this, attachment))
                                 .ToList())).ToArray());
 }
 internal static IList <IDirectoryInfo> GetDirectories(ISDataClient client, bool formMode, IDirectoryInfo parent, string id)
 {
     return(client.Query <LibraryDirectory>()
            .Where(x => x.ParentId == id)
            .OrderBy(x => x.DirectoryName)
            .Select(directory => (IDirectoryInfo) new LibraryDirectoryInfo(client, formMode, parent, directory))
            .ToList());
 }
 public IFileInfo[] GetFiles()
 {
     return((_files ?? (_files = _client.Query <LibraryDocument>()
                                 .Where(document => (string)document.Directory["Id"] == _directory.Key)
                                 .OrderBy(document => document.FileName)
                                 .Select(document => (IFileInfo) new LibraryFileInfo(_client, _formMode, this, document))
                                 .ToList())).ToArray());
 }