Beispiel #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);
        }
        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);
        }