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

◆ Create() [2/2]

static CallSite System.Runtime.CompilerServices.CallSite< T >.Create ( Type delegateType,
CallSiteBinder binder )
inlinestatic

Definition at line 27 of file CallSite.cs.

28 {
31 if (!delegateType.IsSubclassOf(typeof(MulticastDelegate)))
32 {
34 }
36 if (cacheDict == null)
37 {
39 }
41 {
42 MethodInfo method = typeof(CallSite<>).MakeGenericType(delegateType).GetMethod("Create");
43 if (delegateType.IsCollectible)
44 {
45 return (CallSite)method.Invoke(null, new object[1] { binder });
46 }
49 }
50 return value(binder);
51 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
static void RequiresNotNull(object value, string paramName)
static Exception TypeMustBeDerivedFromSystemDelegate()
Definition Error.cs:123
static volatile CacheDict< Type, Func< CallSiteBinder, CallSite > > s_siteCtors
Definition CallSite.cs:14

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.Runtime.CompilerServices.CallSite< T >.s_siteCtors, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate(), and System.value.

Referenced by System.Linq.Expressions.DynamicExpression.CreateCallSite(), and System.Linq.Expressions.DynamicExpression.Reduce().