/// <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; }
/// <summary> /// Creates the translation unit. /// </summary> /// <remarks> /// Must return a type inheriting from <see cref="EnumTranslationUnit"/>. /// </remarks> /// <param name="visibility"></param> /// <param name="name"></param> /// <returns></returns> protected virtual ITranslationUnit CreateTranslationUnit(ModifierTokens visibility, ITranslationUnit name) { return(EnumTranslationUnit.Create(visibility, name)); }
/// <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; }
public static MockedEnumTranslationUnit Create(EnumTranslationUnit enumTranslationUnit) { return new MockedEnumTranslationUnit(enumTranslationUnit); }
protected MockedEnumTranslationUnit(EnumTranslationUnit original) : base(original) { }
public static MockedEnumTranslationUnit Create(EnumTranslationUnit enumTranslationUnit) { return(new MockedEnumTranslationUnit(enumTranslationUnit)); }
protected MockedEnumTranslationUnit(EnumTranslationUnit original) : base(original) { }