private async Task <string> GetPostKeyAsync(string threadId, int commentCount, bool forceRefresh = false) { if (!forceRefresh && _PostKey != null) { return(_PostKey); } _PostKey = await CommentClient.GetPostKeyAsync(Context, threadId, commentCount); return(_PostKey); }
private async Task <ThreadKeyResponse> GetThreadKeyAsync(int threadId) { if (_ThreadIdToThreadKey.ContainsKey(threadId)) { return(_ThreadIdToThreadKey[threadId]); } var threadKeyText = await CommentClient.GetThreadKeyDataAsync(Context, threadId); var threadKeyRes = CommentClient.ParseThreadKey(threadKeyText); _ThreadIdToThreadKey.Add(threadId, threadKeyRes); return(threadKeyRes); }