Xunit.Reporting.Internal.Configuration.ArgumentMapFactory.AddToDictionary C# (CSharp) Метод

AddToDictionary() приватный статический Метод

private static AddToDictionary ( string key, string value, IDictionary dictionary ) : void
key string
value string
dictionary IDictionary
Результат void
        private static void AddToDictionary(
            string key,
            string value,
            IDictionary<string, ICollection<string>> dictionary)
        {
            ICollection<string> targetCollection;

            if (!dictionary.TryGetValue(key, out targetCollection))
            {
                targetCollection = new List<string>();
                dictionary.Add(key, targetCollection);
            }

            if (!targetCollection.Contains(value))
            {
                targetCollection.Add(value);
            }
        }