Last active
August 29, 2015 14:03
-
-
Save pdoran/161000713126d28be4c6 to your computer and use it in GitHub Desktop.
Generic Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NHInterceptor : EmptyInterceptor | |
{ | |
public void OnSave(object entity, | |
object id, | |
object[] state, | |
string[] propertyNames, | |
IType[] types) | |
{ | |
var genericObj = new Message<?>(entity); | |
//What goes in the question mark's place? | |
} | |
} | |
public class Message<TEntity> { | |
T Payload { get; private set; } | |
public Message(T data) { | |
Payload = data; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment