/// <summary> /// Gets the Document service object, or creates one if needed. /// </summary> public static DocumentServiceExtensions GetDocumentServiceExtensions() { ServiceManager m_mgr = GetServiceManager(); if (m_mgr.m_docExSvc == null) { m_mgr.m_docExSvc = new DocumentServiceExtensions(); m_mgr.m_docExSvc.Url = m_mgr.SetSvcUrl(m_mgr.m_docExSvc); m_mgr.m_docExSvc.SecurityHeaderValue = new DocExSvc.SecurityHeader(); m_mgr.m_docExSvc.SecurityHeaderValue.Ticket = m_mgr.m_secSvc.SecurityHeaderValue.Ticket; m_mgr.m_docExSvc.SecurityHeaderValue.UserId = m_mgr.m_secSvc.SecurityHeaderValue.UserId; } return(m_mgr.m_docExSvc); }
/// <summary> /// Gets the security service object, or creates one if needed. /// </summary> public static SecurityService GetSecurityService(LoginInfo loginInfo) { ServiceManager m_mgr = GetServiceManager(); if (m_mgr.m_secSvc == null) { m_mgr.m_loginInfo = loginInfo; SecurityService secSvc = new SecurityService(); secSvc.Url = m_mgr.SetSvcUrl(secSvc); secSvc.SecurityHeaderValue = new SecSvc.SecurityHeader(); secSvc.SignIn(loginInfo.Username, loginInfo.Password, loginInfo.Vault); m_mgr.m_secSvc = secSvc; } return(m_mgr.m_secSvc); }