I have an interface that I would like to duck type that returns enum types and takes enum types as parameters.
e.g.
public enum Status
{
Started,
Running,
Finished,
}
public class Calculator
{
public Status Calculate(CalculationType calculationType)
{
// ... some very complex calculations
return Status.Finished;
}
}
When attempting to call functions like Calculate with an impromtu interface created using ActLike<T> I receiving binding exceptions.
I noticed in the InterfaceDictionaryWrappedTest() mapping int to TestEnum works well but I cannot find a way to create an impromtu interface for something like the example above.
Is there a way to do this?
I have an interface that I would like to duck type that returns enum types and takes enum types as parameters.
e.g.
When attempting to call functions like
Calculatewith an impromtu interface created usingActLike<T>I receiving binding exceptions.I noticed in the
InterfaceDictionaryWrappedTest()mappinginttoTestEnumworks well but I cannot find a way to create an impromtu interface for something like the example above.Is there a way to do this?