CmisSync.Lib.ClientBrandBase.TestServer C# (CSharp) Метод

TestServer() публичный Метод

Check if the CMIS server holds the client brand files
public TestServer ( ServerCredentials credentials ) : bool
credentials CmisSync.Lib.Config.ServerCredentials
Результат bool
        public bool TestServer(ServerCredentials credentials) {
            IRepository repo = this.GetRepo(credentials);
            if (repo == null) {
                return false;
            }

            try {
                ISession session = repo.CreateSession();
                foreach (string path in this.PathList) {
                    try {
                        IDocument doc = session.GetObjectByPath(path) as IDocument;
                        if (doc == null) {
                            return false;
                        }
                    } catch (CmisObjectNotFoundException e) {
                        Logger.Debug(e.ErrorContent, e);
                        return false;
                    }
                }
            } catch (Exception e) {
                Logger.Debug(e.Message, e);
                return false;
            }

            return true;
        }