示例#1
0
 static SyntaxNode AddParameterTypeIfNotExists(SyntaxNode root, string parameterTypeName)
 {
     return(root.AddTypeDeclarationIfNotExists(parameterTypeName,
                                               () => SyntaxFactory.ClassDeclaration(parameterTypeName)
                                               .Public()
                                               .Static()));
 }
示例#2
0
 static SyntaxNode AddBaseParameterInterfaceIfNotExists(SyntaxNode documentRoot, string baseInterfaceName)
 {
     documentRoot = documentRoot.AddTypeDeclarationIfNotExists(baseInterfaceName, () =>
                                                               SyntaxFactory
                                                               .InterfaceDeclaration(baseInterfaceName)
                                                               .Public());
     return(documentRoot);
 }
示例#3
0
 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)))));
 }