TFS Workitem API 如何取得帳號的E-mail?
下面程式碼範例說明如何使用TFS API 取得帳號E-mail
TeamFoundationIdentity _usersGroup = _ims.ReadIdentity(IdentitySearchFactor.AccountName, "[DefaultCollection]\\MemberGroup", MembershipQuery.Expanded, ReadIdentityOptions.IncludeReadFromSource);
TeamFoundationIdentity[] _groupMembers = _ims.ReadIdentitites(_usersGroup.Members, MembershipQuery.None, ReadIdentityOptions.None);
foreach(TeamFoundationIdentity _member in _groupMembers)
{
string _mailAddress = _member.GetAttribute("Mail", null);
}
參考網址:
http://stackoverflow.com/questions/19594071/getting-tfs-identity-users-mailaddress-for-c-sharp-vs2012-and-vs2013
風來疏竹,風過而竹不留聲;雁度寒潭,雁去而潭不留影。故君子事來而心始現,事去而心隨空。