static SyntaxNode AddParameterTypeIfNotExists(SyntaxNode root, string parameterTypeName) { return(root.AddTypeDeclarationIfNotExists(parameterTypeName, () => SyntaxFactory.ClassDeclaration(parameterTypeName) .Public() .Static())); }
static SyntaxNode AddBaseParameterInterfaceIfNotExists(SyntaxNode documentRoot, string baseInterfaceName) { documentRoot = documentRoot.AddTypeDeclarationIfNotExists(baseInterfaceName, () => SyntaxFactory .InterfaceDeclaration(baseInterfaceName) .Public()); return(documentRoot); }
static SyntaxNode AddVertexClassDeclarationIfNotExists(SyntaxNode documentRoot, StateMachineModel.VertexClass vertex, string baseInterfaceName) { return(documentRoot.AddTypeDeclarationIfNotExists(vertex.ClassName, () => SyntaxFactory.ClassDeclaration(vertex.ClassName).Public() .AddBaseListTypes(SyntaxFactory.SimpleBaseType(SyntaxFactory.ParseTypeName(baseInterfaceName))))); }