示例#1
0
 /// <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;
 }
示例#2
0
 /// <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;
 }
示例#3
0
 public override void Visit(StateInitializer stateInitializer)
 {
 }
示例#4
0
        /// <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);
        }