Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CallSiteOps.cs
Go to the documentation of this file.
3
5
6[EditorBrowsable(EditorBrowsableState.Never)]
7[DebuggerStepThrough]
8public static class CallSiteOps
9{
10 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
11 [EditorBrowsable(EditorBrowsableState.Never)]
12 public static CallSite<T> CreateMatchmaker<T>(CallSite<T> site) where T : class
13 {
14 CallSite<T> callSite = site.CreateMatchMaker();
15 callSite._match = true;
16 return callSite;
17 }
18
19 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
20 [EditorBrowsable(EditorBrowsableState.Never)]
21 public static bool SetNotMatched(CallSite site)
22 {
23 bool match = site._match;
24 site._match = false;
25 return match;
26 }
27
28 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
29 [EditorBrowsable(EditorBrowsableState.Never)]
30 public static bool GetMatch(CallSite site)
31 {
32 return site._match;
33 }
34
35 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public static void ClearMatch(CallSite site)
38 {
39 site._match = true;
40 }
41
42 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
43 [EditorBrowsable(EditorBrowsableState.Never)]
44 public static void AddRule<T>(CallSite<T> site, T rule) where T : class
45 {
46 site.AddRule(rule);
47 }
48
49 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 public static void UpdateRules<T>(CallSite<T> @this, int matched) where T : class
52 {
53 if (matched > 1)
54 {
55 @this.MoveRule(matched);
56 }
57 }
58
59 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
60 [EditorBrowsable(EditorBrowsableState.Never)]
61 public static T[]? GetRules<T>(CallSite<T> site) where T : class
62 {
63 return site.Rules;
64 }
65
66 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public static RuleCache<T> GetRuleCache<T>(CallSite<T> site) where T : class
69 {
70 return site.Binder.GetRuleCache<T>();
71 }
72
73 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
74 [EditorBrowsable(EditorBrowsableState.Never)]
75 public static void MoveRule<T>(RuleCache<T> cache, T rule, int i) where T : class
76 {
77 if (i > 1)
78 {
79 cache.MoveRule(rule, i);
80 }
81 }
82
83 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
84 [EditorBrowsable(EditorBrowsableState.Never)]
85 public static T[] GetCachedRules<T>(RuleCache<T> cache) where T : class
86 {
87 return cache.GetRules();
88 }
89
90 [Obsolete("CallSiteOps has been deprecated and is not supported.", true)]
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public static T Bind<T>(CallSiteBinder binder, CallSite<T> site, object[] args) where T : class
93 {
94 return binder.BindCore(site, args);
95 }
96}
static bool GetMatch(CallSite site)
static RuleCache< T > GetRuleCache< T >(CallSite< T > site)
static bool SetNotMatched(CallSite site)
static void ClearMatch(CallSite site)
static ? T[] GetRules< T >(CallSite< T > site)
static T Bind< T >(CallSiteBinder binder, CallSite< T > site, object[] args)
static void UpdateRules< T >(CallSite< T > @this, int matched)
static CallSite< T > CreateMatchmaker< T >(CallSite< T > site)
static T[] GetCachedRules< T >(RuleCache< T > cache)
static void MoveRule< T >(RuleCache< T > cache, T rule, int i)
static void AddRule< T >(CallSite< T > site, T rule)