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

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

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

Definition at line 1263 of file UpdateDelegates.cs.

1264 {
1266 Action<CallSite, T0, T1, T2, T3, T4, T5> target = callSite.Target;
1267 site = callSite.GetMatchmaker();
1268 Action<CallSite, T0, T1, T2, T3, T4, T5>[] rules;
1269 Action<CallSite, T0, T1, T2, T3, T4, T5> action;
1270 if ((rules = CallSiteOps.GetRules(callSite)) != null)
1271 {
1272 for (int i = 0; i < rules.Length; i++)
1273 {
1274 action = rules[i];
1275 if ((object)action != target)
1276 {
1277 callSite.Target = action;
1278 action(site, arg0, arg1, arg2, arg3, arg4, arg5);
1279 if (CallSiteOps.GetMatch(site))
1280 {
1281 CallSiteOps.UpdateRules(callSite, i);
1282 callSite.ReleaseMatchmaker(site);
1283 return;
1284 }
1285 CallSiteOps.ClearMatch(site);
1286 }
1287 }
1288 }
1289 RuleCache<Action<CallSite, T0, T1, T2, T3, T4, T5>> ruleCache = CallSiteOps.GetRuleCache(callSite);
1290 rules = ruleCache.GetRules();
1291 for (int j = 0; j < rules.Length; j++)
1292 {
1293 action = (callSite.Target = rules[j]);
1294 try
1295 {
1296 action(site, arg0, arg1, arg2, arg3, arg4, arg5);
1297 if (CallSiteOps.GetMatch(site))
1298 {
1299 callSite.ReleaseMatchmaker(site);
1300 return;
1301 }
1302 }
1303 finally
1304 {
1305 if (CallSiteOps.GetMatch(site))
1306 {
1307 CallSiteOps.AddRule(callSite, action);
1308 CallSiteOps.MoveRule(ruleCache, action, j);
1309 }
1310 }
1311 CallSiteOps.ClearMatch(site);
1312 }
1313 action = null;
1314 object[] args = new object[6] { arg0, arg1, arg2, arg3, arg4, arg5 };
1315 while (true)
1316 {
1317 callSite.Target = target;
1318 action = (callSite.Target = callSite.Binder.BindCore(callSite, args));
1319 try
1320 {
1321 action(site, arg0, arg1, arg2, arg3, arg4, arg5);
1322 if (CallSiteOps.GetMatch(site))
1323 {
1324 callSite.ReleaseMatchmaker(site);
1325 break;
1326 }
1327 }
1328 finally
1329 {
1330 if (CallSiteOps.GetMatch(site))
1331 {
1332 CallSiteOps.AddRule(callSite, action);
1333 }
1334 }
1335 CallSiteOps.ClearMatch(site);
1336 }
1337 }
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.