示例#1
0
        public void ClaimToken()
        {
            var syncClient = new WebClient();
            var content = syncClient.DownloadString(Properties.Settings.Default.ICMenterTokenURI);

            this.token = JsonConvert.DeserializeObject<ICMeterAccessTokenTemplate.RootObject>(content);

            //Debuging and DEV
            if (Properties.Settings.Default.Debug)
            {
                Console.WriteLine("Token Claimed!");
                Console.ReadKey();
            }   
        }
示例#2
0
        public void ClaimToken()
        {
            var syncClient = new WebClient();
            var content    = syncClient.DownloadString(Properties.Settings.Default.ICMenterTokenURI);

            this.token = JsonConvert.DeserializeObject <ICMeterAccessTokenTemplate.RootObject>(content);

            //Debuging and DEV
            if (Properties.Settings.Default.Debug)
            {
                Console.WriteLine("Token Claimed!");
                Console.ReadKey();
            }
        }