3using System.Threading.Tasks;
12 private readonly TaskCompletionSource<KeyValuePair<string, bool>> xml =
new TaskCompletionSource<KeyValuePair<string, bool>>();
13 private readonly DateTime expiresUtc;
14 private readonly
string key;
15 private bool resultSet =
false;
26 public string Key => this.key;
39 internal bool SetResult(
string Xml,
bool Ok)
46 this.resultSet =
true;
47 this.xml.TrySetResult(
new KeyValuePair<string, bool>(Xml, Ok));
59 return await this.xml.Task;
Associates a specific IQ request with an IQ response.
async Task< KeyValuePair< string, bool > > GetResponse()
Gets the response of the IQ request.
DateTime ExpiresUtc
When request expires, in UTC.
string Key
Key of the request.