protected ITranslationUnit type; // Can be null #endregion Fields #region Constructors /// <summary> /// Copy initializes a new instance of the <see cref="VariableDeclarationTranslationUnit"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public VariableDeclarationTranslationUnit(VariableDeclarationTranslationUnit other) : base(other) { this.type = other.type; this.names = other.names; this.expressions = other.expressions; this.shouldRenderDeclarationKeyword = other.shouldRenderDeclarationKeyword; }
/// <summary> /// Copy initializes a new instance of the <see cref="VariableDeclarationTranslationUnit"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public VariableDeclarationTranslationUnit(VariableDeclarationTranslationUnit other) : base(other) { this.type = other.type; this.names = other.names; this.expressions = other.expressions; this.shouldRenderDeclarationKeyword = other.shouldRenderDeclarationKeyword; }
/// <summary> /// /// </summary> /// <returns></returns> public static LocalDeclarationStatementTranslationUnit Create(VariableDeclarationTranslationUnit variableDeclaration) { if (variableDeclaration == null) { throw new ArgumentNullException(nameof(variableDeclaration)); } return(new LocalDeclarationStatementTranslationUnit(AutomaticNestingLevel) { variableDeclaration = variableDeclaration }); }
/// <summary> /// /// </summary> /// <returns></returns> public static LocalDeclarationStatementTranslationUnit Create(VariableDeclarationTranslationUnit variableDeclaration) { if (variableDeclaration == null) { throw new ArgumentNullException(nameof(variableDeclaration)); } return new LocalDeclarationStatementTranslationUnit(AutomaticNestingLevel) { variableDeclaration = variableDeclaration }; }
/// <summary> /// Initializes a new instance of the <see cref="ArgumentDefinitionTranslationUnit"/> class. /// </summary> /// <param name="typeName"></param> /// <param name="name"></param> protected ArgumentDefinitionTranslationUnit(ITranslationUnit typeName, ITranslationUnit name) { this.variableDeclaration = VariableDeclarationTranslationUnit.Create(typeName, name, null, false); }
public static MockedVariableDeclarationTranslationUnit Create(VariableDeclarationTranslationUnit variableDeclarationTranslationUnit) { return new MockedVariableDeclarationTranslationUnit(variableDeclarationTranslationUnit); }
protected MockedVariableDeclarationTranslationUnit(VariableDeclarationTranslationUnit original) : base(original) { }
/// <summary> /// Copy initializes a new instance of the <see cref="LocalDeclarationStatementTranslationUnit"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public LocalDeclarationStatementTranslationUnit(LocalDeclarationStatementTranslationUnit other) : base(other) { this.variableDeclaration = other.variableDeclaration; }
/// <summary> /// Initializes a new instance of the <see cref="LocalDeclarationStatementTranslationUnit"/> class. /// </summary> /// <param name="nestingLevel"></param> protected LocalDeclarationStatementTranslationUnit(int nestingLevel) : base(nestingLevel) { this.variableDeclaration = null; }