Created
May 16, 2016 13:16
-
-
Save mkorman/adb4e760e959aed57562b8b5571ce961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
namespace SfQuery | |
{ | |
public class Program | |
{ | |
private static SalesforceClient CreateClient() | |
{ | |
return new SalesforceClient | |
{ | |
Username = ConfigurationManager.AppSettings["username"], | |
Password = ConfigurationManager.AppSettings["password"], | |
Token = ConfigurationManager.AppSettings["token"], | |
ClientId = ConfigurationManager.AppSettings["clientId"], | |
ClientSecret = ConfigurationManager.AppSettings["clientSecret"] | |
}; | |
} | |
static void Main(string[] args) | |
{ | |
var client = CreateClient(); | |
if (args.Length > 0) | |
{ | |
client.Login(); | |
Console.WriteLine(client.Query(args[0])); | |
} | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment