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

◆ UpdateAndExecuteVoid7< T0, T1, T2, T3, T4, T5, T6 >()

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

Definition at line 1346 of file UpdateDelegates.cs.

1347 {
1349 Action<CallSite, T0, T1, T2, T3, T4, T5, T6> target = callSite.Target;
1350 site = callSite.GetMatchmaker();
1351 Action<CallSite, T0, T1, T2, T3, T4, T5, T6>[] rules;
1352 Action<CallSite, T0, T1, T2, T3, T4, T5, T6> action;
1353 if ((rules = CallSiteOps.GetRules(callSite)) != null)
1354 {
1355 for (int i = 0; i < rules.Length; i++)
1356 {
1357 action = rules[i];
1358 if ((object)action != target)
1359 {
1360 callSite.Target = action;
1361 action(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
1362 if (CallSiteOps.GetMatch(site))
1363 {
1364 CallSiteOps.UpdateRules(callSite, i);
1365 callSite.ReleaseMatchmaker(site);
1366 return;
1367 }
1368 CallSiteOps.ClearMatch(site);
1369 }
1370 }
1371 }
1372 RuleCache<Action<CallSite, T0, T1, T2, T3, T4, T5, T6>> ruleCache = CallSiteOps.GetRuleCache(callSite);
1373 rules = ruleCache.GetRules();
1374 for (int j = 0; j < rules.Length; j++)
1375 {
1376 action = (callSite.Target = rules[j]);
1377 try
1378 {
1379 action(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
1380 if (CallSiteOps.GetMatch(site))
1381 {
1382 callSite.ReleaseMatchmaker(site);
1383 return;
1384 }
1385 }
1386 finally
1387 {
1388 if (CallSiteOps.GetMatch(site))
1389 {
1390 CallSiteOps.AddRule(callSite, action);
1391 CallSiteOps.MoveRule(ruleCache, action, j);
1392 }
1393 }
1394 CallSiteOps.ClearMatch(site);
1395 }
1396 action = null;
1397 object[] args = new object[7] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 };
1398 while (true)
1399 {
1400 callSite.Target = target;
1401 action = (callSite.Target = callSite.Binder.BindCore(callSite, args));
1402 try
1403 {
1404 action(site, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
1405 if (CallSiteOps.GetMatch(site))
1406 {
1407 callSite.ReleaseMatchmaker(site);
1408 break;
1409 }
1410 }
1411 finally
1412 {
1413 if (CallSiteOps.GetMatch(site))
1414 {
1415 CallSiteOps.AddRule(callSite, action);
1416 }
1417 }
1418 CallSiteOps.ClearMatch(site);
1419 }
1420 }
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.