diff --git a/docs/concepts/CustomMessages.md b/docs/concepts/CustomMessages.md index 2bd7b21..3949ed7 100644 --- a/docs/concepts/CustomMessages.md +++ b/docs/concepts/CustomMessages.md @@ -10,15 +10,15 @@ Next ensure you have a constructor that takes the `TypeName` string parameter fi Example: ```cs - [NmeaMessageType("PTEST")] - public class CustomMessage : NmeaMessage +[NmeaMessageType("PTEST")] +public class CustomMessage : NmeaMessage +{ + public CustomMessage(string type, string[] parameters) : base(type, parameters) { - public CustomMessage(string type, string[] parameters) : base(type, parameters) - { - Value = parameters[0]; - } - public string Value { get; } + Value = parameters[0]; } + public string Value { get; } +} ``` Next register this with the NMEA Parser using either: @@ -80,4 +80,4 @@ var msg1 = NmeaMessage.Parse(input1); var msg2 = NmeaMessage.Parse(input2, msg1 as IMultiSentenceMessage); ``` -If msg1 and msg2 aren't the same instance, it means the message couldn't be added to the previous message, and a new message was generated. \ No newline at end of file +If msg1 and msg2 aren't the same instance, it means the message couldn't be added to the previous message, and a new message was generated.