private void AddStandardPages() { const BindingFlags constantsBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy; IEnumerable<string> standardPageIdStrings = typeof(TeamExplorerPageIds) .GetFields(constantsBindingFlags) .Where(x => x.IsLiteral && !x.IsInitOnly) .Select(x => x.GetRawConstantValue()) .OfType<string>(); foreach (var idStr in standardPageIdStrings) { var guid = new Guid(idStr); var pageInstance = new ConfigurableTeamExplorerPage(guid); this.AvailablePages.Add(guid, pageInstance); } }
private void AddStandardPages() { const BindingFlags constantsBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy; IEnumerable <string> standardPageIdStrings = typeof(TeamExplorerPageIds) .GetFields(constantsBindingFlags) .Where(x => x.IsLiteral && !x.IsInitOnly) .Select(x => x.GetRawConstantValue()) .OfType <string>(); foreach (var idStr in standardPageIdStrings) { var guid = new Guid(idStr); var pageInstance = new ConfigurableTeamExplorerPage(guid); this.AvailablePages.Add(guid, pageInstance); } }