Пример #1
0
        public void TestClean()
        {
            string dllPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            var dllFile = new FileInfo(dllPath);
            var projDir = dllFile.Directory.Parent.Parent;
            var samplesDirPath = projDir.FullName + @"\Samples";
            var samplePath = samplesDirPath + @"\AchResponse.cs";
            var outputPath = samplesDirPath + @"\AchResponse_Clean.cs";

            var cleaner = new WcfCleaner();
            cleaner.Clean(samplePath, outputPath);
        }
Пример #2
0
        private void cleanup_Button_Click(object sender, EventArgs ev)
        {
            string source = stripDoubleQuotes(textBox1.Text);
            string output;
            if (checkBox1.Checked)
                output = source;
            else
                output = stripDoubleQuotes(textBox2.Text);

            if (!File.Exists(source))
            {
                status_Label.Text = "Source file does not exist.";
                return;
            }

            status_Label.Text = "Cleaning...";

            Task.Factory.StartNew(() => {
                var cleaner = new WcfCleaner();
                cleaner.Clean(source, output);

                status_Label.Invoke(new Action(() => {
                    status_Label.Text = "Done.";
                }));
            });
        }