public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (CardProcessor != 0) { hash ^= CardProcessor.GetHashCode(); } if (CardAgreement.Length != 0) { hash ^= CardAgreement.GetHashCode(); } if (LicenseId != 0) { hash ^= LicenseId.GetHashCode(); } if (SiteId != 0) { hash ^= SiteId.GetHashCode(); } if (DeviceId != 0) { hash ^= DeviceId.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } if (Password.Length != 0) { hash ^= Password.GetHashCode(); } if (ServiceURI.Length != 0) { hash ^= ServiceURI.GetHashCode(); } if (DebugLoggingEnabled != false) { hash ^= DebugLoggingEnabled.GetHashCode(); } if (PorticoDeveloperId.Length != 0) { hash ^= PorticoDeveloperId.GetHashCode(); } if (PorticoVersionNumber.Length != 0) { hash ^= PorticoVersionNumber.GetHashCode(); } return(hash); }
public void SetBaseEndPoint(ServiceURI serviceURI) { BaseUri = EnumHelper.GetDescription(serviceURI); }
/// <summary> /// Gets the list of sub-folders inside a folder /// </summary> /// <param name="FolderGuid">Edge drive folder guid</param> /// <returns>array of sub-folder details</returns> public FolderData[] BrowseFolders(string FolderGuid, out string errorMessage) { const string function = "CVAPI::BrowseFolders"; FolderData[] result = null; errorMessage = string.Empty; try { // Get the client details if (_clientDetails.ClientID == null) { GetEdgeClientID(out _clientDetails); } if (string.IsNullOrEmpty(_clientDetails.ClientID)) { errorMessage = "Server is not responding. Please try again later."; } else { string requestBody = string.Format(browseRequestBody, _clientDetails.ClientID, _clientDetails.InstanceID, _clientDetails.SubClientID, _clientDetails.ApplicationID, _userGuid, "", string.IsNullOrEmpty(FolderGuid) ? _clientDetails.RootWebFolderID : FolderGuid + Path.DirectorySeparatorChar.ToString()); HttpWebResponse ClientResp = SendRequest(ServiceURI.Replace("api/", "") + browseFolderURI, post, _authToken, requestBody); if (null != ClientResp && ClientResp.StatusCode == HttpStatusCode.OK) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(ClientResp.GetResponseStream()); XmlNodeList attrList = xmlDoc.SelectNodes("//databrowse_BrowseResponseWrapper/browseResponse/browseResult/dataResultSet/@displayName"); if (null != attrList) { XmlNode guidNode; result = new FolderData[attrList.Count]; for (int i = 0; i < attrList.Count; i++) { result[i] = new FolderData(); result[i].FolderName = attrList[i].Value; guidNode = xmlDoc.SelectSingleNode(string.Format("//dataResultSet[@displayName=\"{0}\"]/@path", attrList[i].Value)); if (null != guidNode) { result[i].FolderGuid = guidNode.Value; } else { Logger.Error("Folder guid attribute not found", function); result = null; break; } } } } else if (ClientResp != null) { if (ClientResp.StatusCode == HttpStatusCode.Unauthorized) { RenewToken(out errorMessage); } else { errorMessage = "Server is not responding. Please try again later."; Logger.Error(string.Format("{0}:{1}", Convert.ChangeType(ClientResp.StatusCode, ClientResp.StatusCode.GetTypeCode()), ClientResp.StatusDescription), function); } } } } catch (Exception e) { Logger.Error(e, function); } return(result); }