Add the following extensions methods for dictionaries:
var dictionary = new Dictionary<string, string>
{
["key1"] = "value1",
["key2"] = "value2",
};
dictionary.Throw().IfContainsKey("key1");
dictionary.Throw().IfNotContainsKey("key3");
And the corresponding dictionary properties extension methods:
var dictionary = new Dictionary<string, string>
{
["key1"] = "value1",
["key2"] = "value2",
};
var foo = new { Values = dictionary };
foo.Throw().IfContainsKey(f => f.Values, "key1");
foo.Throw().IfNotContainsKey(f => f.Values, "key3");
We don't have dictionary validation yet, so this will hopefully be the start of a bigger feature 🚀
Add the following extensions methods for dictionaries:
And the corresponding dictionary properties extension methods:
We don't have dictionary validation yet, so this will hopefully be the start of a bigger feature 🚀