Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
NewExpression.cs
Go to the documentation of this file.
7
9
10[DebuggerTypeProxy(typeof(NewExpressionProxy))]
12{
14
15 public override Type Type => Constructor.DeclaringType;
16
17 public sealed override ExpressionType NodeType => ExpressionType.New;
18
20
22
24
26
33
35 {
36 return _arguments[index];
37 }
38
39 protected internal override Expression Accept(ExpressionVisitor visitor)
40 {
41 return visitor.VisitNew(this);
42 }
43
44 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "A NewExpression has already been created. The original creator will get a warning that it is not trim compatible.")]
46 {
47 if (ExpressionUtils.SameElements(ref arguments, Arguments))
48 {
49 return this;
50 }
51 if (Members == null)
52 {
54 }
56 }
57}
static ReadOnlyCollection< ParameterExpression > ReturnReadOnly(IParameterProvider provider, ref object collection)
static NewExpression New(ConstructorInfo constructor)
IReadOnlyList< Expression > _arguments
NewExpression(ConstructorInfo constructor, IReadOnlyList< Expression > arguments, ReadOnlyCollection< MemberInfo > members)
NewExpression Update(IEnumerable< Expression >? arguments)
ReadOnlyCollection< MemberInfo >? Members
override Expression Accept(ExpressionVisitor visitor)
ReadOnlyCollection< Expression > Arguments