/// <summary> /// Runs a delegate function over every method in the SWF. /// </summary> /// <param name="mp">The delegate to run.</param> private void MethodProc(AbcCode.MethodProcessor mp) { foreach (DoABC script in this.scripts) { script.MethodProc(mp); } }
/// <summary> /// Process all the methods with a delegate function. /// </summary> /// <param name="mp">The delegate to call on each method.</param> public void MethodProc(AbcCode.MethodProcessor mp) { foreach (Trait t in this.classTraits) { if (t is FunctionalTrait) { mp(((FunctionalTrait)t).Fn, this); } } foreach (Trait t in this.instanceTraits) { if (t is FunctionalTrait) { mp(((FunctionalTrait)t).Fn, this); } } if (this.Cinit != null) { mp(this.Cinit, this); } if (this.Iinit != null) { mp(this.Iinit, this); } }
/// <summary> /// Process all the methods in this code block. /// </summary> /// <param name="mp">A delegate function that will process each method somehow.</param> internal void MethodProc(AbcCode.MethodProcessor mp) { this.Code.MethodProc(mp); }