public static SEventProxy getInstance() { if (instance == null) { instance = new SEventProxy(); } return(instance); }
public bool Invoke(object sender, TEventArgs e) { object target = null; if (_weakTarget != null) { if (!_weakTarget.IsAlive) { return(false); } target = _weakTarget.Target; } if (SEventProxy.CanFireEvent(e.GetType())) { // if we are on UI thread just invoke if not go trough InvokeDelegate if (!SEventProxy.InvokeOnUIThread(_openHandler, new object[] { target, sender, e })) { _openHandler(target, sender, e); } } return(true); }
protected void setup() { //get proxy, so we are sure it exists _eventProxy = SEventProxy.getInstance(); }