public TestCMISClient() { testsystems = ExportExtensionCommon.SIEEUtils.GetLocalTestDefinintions(testsystems); //Serializer.SerializeToXmlFile(testsystems, @"c:\temp\TestSystems.xml", Encoding.Unicode); sampleDocument = Path.Combine(Path.GetTempPath(), "Document.pdf"); File.WriteAllBytes(sampleDocument, SIEE_CMIS_Test.Properties.Resources.Document); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); cmisClient = new CMISClient(); }
public List <CMISFolder> GetAllSubFolders() { List <CMISFolder> result = new List <CMISFolder>(); try { foreach (ICmisObject co in IFolder(session).GetChildren()) { if (co is IFolder) { result.Add(new CMISFolder(co as IFolder, session)); } } } catch (Exception e) { CMISClient.CMISClientException(e); } return(result); }
private bool TestFunction_Login(ref string errorMsg) { CMISViewModel_CT viewModel = ((CMISViewModel_CT)CallingViewModel); try { cmisClient = viewModel.GetCMISClient() as CMISClient; List <CMISRepository> repositories = cmisClient.LoadRepositories(); cmisClient.SelectRepository(repositories[0].Id); } catch (Exception e) { errorMsg = "Could not log in. \n" + e.Message; if (e.InnerException != null) { errorMsg += "\n" + e.InnerException.Message; } return(false); } return(true); }