From 276bde43a7c5b8c5ebfa65bc38a77c9808f6be6b Mon Sep 17 00:00:00 2001 From: fumoboy007 <2100868+fumoboy007@users.noreply.github.com> Date: Sun, 23 Jun 2024 01:59:19 -0700 Subject: [PATCH] Add some missing information to the `Advanced Use Cases/ApplicationSpecificMessagePackExtensionTypes` snippet. --- .../ApplicationSpecificMessagePackExtensionTypes.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Snippets/Advanced Use Cases/ApplicationSpecificMessagePackExtensionTypes.swift b/Snippets/Advanced Use Cases/ApplicationSpecificMessagePackExtensionTypes.swift index 55aac7b..ccfb4a0 100644 --- a/Snippets/Advanced Use Cases/ApplicationSpecificMessagePackExtensionTypes.swift +++ b/Snippets/Advanced Use Cases/ApplicationSpecificMessagePackExtensionTypes.swift @@ -37,3 +37,11 @@ struct MyExtensionType: CodableAsMessagePackExtension { // Decode the value from the given bytes. } } + +// snippet.hide +var decoder = MessagePackDecoder() +// snippet.show +// Register the type with the decoder before deserializing a message. +decoder.applicationSpecificExtensionTypes = [ + MyExtensionType.self +]