diff --git a/Convention/[Runtime]/File.cs b/Convention/[Runtime]/File.cs index 82e4102..e9631ce 100644 --- a/Convention/[Runtime]/File.cs +++ b/Convention/[Runtime]/File.cs @@ -11,7 +11,7 @@ namespace Convention { private string FullPath; private FileSystemInfo OriginInfo; - private FileStream OriginControlStream; + public FileStream OriginControlStream { get; private set; } public ToolFile(string path) { FullPath = path; diff --git a/Convention/[Symbolization]/Reader/Reader.cs b/Convention/[Symbolization]/Reader/Reader.cs new file mode 100644 index 0000000..7b30999 --- /dev/null +++ b/Convention/[Symbolization]/Reader/Reader.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Convention.Symbolization.Internal +{ + internal class Reader + { + private ToolFile FileCore; + + public Reader(string file) + { + FileCore = new(file); + if (FileCore.Exists() == false) + throw new FileNotFoundException($"{file} not exists"); + FileCore.Open(FileMode.Open); + } + + public SymbolizationContext BuildContext() + { + SymbolizationContext context = new(); + using StreamReader reader = new(FileCore.OriginControlStream); + for (; reader.EndOfStream==false;) + { + var line = reader.ReadLine(); + } + } + } +} diff --git a/Convention/[Symbolization]/Symbolization.cs b/Convention/[Symbolization]/Symbolization.cs new file mode 100644 index 0000000..c373b52 --- /dev/null +++ b/Convention/[Symbolization]/Symbolization.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Convention.Symbolization +{ + public sealed class SymbolizationContext + { + public SymbolizationContext() { } + public SymbolizationContext(SymbolizationContext forward) + { + ParentContext = forward; + } + + private readonly SymbolizationContext ParentContext; + + public void Execute(string commandsBlock) + { + + } + } + + public sealed class SymbolizationCore + { + internal SymbolizationCore(Internal.Reader reader) + { + + } + + public SymbolizationContext Context { get; private set; } + + } + + public static class Symbolization + { + public static SymbolizationCore Build(string file) + { + return new SymbolizationCore(new(file)); + } + + public static SymbolizationContext Execute(string commandsBlock) + { + SymbolizationContext context = new(); + context.Execute(commandsBlock); + return context; + } + + public static SymbolizationContext Execute(SymbolizationContext forward,string commandsBlock) + { + SymbolizationContext context = new(forward); + context.Execute(commandsBlock); + return context; + } + } +}