RegisterExtensionHandler Method (String, Type)

Registers a deserializer for item extension data.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: (1.15.1003.9505)

public static void RegisterExtensionHandler(
	string extensionSource,
	Type itemExtensionClass


Type: System..::..String
The unique identifier for the source of the item extension.
Type: System..::..Type
The class that implements the item extension. It must be public, derive from HealthRecordItemExtension, and have a default constructor.

Extension data is available to all applications, and since there is no registration method for the extensionSource identifiers, collisions between applications are possible. Applications should be written to be tolerant of the presence of extension data using the same extensionSource but a different schema. It is also recommended that extensionSource be specified the same way .NET namespaces are specified, prefixing the extensionSource with the company name.