var workspace = Workstation.Current.GetLocalWorkspaceInfo(path); var tfs = new TfsTeamProjectCollection(workspace.ServerUri); var gss = tfs.GetService<IGroupSecurityService>(); var grp = gss.ReadIdentity(SearchFactor.EveryoneApplicationGroup, null, QueryMembership.Expanded); var names = gss.ReadIdentities(SearchFactor.Sid, grp.Members, QueryMembership.None) .Where(identity => identity.Type == IdentityType.WindowsUser) .Select(identity => string.Format(@"{0}\{1}", identity.Domain, identity.AccountName)) .ToArray();
No comments:
Post a Comment