MCPcopy Create free account
hub / github.com/apache/thrift / testStringMap

Method testStringMap

test/netstd/Server/TestServer.cs:324–347  ·  view source on GitHub ↗
(Dictionary<string, string>? thing, CancellationToken cancellationToken)

Source from the content-addressed store, hash-verified

322 }
323
324 public Task<Dictionary<string, string>> testStringMap(Dictionary<string, string>? thing, CancellationToken cancellationToken)
325 {
326 var sb = new StringBuilder();
327 sb.Append("testStringMap({{");
328 if (thing != null)
329 {
330 var first = true;
331 foreach (var key in thing.Keys)
332 {
333 if (first)
334 {
335 first = false;
336 }
337 else
338 {
339 sb.Append(", ");
340 }
341 sb.AppendFormat("{0} => {1}", key, thing[key]);
342 }
343 }
344 sb.Append("}})");
345 logger.Invoke(sb.ToString());
346 return Task.FromResult(thing ?? []); // null returns are not allowed in Thrift
347 }
348
349 public Task<HashSet<int>> testSet(HashSet<int>? thing, CancellationToken cancellationToken)
350 {

Callers

nothing calls this directly

Calls 2

InvokeMethod · 0.80
ToStringMethod · 0.80

Tested by

no test coverage detected