mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-16 05:21:05 +00:00

* dotnet rework * add dotnet workload update to startup * fix build * interim fixup * this is the stuff that was missing * renaming the .net classes * more build fixup * port dev-team sample WIP * add proto messages and IHandle to agents * add github variables * remove OAgents gh-flow * remove OAgents library * add .vs to gitignore --------- Co-authored-by: Kosta Petan <kostapetan@gmail.com> Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
17 lines
455 B
C#
17 lines
455 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
namespace DevTeam;
|
|
|
|
public static class ParseExtensions
|
|
{
|
|
public static long TryParseLong(this Dictionary<string, string> data, string key)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(data);
|
|
|
|
if (data.TryGetValue(key, out string? value) && !string.IsNullOrEmpty(value) && long.TryParse(value, out var result))
|
|
{
|
|
return result;
|
|
}
|
|
return default;
|
|
}
|
|
} |