I am trying to revise my registration library. I'm stuck here. I use an enumeration, let him call ActionType to identify my operations, such as UserLogin, PurchaseOrder ... hundreds of them. And I use this type in my registration methods. But since I am sharing my journal library from my project code, for free communication, and the base library cannot access the ActionType defined in the project, how can I achieve this. To clarify this, let me explain the same case in java. Java allows enumerations to implement interfaces. So I could write:
In the base registrar library, I could define;
public interface IActionType {}
and in one of my several projects
public enum ActionType implements IActionType {UserLogin, PurchaseOrder, .....}
So when I called my base library logger.log(ActionType.UserLogin, ....) , you get the main action. That would be enough. Is there anyway around this to accomplish this in C #? By the way, I was considering using IoC containers, but I need something more elegant.
Thanks so much for any help ...
ayk
source share