public void UnsubscribeAll() { if (OnEventRaised != null) { if (OnEventRaised.GetInvocationList() != null) { foreach (System.Delegate d in OnEventRaised.GetInvocationList()) { OnEventRaised -= d as UnityAction <bool>; } } } }
public void RaisedEvent(PipelineEvent pEvent) { if (OnEventRaised == null) { return; } Parallel.ForEach(OnEventRaised.GetInvocationList(), t => { ((EventHandler <PipelineEventEventArgs>)t).BeginInvoke( this, new PipelineEventEventArgs() { Event = pEvent }, null, null); }); }
public Delegate[] GetOnEventRaisedInvocationsList() { return(OnEventRaised?.GetInvocationList()); }