« first day  last day (15 days later) » 

6:47 AM
Hey Johnathon, Sorry had to sleep :-) RE: your last comment, I was thinking of having a read-only property on the IMessageTransformer which didn't change and represented the relationship between the MessageTransformer and the incoming message type.
Although I quite like your attribute idea if I got that right it would be pretty nice to decorate the transformer with an attribute value of the DeviceTypeEnum that presented the incoming messages it could transform. I'm planning for there to only have a 1-2-1 relationship between the transformer and the devicetype (although I think I will end up with a transformer baseclass which does some stuff which applies to all).
 
7:09 AM
For some added context one the IIncomingMessage is transformed into AMessage or BMessage I'm planning that message of down some sort of mediator implementation for addition decrypting, validation, ultimately storage - using something like this : github.com/jbogard/MediatR
 
 
15 hours later…
9:57 PM
Ok, that certainly becomes simpler with the attribute decoration approach
Otherwise you would have to use some fancy reflection to parse the generic parameters on the inheritance chain for the transformers.
 
 
2 hours later…
11:33 PM
Alright, I've got this working. Just need to clean it up a bit and I'll post the answer. I've also got the source on GitHub for you to pull down and look at, with Unit Tests.
 

« first day  last day (15 days later) »