public static VkSdkEnvironment SetAccessToken(this VkSdkEnvironment environment, string accessToken)
        {
            if (string.IsNullOrWhiteSpace(accessToken))
            {
                throw new ArgumentException(nameof(accessToken));
            }

            environment.AccessToken = accessToken;

            return(environment);
        }
Example #2
0
        private static void Main()
        {
            Console.WriteLine(CurrentVersion);

            VkSdkProvider.GetSame()
            .Authorize(new AuthorizationData(AccessToken));

            Environment = VkSdkProvider.GetSame()
                          .GetEnvironment();

            Console.WriteLine(Environment.AccessToken);

            Console.ReadKey();
        }
 public static VkSdkEnvironment GetClone(this VkSdkEnvironment environment)
 {
     return(environment.Clone() as VkSdkEnvironment);
 }
        public static VkSdkEnvironment Clear(this VkSdkEnvironment environment)
        {
            environment.AccessToken = string.Empty;

            return(environment);
        }