Initial commit

This commit is contained in:
rudder
2026-08-12 14:04:55 +03:00
commit 8cf738d9f0
124 changed files with 5433 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace RudderSdk.Core;
internal static class Url
{
public static string Encode(string? value) => Uri.EscapeDataString(value ?? string.Empty);
public static string Query(params (string Key, string? Value)[] values)
{
var parts = new List<string>();
foreach (var item in values)
{
if (!string.IsNullOrEmpty(item.Value))
parts.Add(Encode(item.Key) + "=" + Encode(item.Value));
}
return parts.Count == 0 ? string.Empty : "?" + string.Join("&", parts);
}
}