如何以编程方式获取站点中所有 Sitecore 域的列表?

How can I programmatically get a list of all of the Sitecore domains in a site?

在 Sitecore 7.5 中,我希望能够在代码中获取所有当前 Sitecore 域的列表。我知道 Sitecore 安全只是建立在 ASP.NET 会员提供程序之上,但我似乎找不到任何关于如何在代码中获取所有域列表的文档。

谢谢, 科里

Sitecore.SecurityModel.DomainManager中有GetDomains()方法 class:

/// <summary>
/// Gets all domains handled by the current provider.
/// </summary>
public static System.Collections.Generic.IEnumerable<Domain> GetDomains()