using System.Collections.Generic; using CTA.Rules.Models.Actions.VisualBasic; using CTA.Rules.Models.Tokens; using CTA.Rules.Models.Tokens.VisualBasic; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.VisualBasic.Syntax; namespace CTA.Rules.Models { public class FileActions { public FileActions() { AttributeActions = new HashSet(); ClassDeclarationActions = new HashSet(); MethodDeclarationActions = new HashSet(); ElementAccessActions = new HashSet(); IdentifierNameActions = new HashSet>(); InvocationExpressionActions = new HashSet>(); // Member and Expression Actions do not need separate Vb models because they act on shared SyntaxNode object ExpressionActions = new HashSet(); MemberAccessActions = new HashSet(); Usingactions = new HashSet(); NamespaceActions = new HashSet>(); ObjectCreationExpressionActions = new HashSet(); PackageActions = new HashSet(); InterfaceDeclarationActions = new HashSet(); NodeTokens = new List(); VbNodeTokens = new List(); VbInvocationExpressionActions = new HashSet>(); VbImportActions = new HashSet(); VbNamespaceActions = new HashSet>(); VbTypeBlockActions = new HashSet(); VbMethodBlockActions = new HashSet(); VbInterfaceBlockActions = new HashSet(); VbAttributeListActions = new HashSet(); VbIdentifierNameActions = new HashSet>(); VbAccessorBlockActions = new HashSet(); VbElementAccessActions = new HashSet(); VbObjectCreationExpressionActions = new HashSet(); VbAttributeActions = new HashSet(); } public HashSet> VbNamespaceActions { get; set; } public HashSet VbImportActions { get; set; } public HashSet> VbInvocationExpressionActions { get; set; } public HashSet> VbIdentifierNameActions { get; set; } public HashSet VbTypeBlockActions { get; set; } public HashSet VbMethodBlockActions { get; set; } public HashSet VbInterfaceBlockActions { get; set; } public HashSet VbAttributeListActions { get; set; } public HashSet VbAccessorBlockActions { get; set; } public HashSet VbObjectCreationExpressionActions { get; set; } public HashSet VbElementAccessActions { get; set; } public HashSet VbAttributeActions { get; set; } public List VbNodeTokens { get; set; } public List NodeTokens { get; set; } public string FilePath { get; set; } public HashSet AttributeActions { get; set; } public HashSet MethodDeclarationActions { get; set; } public HashSet ClassDeclarationActions { get; set; } public HashSet InterfaceDeclarationActions { get; set; } public HashSet ElementAccessActions { get; set; } public HashSet> IdentifierNameActions { get; set; } public HashSet> InvocationExpressionActions { get; set; } public HashSet ExpressionActions { get; set; } public HashSet MemberAccessActions { get; set; } public HashSet ObjectCreationExpressionActions { get; set; } public HashSet Usingactions { get; set; } public HashSet> NamespaceActions { get; set; } public HashSet PackageActions { get; set; } public List AllActions { get { var allActions = new List(); allActions.AddRange(AttributeActions); allActions.AddRange(MethodDeclarationActions); allActions.AddRange(ClassDeclarationActions); allActions.AddRange(InterfaceDeclarationActions); allActions.AddRange(ElementAccessActions); allActions.AddRange(MemberAccessActions); allActions.AddRange(IdentifierNameActions); allActions.AddRange(InvocationExpressionActions); allActions.AddRange(ExpressionActions); allActions.AddRange(Usingactions); allActions.AddRange(ObjectCreationExpressionActions); allActions.AddRange(NamespaceActions); // visual basic actions allActions.AddRange(VbImportActions); allActions.AddRange(VbNamespaceActions); allActions.AddRange(VbInvocationExpressionActions); allActions.AddRange(VbTypeBlockActions); allActions.AddRange(VbMethodBlockActions); allActions.AddRange(VbInterfaceBlockActions); allActions.AddRange(VbAttributeListActions); allActions.AddRange(VbIdentifierNameActions); allActions.AddRange(VbAccessorBlockActions); allActions.AddRange(VbObjectCreationExpressionActions); allActions.AddRange(VbElementAccessActions); allActions.AddRange(VbAttributeActions); return allActions; } } } }