MicrosoftTranslatorSdk.HttpSamples.AdmAuthentication.AdmAuthentication C# (CSharp) Method

AdmAuthentication() public method

public AdmAuthentication ( string clientId, string clientSecret ) : System
clientId string
clientSecret string
return System
        public AdmAuthentication(string clientId, string clientSecret)
        {
            this.clientId = clientId;
            this.cientSecret = clientSecret;
            //If clientid or client secret has special characters, encode before sending request
            this.request = string.Format("grant_type=client_credentials&client_id={0}&client_secret={1}&scope=http://api.microsofttranslator.com", HttpUtility.UrlEncode(clientId), HttpUtility.UrlEncode(clientSecret));
        }