Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using System;
  2. using Vk.CSharp.Sdk.External;
  3. using Vk.CSharp.Sdk.Global.Models;
  4.  
  5. namespace Vk.CSharp.Sdk.App.Source
  6. {
  7. internal class Program
  8. {
  9. private static string AccessToken =>
  10. "access_token";
  11.  
  12. private static void Main()
  13. {
  14. VkApiProvider
  15. .GetVkApi()
  16. .Authorize(new AuthorizationData(AccessToken));
  17.  
  18. Console.WriteLine(
  19. VkApiProvider
  20. .GetVkApi()
  21. .GetEnvironment()
  22. .Version
  23. );
  24.  
  25. Console.WriteLine(
  26. VkApiProvider
  27. .GetVkApi()
  28. .GetEnvironment()
  29. .AccessToken
  30. );
  31.  
  32. Console.WriteLine(
  33. ReferenceEquals(VkApiProvider.GetAccount(), VkApiProvider.GetVkApi().GetAccount())
  34. );
  35.  
  36. var account = VkApiProvider.GetAccount();
  37.  
  38. Console.WriteLine(
  39. ReferenceEquals(VkApiProvider.GetAccount(), account)
  40. );
  41.  
  42. Console.WriteLine(account.GetEnvironment().AccessToken);
  43.  
  44. Console.ReadKey();
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement