public static void ConvertToCSharp(DirectoryInfo apexLocation, DirectoryInfo cSharpLocation, string nameSpace) { if (!apexLocation.Exists) { throw new DirectoryNotFoundException(apexLocation.FullName); } if (!cSharpLocation.Exists) { throw new DirectoryNotFoundException(cSharpLocation.FullName); } // Convert APEX to C# ApexSharpParser.ConvertToCSharp(apexLocation.FullName, cSharpLocation.FullName, nameSpace); }
public static void ConvertToCSharp() { // Location of your APEX and C# Files that we will be converting DirectoryInfo apexLocation = new DirectoryInfo(@"\ApexSharp\SalesForce\src\classes\"); DirectoryInfo cSharpLocation = new DirectoryInfo(@"\ApexSharp\Demo\CSharpClasses\"); //// Convert APEX to C# if (apexLocation.Exists && cSharpLocation.Exists) { ApexSharpParser.ConvertToCSharp(apexLocation.FullName, cSharpLocation.FullName, "Demo.CSharpClasses"); } else { Console.WriteLine("Missing Directory"); } }