예제 #1
0
        public static SourceCodeUpdater GetSourceCodeUpdater(string path, Dictionary <string, object> context, ILogger <SourceCodeUpdater> logger)
        {
            SyntaxTree        tree = CSharpSyntaxTree.ParseText(File.ReadAllText(path));
            SourceCodeUpdater sourceCodeUpdater = new SourceCodeUpdater(tree, UpdateTemplateCode(context, logger), logger);

            return(sourceCodeUpdater);
        }
예제 #2
0
        public static SyntaxNode SourceCodeUpdate(SourceCodeUpdater sourceCodeUpdater, ILogger logger)
        {
            logger.LogDebug("Start updating source code...");
            var root = sourceCodeUpdater.SourceCodeUpdate();

            logger.LogInformation("Finish updating source code.");
            return(root);
        }