Expansion event #event Creates an event complete with private event, public add/remove and protected virtual OnEvent. zeroflag
NAME The event's name. Event DOCUMENTATION The documentation for the event. The $NAME$ event. HANDLER The event handler type. EventHandler ARGS The event args. EventArgs m_$NAME$; /// /// $DOCUMENTATION$ /// public event $HANDLER$<$ARGS$> $NAME$ { add { this.m_$NAME$ += value; } remove { this.m_$NAME$ -= value; } } /// /// Call to raise the $NAME$ event: /// $DOCUMENTATION$ /// /// protected virtual void On$NAME$($ARGS$ e) { // if there are event subscribers... if (this.m_$NAME$ != null) { // call them... this.m_$NAME$(this, e); } } #endregion event $NAME$]]>