Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TypeInfoExtensions.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
using
System.Runtime.CompilerServices
;
3
4
namespace
System.Linq.Expressions.Compiler
;
5
6
internal
static
class
TypeInfoExtensions
7
{
8
public
static
Type
MakeDelegateType
(
this
DelegateHelpers
.
TypeInfo
info
,
Type
retType
,
params
Expression
[]
args
)
9
{
10
return
info
.MakeDelegateType(
retType
, (
IList<Expression>
)
args
);
11
}
12
13
public
static
Type
MakeDelegateType
(
this
DelegateHelpers
.
TypeInfo
info
,
Type
retType
,
IList<Expression>
args
)
14
{
15
Type
[]
array
=
new
Type
[args.Count + 2];
16
array
[0] =
typeof
(
CallSite
);
17
array
[^1] =
retType
;
18
for
(
int
i = 0; i <
args
.
Count
; i++)
19
{
20
array
[i + 1] =
args
[i].Type;
21
}
22
return
info.DelegateType =
DelegateHelpers
.
MakeNewDelegate
(
array
);
23
}
24
}
System.Collections.Generic.Dictionary.Count
int Count
Definition
Dictionary.cs:682
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Linq.Expressions.Compiler.DelegateHelpers.TypeInfo
Definition
DelegateHelpers.cs:14
System.Linq.Expressions.Compiler.DelegateHelpers.MakeNewDelegate
static Type MakeNewDelegate(Type[] types)
Definition
DelegateHelpers.cs:153
System.Linq.Expressions.Compiler.DelegateHelpers
Definition
DelegateHelpers.cs:12
System.Linq.Expressions.Compiler.TypeInfoExtensions.MakeDelegateType
static Type MakeDelegateType(this DelegateHelpers.TypeInfo info, Type retType, IList< Expression > args)
Definition
TypeInfoExtensions.cs:13
System.Linq.Expressions.Compiler.TypeInfoExtensions.MakeDelegateType
static Type MakeDelegateType(this DelegateHelpers.TypeInfo info, Type retType, params Expression[] args)
Definition
TypeInfoExtensions.cs:8
System.Linq.Expressions.Compiler.TypeInfoExtensions
Definition
TypeInfoExtensions.cs:7
System.Linq.Expressions.Expression
Definition
Expression.cs:5484
System.Runtime.CompilerServices.CallSite
Definition
CallSite.cs:54
System.Type
Definition
Type.cs:14
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
System.Linq.Expressions.Compiler
Definition
AnalyzedTree.cs:3
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.ExceptionArgument.info
@ info
System.ExceptionArgument.array
@ array
source
System.Linq.Expressions
System.Linq.Expressions.Compiler
TypeInfoExtensions.cs
Generated by
1.10.0