Skip to content

Instantly share code, notes, and snippets.

@mkorman
Created May 16, 2016 13:16
Show Gist options
  • Save mkorman/adb4e760e959aed57562b8b5571ce961 to your computer and use it in GitHub Desktop.
Save mkorman/adb4e760e959aed57562b8b5571ce961 to your computer and use it in GitHub Desktop.
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