Describes enums.
Internal members protected for testability.
Inheritance: ScopedElementTranslationUnit, ITranslationUnit, ICompoundTranslationUnit, ITranslationInjector
        /// <summary>
        /// Copy initializes a new instance of the <see cref="EnumTranslationUnit"/> class.
        /// </summary>
        /// <param name="other"></param>
        /// <remarks>
        /// For testability.
        /// </remarks>
        public EnumTranslationUnit(EnumTranslationUnit other)
            : base(other)
        {
            this.Name = other.Name;
            this.members = other.members;

            this.injectedBefore = other.injectedBefore;
        }
Beispiel #2
0
        /// <summary>
        /// Copy initializes a new instance of the <see cref="EnumTranslationUnit"/> class.
        /// </summary>
        /// <param name="other"></param>
        /// <remarks>
        /// For testability.
        /// </remarks>
        public EnumTranslationUnit(EnumTranslationUnit other)
            : base(other)
        {
            this.Name    = other.Name;
            this.members = other.members;

            this.injectedBefore = other.injectedBefore;
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EnumASTWalker"/> class.
        /// </summary>
        /// <param name="node"></param>
        /// <param name="interfaceDeclaration"></param>
        /// <param name="semanticModel">The semantic model.</param>
        protected EnumASTWalker(CSharpSyntaxNode node, EnumTranslationUnit enumDeclaration, SemanticModel semanticModel)
            : base(node, semanticModel)
        {
            var enumSyntaxNode = node as EnumDeclarationSyntax;
            if (enumSyntaxNode == null)
            {
                throw new ArgumentException(
                    string.Format("Specified node is not of type {0}",
                    typeof(EnumDeclarationSyntax).Name));
            }

            if (enumDeclaration == null)
            {
                throw new ArgumentNullException(nameof(enumDeclaration));
            }

            this.enumDeclaration = enumDeclaration;
        }
Beispiel #4
0
 /// <summary>
 /// Copy initializes a new instance of the <see cref="EnumASTWalker"/> class.
 /// </summary>
 /// <param name="other"></param>
 /// <remarks>
 /// For testability.
 /// </remarks>
 public EnumASTWalker(EnumASTWalker other)
     : base(other)
 {
     this.enumDeclaration = other.enumDeclaration;
 }