Files
FileFlowsPlugins/ImageNodes/ExtensionMethods.cs
2022-05-06 17:09:16 +12:00

14 lines
395 B
C#

namespace FileFlows.ImageNodes;
internal static class ExtensionMethods
{
public static string? EmptyAsNull(this string str) => str == string.Empty ? null : str;
public static void AddOrUpdate(this Dictionary<string, object> dict, string key, object value)
{
if (dict.ContainsKey(key))
dict[key] = value;
else
dict.Add(key, value);
}
}