예제 #1
0
 public EdgeAnalyzerTest()
 {
     analyzer = new EdgeAnalyzer()
     {
         Assemblies = new HashSet<string>()
         {
             "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
         },
         Namespaces = new HashSet<string>()
         {
             "System",
             "System.Windows",
             "System.Windows.Controls",
             "System.Windows.Data",
             "System.Windows.Documents",
             "System.Windows.Input",
             "System.Windows.Media",
             "System.Windows.Media.Imaging",
             "System.Windows.Navigation",
             "System.Windows.Shapes"
         }
     };
 }
예제 #2
0
 public EdgeAnalyzerTest()
 {
     analyzer = new EdgeAnalyzer()
     {
         Assemblies = new HashSet <string>()
         {
             "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
         },
         Namespaces = new HashSet <string>()
         {
             "System",
             "System.Windows",
             "System.Windows.Controls",
             "System.Windows.Data",
             "System.Windows.Documents",
             "System.Windows.Input",
             "System.Windows.Media",
             "System.Windows.Media.Imaging",
             "System.Windows.Navigation",
             "System.Windows.Shapes"
         }
     };
 }
예제 #3
0
파일: Program.cs 프로젝트: sys27/Edge
        static void Main(string[] args)
        {
            string     text   = File.ReadAllText("MainView.edge");
            EdgeParser parser = new EdgeParser()
            {
                Assemblies = new HashSet <string>()
                {
                    "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                    "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                    "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                    "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                    "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                    "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                    "System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                },
                Namespaces = new HashSet <string>()
                {
                    "System",
                    "System.Windows",
                    "System.Windows.Controls",
                    "System.Windows.Data",
                    "System.Windows.Documents",
                    "System.Windows.Input",
                    "System.Windows.Media",
                    "System.Windows.Media.Imaging",
                    "System.Windows.Navigation",
                    "System.Windows.Shapes"
                }
            };
            var st = parser.Parse(text);
            var a  = new EdgeAnalyzer()
            {
                Assemblies = parser.Assemblies,
                Namespaces = parser.Namespaces
            };

            a.Analyze(st);
            string file = st.Build(new CSharpBuilder(), "MainView", "WPF.Views");

            File.WriteAllText("MainView.cs", file);
        }
예제 #4
0
파일: Program.cs 프로젝트: sys27/Edge
 static void Main(string[] args)
 {
     string text = File.ReadAllText("MainView.edge");
     EdgeParser parser = new EdgeParser()
     {
         Assemblies = new HashSet<string>()
         {
             "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
             "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
             "System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
         },
         Namespaces = new HashSet<string>()
         {
             "System",
             "System.Windows",
             "System.Windows.Controls",
             "System.Windows.Data",
             "System.Windows.Documents",
             "System.Windows.Input",
             "System.Windows.Media",
             "System.Windows.Media.Imaging",
             "System.Windows.Navigation",
             "System.Windows.Shapes"
         }
     };
     var st = parser.Parse(text);
     var a = new EdgeAnalyzer()
     {
         Assemblies = parser.Assemblies,
         Namespaces = parser.Namespaces
     };
     a.Analyze(st);
     string file = st.Build(new CSharpBuilder(), "MainView", "WPF.Views");
     File.WriteAllText("MainView.cs", file);
 }