示例#1
0
        static void Main(string[] args)
        {
            var dte            = new DateTime(2019, 10, 27, 1, 30, 0, DateTimeKind.Utc);
            var visualizerHost = new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost(dte, typeof(Visualizer), typeof(VisualizerObjectSource));

            visualizerHost.ShowVisualizer();
        }
示例#2
0
        private static void LoadVisualizer()
        {
            //string xmlDoc = "<?xml version=\"1.0\"?><bookstore xmlns=\"urn:bookstore-schema\"><book><title>test 123</title><author><first-name>Benjamin</first-name><last-name>Franklin</last-name></author></book><book genre=\"novel\"><title>The Confidence Man</title><author><first-name>Herman</first-name><last-name>Melville</last-name></author><price>11.99</price></book><book genre=\"philosophy\"><title>The Gorgias</title><author><first-name>Herman</first-name><last-name>Melville</last-name></author><price>9.99</price></book></bookstore>";
            string xmlDoc = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><catalog><cd country=\"USA\"><title>Empire Burlesque</title><artist>Bob Dylan</artist><price>10.90</price></cd><cd country=\"UK\"><title>Hide your heart</title><artist>Bonnie Tyler</artist><price>10.0</price></cd><cd country=\"USA\"><title>Greatest Hits</title><artist>Dolly Parton</artist><price>9.90</price></cd></catalog>";

            Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost host = new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost(xmlDoc, typeof(XmlVisualizer.DebugVisualizer));
            host.ShowVisualizer();
        }
        private static void LoadVisualizer()
        {
            //string xmlDoc = "<?xml version=\"1.0\"?><bookstore xmlns=\"urn:bookstore-schema\"><book><title>test 123</title><author><first-name>Benjamin</first-name><last-name>Franklin</last-name></author></book><book genre=\"novel\"><title>The Confidence Man</title><author><first-name>Herman</first-name><last-name>Melville</last-name></author><price>11.99</price></book><book genre=\"philosophy\"><title>The Gorgias</title><author><first-name>Herman</first-name><last-name>Melville</last-name></author><price>9.99</price></book></bookstore>";
            string xmlDoc = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><catalog><cd country=\"USA\"><title>Empire Burlesque</title><artist>Bob Dylan</artist><price>10.90</price></cd><cd country=\"UK\"><title>Hide your heart</title><artist>Bonnie Tyler</artist><price>10.0</price></cd><cd country=\"USA\"><title>Greatest Hits</title><artist>Dolly Parton</artist><price>9.90</price></cd></catalog>";

            Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost host = new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost(xmlDoc, typeof(XmlVisualizer.DebugVisualizer));
            host.ShowVisualizer();
        }