예제 #1
0
        private void ConvertFromFileTo()
        {
            ConvertToMYSQL convert = new ConvertToMYSQL(arguments.Source);

            if (arguments.ToServer)
            {
                ExecuteMySQLInstruction(convert.ToString());
            }
            else
            {
                SaveSQLFile(arguments.Target +
                            System.IO.Path.GetFileNameWithoutExtension(arguments.Source)
                            + ".sql", convert.ToString());
            }
        }
예제 #2
0
 private void ConvertFromFolderTo()
 {
     if (arguments.ToServer)
     {
         foreach (string classPath in Directory.EnumerateFiles(arguments.Source, "*.cs",
                                                               arguments.SubFolders ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly))
         {
             ConvertToMYSQL convert = new ConvertToMYSQL(classPath);
             SaveSQLFile(arguments.Target +
                         System.IO.Path.GetFileNameWithoutExtension(classPath)
                         + ".sql", convert.ToString());
         }
     }
     else
     {
         foreach (string classPath in Directory.EnumerateFiles(arguments.Source, "*.cs",
                                                               arguments.SubFolders ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly))
         {
             ConvertToMYSQL convert = new ConvertToMYSQL(classPath);
             ExecuteMySQLInstruction(convert.ToString());
         }
     }
 }