/// <summary>
 /// Visits a <see cref="SerializableListInitExpression"/>.
 /// </summary>
 /// <param name="expression"><see cref="SerializableListInitExpression"/> to visit.</param>
 /// <returns>Returns the converted <see cref="Expression"/>.</returns>
 protected abstract Expression VisitSerializableListInitExpression(SerializableListInitExpression expression);
Example #2
0
 /// <summary>
 /// Visits a <see cref="SerializableListInitExpression"/>.
 /// </summary>
 /// <param name="expression"><see cref="SerializableListInitExpression"/> to visit.</param>
 /// <returns>Returns the converted <see cref="Expression"/>.</returns>
 protected override Expression VisitSerializableListInitExpression(SerializableListInitExpression expression)
 {
     // ReSharper disable AssignNullToNotNullAttribute
     return(Expression.ListInit(Visit(expression.NewExpression) as NewExpression, VisitObjectCollection <ElementInit>(expression.Initializers)));
     // ReSharper restore AssignNullToNotNullAttribute
 }
Example #3
0
 /// <summary>
 /// Visits a <see cref="SerializableListInitExpression"/>.
 /// </summary>
 /// <param name="expression"><see cref="SerializableListInitExpression"/> to visit.</param>
 /// <returns>Returns the converted <see cref="Expression"/>.</returns>
 protected override Expression VisitSerializableListInitExpression(SerializableListInitExpression expression)
 {
     return(Expression.ListInit(Visit(expression.NewExpression) as NewExpression, VisitObjectCollection <ElementInit>(expression.Initializers)));
 }
 private Expression VisitListInit(SerializableListInitExpression li)
 {
     return(Expression.ListInit((NewExpression)Visit(li.NewExpression), VisitElementInitSequence(li.Initializers)));
 }