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] 对的集合。

适用于