Jack Gerrits da759b6aed
Dotnet - core framework rework (rebased) (#511)
* 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>
2024-09-17 13:01:49 +00:00

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;
}
}