Class describing a method signature (no body).
Inheritance: NestedElementTranslationUnit, ITranslationUnit
コード例 #1
0
        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;
        }
コード例 #2
0
        /// <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;
        }
コード例 #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
            });
        }
コード例 #4
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
            };
        }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 public static MockedVariableDeclarationTranslationUnit Create(VariableDeclarationTranslationUnit variableDeclarationTranslationUnit)
 {
     return new MockedVariableDeclarationTranslationUnit(variableDeclarationTranslationUnit);
 }
コード例 #7
0
 protected MockedVariableDeclarationTranslationUnit(VariableDeclarationTranslationUnit original)
     : base(original)
 {
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #10
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;
 }
コード例 #11
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;
 }