private void GenerateCode()
        {
            var templateContract = this.TemplateProvider;
            List <TemplateViewModel> templatesToRun = this.TemplateList.GetSelectedTemplates();

            foreach (var template in templatesToRun)
            {
                List <KeyValuePair <string, string> > criteria = this.TemplateProvider.GetTemplateCriteria();
                criteria.Add(new KeyValuePair <string, string>("ProcedureName", "testproc"));

                string processedTemplateText = TemplateGenerationEngine.ProcessTemplate(template.FullFileName, criteria);
                //string processedTemplateText = TemplateGenerationEngine.ProcessTemplate(@"C:\Users\jrussell\SkyDrive\Code\Projects\TalTek\CodeGEN\Templates\SQL\selectlist.tt", criteria);

                TextViewer tv = new TextViewer(processedTemplateText);
                tv.Title = template.TemplateName;
                tv.ShowDialog();
            }

            //if (this.OutputToScreen)
            //{
            //    TextViewer tv = new TextViewer(processedTemplateText);
            //    tv.Title = procName;
            //    tv.ShowDialog();
            //}
        }
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            StringBuilder sb      = new StringBuilder();
            var           ilBytes = ((ILDelta)objectProvider.GetObject()).Value;
            var           viewer  = new TextViewer(ilBytes.GetMethodIL(), "IL");

            viewer.ShowDialog();
        }
Beispiel #3
0
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            var stream = objectProvider.GetData();
            var reader = new StreamReader(stream);
            var text   = reader.ReadToEnd();

            var viewer = new TextViewer(text, "IL");

            viewer.ShowDialog();
        }
Beispiel #4
0
        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            StringBuilder sb  = new StringBuilder();
            var           pdb = (PdbDelta)objectProvider.GetObject();
            string        xml = PdbToXmlConverter.DeltaPdbToXml(pdb.Stream, Enumerable.Range(0x06000001, 0xff));

            var viewer = new TextViewer(xml, "PDB");

            viewer.ShowDialog();
        }
        unsafe protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            var md     = (MetadataDelta)objectProvider.GetObject();
            var writer = new StringWriter();

            fixed(byte *ptr = md.Bytes)
            {
                var reader     = new MetadataReader(ptr, md.Bytes.Length, MetadataReaderOptions.ApplyWindowsRuntimeProjections);
                var visualizer = new MetadataVisualizer(reader, writer);

                visualizer.Visualize();
            }

            var viewer = new TextViewer(writer.ToString(), "Metadata");

            viewer.ShowDialog();
        }