Пример #1
0
        public void IsKeyOf <TKey, TValue>(IDictionary <TKey, TValue> value, TKey expectedKey, string keyLabel = null)
        {
            if (!Ensure.IsActive)
            {
                return;
            }

            if (!value.ContainsKey(expectedKey))
            {
                throw new ArgumentException(EnsureExceptionMessages.Collections_ContainsKey_Failed.Inject(expectedKey, keyLabel ?? ParamName.Prettify()), ParamName);
            }
        }