Describes enums.
Internal members protected for testability.
Inheritance: ScopedElementTranslationUnit, ITranslationUnit, ICompoundTranslationUnit, ITranslationInjector
Exemplo n.º 1
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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }