DnssdServiceInstance.TextAttributes 屬性

定義

取得此服務實例的屬性,做為字串的 [name, value] 組清單。 服務用戶端可以檢查屬性,以判斷服務實例的其他資訊。

服務所使用的特定屬性名稱和值是由服務的設計工具所決定。 例如,多人遊戲的服務實例可能會有描述實例所使用的遊戲對應的屬性,或實例的遊戲困難等級。 不同的服務實例會針對不同的地圖或困難等級使用中,而使用遊戲服務的用戶端可以使用屬性值來判斷玩家慣用的地圖或困難等級要連線到哪一個遊戲伺服器實例。

public:
 property IMap<Platform::String ^, Platform::String ^> ^ TextAttributes { IMap<Platform::String ^, Platform::String ^> ^ get(); };
IMap<winrt::hstring, winrt::hstring const&> TextAttributes();
public IDictionary<string,string> TextAttributes { get; }
var iMap = dnssdServiceInstance.textAttributes;
Public ReadOnly Property TextAttributes As IDictionary(Of String, String)

屬性值

IMap<String,String>

IDictionary<String,String>

IMap<Platform::String,Platform::String>

IMap<winrt::hstring,winrt::hstring>

屬性 [name,value] 配對的集合。

適用於