IProfileService.SetAttribute 方法 (TeamFoundationRequestContext, Guid, ProfileAttribute)
有条件地在配置文件中设置特性。
命名空间: Microsoft.VisualStudio.Services.Profile
程序集: Microsoft.TeamFoundation.Framework.Server(在 Microsoft.TeamFoundation.Framework.Server.dll 中)
语法
声明
Function SetAttribute ( _
requestContext As TeamFoundationRequestContext, _
identityId As Guid, _
attribute As ProfileAttribute _
) As Integer
int SetAttribute(
TeamFoundationRequestContext requestContext,
Guid identityId,
ProfileAttribute attribute
)
参数
- requestContext
类型:Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
- identityId
类型:System.Guid
- attribute
类型:Microsoft.VisualStudio.Services.Profile.ProfileAttribute
要更新的属性
返回值
类型:System.Int32
更新属性的版本
备注
如果属性因此不存在新的属性添加到设置属性。 如果属性存在此属性更新和,则,只有 + 当该版本在 attribute 已通过与现有特性版本匹配。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。