Advertisement
Guest User

Untitled

a guest
May 16th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. using System;
  2. using System.Configuration;
  3.  
  4. namespace SfQuery
  5. {
  6. public class Program
  7. {
  8. private static SalesforceClient CreateClient()
  9. {
  10. return new SalesforceClient
  11. {
  12. Username = ConfigurationManager.AppSettings["username"],
  13. Password = ConfigurationManager.AppSettings["password"],
  14. Token = ConfigurationManager.AppSettings["token"],
  15. ClientId = ConfigurationManager.AppSettings["clientId"],
  16. ClientSecret = ConfigurationManager.AppSettings["clientSecret"]
  17. };
  18. }
  19.  
  20. static void Main(string[] args)
  21. {
  22. var client = CreateClient();
  23.  
  24. if (args.Length > 0)
  25. {
  26. client.Login();
  27. Console.WriteLine(client.Query(args[0]));
  28. }
  29. Console.ReadLine();
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement