/// <summary> /// Initializes a new instance of the <see cref="StateExpression"/> class. /// </summary> /// <param name="stateType"> /// Type of the state. /// </param> /// <param name="initializer"> /// The initializer. /// </param> public StateExpression(TypeName stateType, StateInitializer initializer) { this.StateType = stateType; this.Initializer = initializer; }
/// <summary> /// Initializes a new instance of the <see cref="StateExpression"/> class. /// </summary> /// <param name="stateType"> /// Type of the state. /// </param> /// <param name="initializer"> /// The initializer. /// </param> public StateExpression(TypeName stateType, StateInitializer initializer) { this.StateType = stateType; this.Initializer = initializer; }
public override void Visit(StateInitializer stateInitializer) { }
/// <inheritdoc /> public override void Visit(StateInitializer stateInitializer) { OpenBrace(); for (int i = 0; i < stateInitializer.Items.Count; i++) { var item = stateInitializer.Items[i]; if (item is StateInitializer && i > 0) { WriteLine(","); } VisitDynamic(item); if (!(item is StateInitializer)) { WriteLine(";"); } } CloseBrace(false); }