public void Express(Expression<Func<User, bool>> express)
{
BLL.Manager.ILogManager logs = BLL.Container.ObjectContainer.getObject<BLL.Manager.ILogManager>();
logs.GetAll(1);
var total = logs.LastPageTotal;
}
As the above code, I need to know ILogManager the implementation class, I only know that the information reflected the way, but in the method defined type is the type of interface
I’ve been through the IL reflecting some call information, call the information I need to get in the end these by which class to call.
If I understand correctly:
ILogManagervariableILogManagerYou could insert a call to
logs.GetType()in the code; this will tell you the class type that implementsILogManager.Alternatively, you can tell you which classes implement a given interface the same way that Reflector does: by loading every possible assembly, looking at the types in those assemblies, and recording which ones implement
ILogManager.