共用方式為


ServiceDefinition.IsSingleton 屬性

注意:這個應用程式開發介面現在已經過時。

如果 [true],這與型別的唯一的服務定義。 如果這個服務定義將註冊,而這是 [true],與這個服務型別的服務定義不可能已經登錄。 如果定義更新,使其成為一個定義,它必須是註冊的唯一的定義。

一旦的定義註冊,其他與指定之服務型別的服務定義不可以註冊。

命名空間:  Microsoft.TeamFoundation.Framework.Server
組件:  Microsoft.TeamFoundation.Framework.Server (在 Microsoft.TeamFoundation.Framework.Server.dll 中)

語法

'宣告
<ObsoleteAttribute("The IsSingleton property is no longer used. It will always return true for backwards compatibility purposes")> _
<ClientPropertyAttribute(ClientVisibility.Private)> _
Public ReadOnly Property IsSingleton As Boolean
[ObsoleteAttribute("The IsSingleton property is no longer used. It will always return true for backwards compatibility purposes")]
[ClientPropertyAttribute(ClientVisibility.Private)]
public bool IsSingleton { get; }

屬性值

型別:System.Boolean
傳回 Boolean

.NET Framework 安全性

請參閱

參考

ServiceDefinition 類別

Microsoft.TeamFoundation.Framework.Server 命名空間