-
-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Labels
Description
I would like to do something like this:
public class MessageHandler : SmartEnum<MessageHandler, Action<string>>
{
protected MessageHandler(string name, Action<string> value) : base(name, value)
{
}
public void Update(Action<string> value)
{
this.Value = value;
}
public static MessageHandler ToBeDefinedLater =
new MessageHandler(nameof(ToBeDefinedLater), _ => { });
}Which would be called like this:
MessageHandler.ToBeDefinedLater.Update(s => { "ugh" });This would allow me to define MessageHandler in one project use it in another and inject the item I would like to work with from the parent project without having to share resources.
I'm not sure if this would cause any problems. But it would definitely make like simpler!
If you know of any workarounds that would be nice. I'm still working on figure it out.
I enjoy your podcast by-the-way. That is how I heard of your library!