CmsData.EmailReplacements.GetId C# (CSharp) Method

GetId() private static method

private static GetId ( string>.IReadOnlyDictionary d, string from ) : string
d string>.IReadOnlyDictionary
from string
return string
        private static string GetId(IReadOnlyDictionary<string, string> d, string from)
        {
            string id = null;
            if (d.ContainsKey("lang"))
                id = d["lang"];
            else if (d.ContainsKey("id"))
                id = d["id"];
            if (id == null)
                throw new Exception($"No \"Organization Id\" attribute found on \"{@from}\"");
            return id;
        }