/// <summary>
 /// Initializes a new instance of the <see cref="CodeReturnValueSwitchSectionStatement"/> class.
 /// </summary>
 /// <param name="label">The label<see cref="CodeSwitchSectionLabelExpression"/></param>
 /// <param name="returnStatement">The returnStatement<see cref="CodeMethodReturnStatement"/></param>
 /// <param name="bodyStatements">The bodyStatements<see cref="CodeStatement[]"/></param>
 public CodeReturnValueSwitchSectionStatement(CodeSwitchSectionLabelExpression label,
                                              CodeMethodReturnStatement returnStatement,
                                              params CodeStatement[] bodyStatements)
 {
     Label           = label;
     BodyStatements  = bodyStatements == null ? new CodeStatementCollection() : new CodeStatementCollection(bodyStatements);
     ReturnStatement = returnStatement;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeBreakSwitchSectionStatement"/> class.
 /// </summary>
 /// <param name="label">The label<see cref="CodeSwitchSectionLabelExpression"/></param>
 /// <param name="bodyStatements">The bodyStatements<see cref="CodeStatement[]"/></param>
 public CodeBreakSwitchSectionStatement(CodeSwitchSectionLabelExpression label, params CodeStatement[] bodyStatements)
 {
     Label          = label;
     BodyStatements = bodyStatements == null ? new CodeStatementCollection() : new CodeStatementCollection(bodyStatements);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeReturnValueSwitchSectionStatement"/> class.
 /// </summary>
 public CodeReturnValueSwitchSectionStatement()
 {
     Label           = new CodeSwitchSectionLabelExpression();
     ReturnStatement = new CodeMethodReturnStatement();
     BodyStatements  = new CodeStatementCollection();
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeBreakSwitchSectionStatement"/> class.
 /// </summary>
 /// <param name="bodyStatements">The bodyStatements<see cref="CodeStatementCollection"/></param>
 /// <param name="label">The label<see cref="CodeSwitchSectionLabelExpression"/></param>
 public CodeBreakSwitchSectionStatement(CodeStatementCollection bodyStatements, CodeSwitchSectionLabelExpression label)
 {
     BodyStatements = bodyStatements;
     Label          = label;
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeBreakSwitchSectionStatement"/> class.
 /// </summary>
 public CodeBreakSwitchSectionStatement()
 {
     Label          = new CodeSwitchSectionLabelExpression();
     BodyStatements = new CodeStatementCollection();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeFallThroughSwitchSectionStatement"/> class.
 /// </summary>
 /// <param name="label">The label<see cref="CodeSwitchSectionLabelExpression"/></param>
 public CodeFallThroughSwitchSectionStatement(CodeSwitchSectionLabelExpression label)
 {
     Label = label;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeFallThroughSwitchSectionStatement"/> class.
 /// </summary>
 public CodeFallThroughSwitchSectionStatement()
 {
     Label = new CodeSwitchSectionLabelExpression();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeDefaultBreakSwitchSectionStatement"/> class.
 /// </summary>
 public CodeDefaultBreakSwitchSectionStatement()
 {
     Label          = new CodeSwitchSectionLabelExpression(new CodeVariableReferenceExpression("default"));
     BodyStatements = new CodeStatementCollection();
 }