Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateAndExecute10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet >()

static TRet System.Dynamic.UpdateDelegates.UpdateAndExecute10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet > ( CallSite site,
T0 arg0,
T1 arg1,
T2 arg2,
T3 arg3,
T4 arg4,
T5 arg5,
T6 arg6,
T7 arg7,
T8 arg8,
T9 arg9 )
inlinestaticpackage

Definition at line 764 of file UpdateDelegates.cs.

765 {
767 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet> target = callSite.Target;
768 site = callSite.GetMatchmaker();
769 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet>[] rules;
770 Func<CallSite, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet> func;
771 if ((rules = CallSiteOps.GetRules(callSite)) != null)
772 {
773 for (int i = 0; i < rules.Length; i++)
774 {
775 func = rules[i];
776 if ((object)func != target)
777 {
778 callSite.Target = func;
779 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
780 if (CallSiteOps.GetMatch(site))
781 {
782 CallSiteOps.UpdateRules(callSite, i);
783 callSite.ReleaseMatchmaker(site);
784 return result;
785 }
787 }
788 }
789 }
791 rules = ruleCache.GetRules();
792 for (int j = 0; j < rules.Length; j++)
793 {
794 func = (callSite.Target = rules[j]);
795 try
796 {
797 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
798 if (CallSiteOps.GetMatch(site))
799 {
800 callSite.ReleaseMatchmaker(site);
801 return result;
802 }
803 }
804 finally
805 {
806 if (CallSiteOps.GetMatch(site))
807 {
808 CallSiteOps.AddRule(callSite, func);
809 CallSiteOps.MoveRule(ruleCache, func, j);
810 }
811 }
813 }
814 func = null;
815 object[] args = new object[10] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 };
816 while (true)
817 {
818 callSite.Target = target;
819 func = (callSite.Target = callSite.Binder.BindCore(callSite, args));
820 try
821 {
822 TRet result = func(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
823 if (CallSiteOps.GetMatch(site))
824 {
825 callSite.ReleaseMatchmaker(site);
826 return result;
827 }
828 }
829 finally
830 {
831 if (CallSiteOps.GetMatch(site))
832 {
833 CallSiteOps.AddRule(callSite, func);
834 }
835 }
837 }
838 }
static bool GetMatch(CallSite site)
static void ClearMatch(CallSite site)
void ReleaseMatchmaker(CallSite matchMaker)
Definition CallSite.cs:106

References System.Runtime.CompilerServices.CallSite< T >.Binder, System.Runtime.CompilerServices.CallSiteOps.ClearMatch(), System.Runtime.CompilerServices.CallSiteOps.GetMatch(), System.Runtime.CompilerServices.CallSite< T >.GetMatchmaker(), System.Runtime.CompilerServices.RuleCache< T >.GetRules(), System.Runtime.CompilerServices.CallSite< T >.ReleaseMatchmaker(), and System.Runtime.CompilerServices.CallSite< T >.Target.