如何在嵌套字典上实现 IEnumerable<T>?

How to implement IEnumerable<T> on nested Dictionary?

我有这个class:

public class MyClass<T> : IEnumerable<T>
{
    private Dictionary<T, Dictionary<T, double>> data = new Dictionary<T, Dictionary<T, double>>();

    public IEnumerator<T> GetEnumerator()
    {
        //Return what???
    }

    IEnumerator IEnumerable.GetEnumerator()
    {
        return this.GetEnumerator();
    }
}

但是我该如何实现 GetEnumerator

词典有 Keys 个类型为 T 的集合:

public IEnumerator<T> GetEnumerator()
{
    return data.Keys.GetEnumerator();
}