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

◆ UpdateAndExecuteVoid5< T0, T1, T2, T3, T4 >()

static void System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid5< T0, T1, T2, T3, T4 > ( CallSite site,
T0 arg0,
T1 arg1,
T2 arg2,
T3 arg3,
T4 arg4 )
inlinestaticpackage

Definition at line 1180 of file UpdateDelegates.cs.

1181 {
1183 Action<CallSite, T0, T1, T2, T3, T4> target = callSite.Target;
1184 site = callSite.GetMatchmaker();
1185 Action<CallSite, T0, T1, T2, T3, T4>[] rules;
1186 Action<CallSite, T0, T1, T2, T3, T4> action;
1187 if ((rules = CallSiteOps.GetRules(callSite)) != null)
1188 {
1189 for (int i = 0; i < rules.Length; i++)
1190 {
1191 action = rules[i];
1192 if ((object)action != target)
1193 {
1194 callSite.Target = action;
1195 action(site, arg0, arg1, arg2, arg3, arg4);
1196 if (CallSiteOps.GetMatch(site))
1197 {
1198 CallSiteOps.UpdateRules(callSite, i);
1199 callSite.ReleaseMatchmaker(site);
1200 return;
1201 }
1202 CallSiteOps.ClearMatch(site);
1203 }
1204 }
1205 }
1206 RuleCache<Action<CallSite, T0, T1, T2, T3, T4>> ruleCache = CallSiteOps.GetRuleCache(callSite);
1207 rules = ruleCache.GetRules();
1208 for (int j = 0; j < rules.Length; j++)
1209 {
1210 action = (callSite.Target = rules[j]);
1211 try
1212 {
1213 action(site, arg0, arg1, arg2, arg3, arg4);
1214 if (CallSiteOps.GetMatch(site))
1215 {
1216 callSite.ReleaseMatchmaker(site);
1217 return;
1218 }
1219 }
1220 finally
1221 {
1222 if (CallSiteOps.GetMatch(site))
1223 {
1224 CallSiteOps.AddRule(callSite, action);
1225 CallSiteOps.MoveRule(ruleCache, action, j);
1226 }
1227 }
1228 CallSiteOps.ClearMatch(site);
1229 }
1230 action = null;
1231 object[] args = new object[5] { arg0, arg1, arg2, arg3, arg4 };
1232 while (true)
1233 {
1234 callSite.Target = target;
1235 action = (callSite.Target = callSite.Binder.BindCore(callSite, args));
1236 try
1237 {
1238 action(site, arg0, arg1, arg2, arg3, arg4);
1239 if (CallSiteOps.GetMatch(site))
1240 {
1241 callSite.ReleaseMatchmaker(site);
1242 break;
1243 }
1244 }
1245 finally
1246 {
1247 if (CallSiteOps.GetMatch(site))
1248 {
1249 CallSiteOps.AddRule(callSite, action);
1250 }
1251 }
1252 CallSiteOps.ClearMatch(site);
1253 }
1254 }
static bool GetMatch(CallSite site)
static void ClearMatch(CallSite site)
void ReleaseMatchmaker(CallSite matchMaker)
Definition CallSite.cs:106

References System.action, 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.