using System;
using System.Collections.ObjectModel;
using System.Reflection.Emit;
namespace System.Linq.Expressions
{
/// Represents calling a constructor and initializing one or more members of the new object.
// Token: 0x02000028 RID: 40
public sealed class MemberInitExpression : Expression
{
// Token: 0x06000229 RID: 553 RVA: 0x0000BB60 File Offset: 0x00009D60
internal MemberInitExpression(NewExpression new_expression, ReadOnlyCollection bindings)
: base(ExpressionType.MemberInit, new_expression.Type)
{
this.new_expression = new_expression;
this.bindings = bindings;
}
/// Gets the expression that represents the constructor call.
/// A that represents the constructor call.
// Token: 0x17000028 RID: 40
// (get) Token: 0x0600022A RID: 554 RVA: 0x0000BB80 File Offset: 0x00009D80
public NewExpression NewExpression
{
get
{
return this.new_expression;
}
}
/// Gets the bindings that describe how to initialize the members of the newly created object.
/// A of objects which describe how to initialize the members.
// Token: 0x17000029 RID: 41
// (get) Token: 0x0600022B RID: 555 RVA: 0x0000BB88 File Offset: 0x00009D88
public ReadOnlyCollection Bindings
{
get
{
return this.bindings;
}
}
// Token: 0x0600022C RID: 556 RVA: 0x0000BB90 File Offset: 0x00009D90
internal override void Emit(EmitContext ec)
{
LocalBuilder localBuilder = ec.EmitStored(this.new_expression);
ec.EmitCollection(this.bindings, localBuilder);
ec.EmitLoad(localBuilder);
}
// Token: 0x040000B2 RID: 178
private NewExpression new_expression;
// Token: 0x040000B3 RID: 179
private ReadOnlyCollection bindings;
}
}