public static void Dump(
TextWriter writer,
ServiceRecord record,
params Type[] attributeIdEnumDefiningTypes
)
Public Shared Sub Dump (
writer As TextWriter,
record As ServiceRecord,
ParamArray attributeIdEnumDefiningTypes As Type()
)
public:
static void Dump(
TextWriter^ writer,
ServiceRecord^ record,
... array<Type^>^ attributeIdEnumDefiningTypes
)
static member Dump :
writer : TextWriter *
record : ServiceRecord *
attributeIdEnumDefiningTypes : Type[] -> unit
The system has built-in a set of mappings from Service Class to its Attribute IDs. This is supplied by the MapServiceClassToAttributeIdList class, and contains the Attribute IDs defined in the base SDP specification as well as in Bluetooth Profiles specification e.g. ObjectPushProfile, Headset, Panu, etc. If however the record being decoded is a custom one then a set of extra Attribute Id definitions can be supplied in the attributeIdEnumDefiningTypes parameter. The Attribute IDs for a particular Service Class should be defined in a static class and the set of such classes should be passed as their Type object. e.g.
static class FooAttributeId
{
public const ServiceAttributeId BarName = (ServiceAttributeId)0x0300;
}
…
ServiceRecordUtilities.Dump(writer, myRecord, typeof(FooAttributeId));
…