25 lines
706 B
C#
25 lines
706 B
C#
using System.Diagnostics;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace LeagueAPI.Utils;
|
|
|
|
public interface IPortTokenBehavior
|
|
{
|
|
bool TryGet(Process process, out string remotingAuthToken, out int appPort, [NotNullWhen(false)] out Exception? exception);
|
|
|
|
void MapArguments(IReadOnlyList<string> args, Dictionary<string, string> _args)
|
|
{
|
|
foreach (string arg in args)
|
|
{
|
|
if (arg.Length > 0 && arg.Contains('='))
|
|
{
|
|
string text = arg;
|
|
string[] array = text[2..].Split("=");
|
|
string key = array[0];
|
|
string value = array[1];
|
|
_args[key] = value;
|
|
}
|
|
}
|
|
}
|
|
}
|