Пример #1
0
 public override void OnAttach(Context context)
 {
     base.OnAttach(context);
     if (context is OnActionListener)
     {
         actionListener = (OnActionListener)context;
     }
     else
     {
         throw new RuntimeException(context.ToString()
                                    + " must implement OnActionListener");
     }
 }
Пример #2
0
 public override void OnDetach()
 {
     base.OnDetach();
     actionListener = null;
 }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="arg1"></param>
 /// <param name="arg2"></param>
 public T Send()
 {
     return(OnActionListener != null?OnActionListener.Invoke() : default(T));
 }
Пример #4
0
 /// <summary>
 /// Invoke the Event and Calls all the methods that are subscribed to specific Event.
 /// </summary>
 public void Send()
 {
     OnActionListener?.Invoke();
 }
 /// <summary>
 /// </summary>
 /// <param name="arg1"></param>
 /// <param name="arg2"></param>
 public T Invoke()
 {
     return(OnActionListener != null?OnActionListener.Invoke() : default);