/// <summary> /// Gets the address book. /// </summary> /// <param name="edID">The edID identifier.</param> /// <param name="addrBook">The address book.</param> /// <returns>true: Success, false: otherwise</returns> public List<PersonDataType> GetAddressBook() { List<PersonDataType> addrBook = new List<PersonDataType>(); LastRC = ZustellServiceRC.OK; GetAddressBookRequest requ = new GetAddressBookRequest() { GetAddressBook = new RequestType() { Edid = _certService.EdID } }; Log.Debug("Request: {@RequestType}", CallerInfo.Create(), requ.GetAddressBook); var resp = CallGetAddressBook(requ); if (LastRC == ZustellServiceRC.OK) { addrBook = resp.AddressBook.ToList(); Log.Debug("Response: {@PersonDataType}", CallerInfo.Create(), addrBook); } return addrBook; }
private GetAddressBookResponse CallGetAddressBook(GetAddressBookRequest request) { if (channel == null || channel.State != CommunicationState.Opened) { var rc = CallOpen(); if (LastRC != ZustellServiceRC.OK) { return null; } } return CallService(() => client.GetAddressBook(request)); }