Если Вы не хотите использовать @SuppressWarnings ("снял флажок") с Вами, может сделать следующее.
Query q = sess.createQuery("from Cat cat");
List<?> results =(List<?>) q.list();
List<Cat> cats = new ArrayList<Cat>();
for(Object result:results) {
Cat cat = (Cat) result;
cats.add(cat);
}
к вашему сведению - я создал util метод, который делает это для меня так, он не замусорил мой код, и я не должен использовать @SupressWarning.
Yes. The EventArgs
object is available inside the Action script block as a magical variable called $Event
. This is what get-help Register-ObjectEvent -detail
has to say:
From the MSDN documentation:
The value of the Action parameter can include the $Event, $EventSubscriber, $Sender, $SourceEventArgs, and $SourceArgs automatic variables, which provide information about the event to the Action script block. For more information, see about_Automatic_Variables.