Skip to content

Add support of anonymous types in GetMessage #78

@fredericcarre

Description

@fredericcarre

Add the possibility to decode a message from an anonymous type.
JsonConvert.DeserializeAnonymousType method can be used.

Please look at the example below:

subscriber.Subscribe("MyComponent", args =>
{
var anonymousType = new
{
Type = string.Empty,
Status = string.Empty,
Enabled = false,
Message = string.Empty,
};
var myType = args.GetMessage(anonymousType);
if (myType != null)
{
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions