public IEnumerable <KeyValuePair <TKey, TValue> > GetKeyValuePairs() { string[] stringKeys = keys.GetKeys().ToArray(); KeyValuePair <TKey, TValue>[] pairs = new KeyValuePair <TKey, TValue> [stringKeys.Length]; int i = 0; foreach (string stringKey in stringKeys) { pairs[i] = new KeyValuePair <TKey, TValue>((dynamic)keys.GetValue(stringKey), (dynamic)values.GetValue(stringKey)); i++; } return(pairs); }
private bool ResolveTypeContains(Type type) { return(typeMetadata.GetKeys().Any(baseType => type == baseType || type.IsSubclassOf(baseType))); }