Class describing a method signature (no body).
Inheritance: NestedElementTranslationUnit, ITranslationUnit
        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;
        }
Ejemplo n.º 3
0
        /// <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)
 {
 }
Ejemplo n.º 8
0
 /// <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;
 }
Ejemplo n.º 9
0
 /// <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;
 }
 /// <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;
 }
 /// <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;
 }