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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。