Skip to content

Instantly share code, notes, and snippets.

@msciborski
Created June 24, 2020 17:36
Show Gist options
  • Save msciborski/515c74377bc9c739e511d7c5903f8158 to your computer and use it in GitHub Desktop.
Save msciborski/515c74377bc9c739e511d7c5903f8158 to your computer and use it in GitHub Desktop.
builder.Register<SenderFactory>(c =>
{
var context = c.Resolve<IComponentContext>();
return (client) =>
{
var sender = context.Resolve<IEnumerable<Meta<ISender>>>()
.First(x => (string) x.Metadata["Client"] == client).Value;
return sender;
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment