public static OnUpdatingArgs ToUpdatingArgs(this UpdatedEventInfo info, ISession session, Type type = null)
 {
     type = type ?? info.GetType().GenericTypeArguments[0];
     return
         (Activator.CreateInstance(typeof(OnUpdatingArgs <>).MakeGenericType(type), info, session) as
          OnUpdatingArgs);
 }
 public static UpdatedEventInfo GetTypedInfo(this UpdatedEventInfo info, Type type)
 {
     if (info == null)
     {
         return(null);
     }
     return(Activator.CreateInstance(typeof(UpdatedEventInfo <>).MakeGenericType(type), info) as UpdatedEventInfo);
 }