ChatterService.Web.ChatterProxyService.ChatterProxyService C# (CSharp) Method

ChatterProxyService() public method

public ChatterProxyService ( ) : System
return System
        public ChatterProxyService()
        {
            WriteLogToFile("Starting ChatterProxyService");
            url = ConfigurationSettings.AppSettings["SalesForceUrl"];
            userName = ConfigurationSettings.AppSettings["SalesForceUserName"];
            password = ConfigurationSettings.AppSettings["SalesForcePassword"];
            token = ConfigurationSettings.AppSettings["SalesForceToken"];
            clientId = ConfigurationSettings.AppSettings["SalesForceClientId"];
            grantType = ConfigurationSettings.AppSettings["SalesForceGrantType"];
            clientSecret = ConfigurationSettings.AppSettings["SalesForceClientSecret"];
            cacheInterval = Int32.Parse(ConfigurationSettings.AppSettings["CacheInterval"]);
            cacheCapacity = Int32.Parse(ConfigurationSettings.AppSettings["cacheCapacity"]);
            logService = Boolean.Parse(ConfigurationSettings.AppSettings["LogService"]);
            signedFetch = Boolean.Parse(ConfigurationSettings.AppSettings["SignedFetch"]);

            ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(customXertificateValidation);
            profilesService = new ProfilesServices();
            getChatterSoapService();

            if (signedFetch)
            {
                // load default cert
                X509Certificate2 cert = new X509Certificate2(ConfigurationSettings.AppSettings["OAuthCert"]);
                provider = cert.PublicKey.Key;
                signer = new OAuthContextSigner();
                signingContext = new SigningContext();
                //signingContext.ConsumerSecret = ...; // if there is a consumer secret
                signingContext.Algorithm = provider;
            }

            activitiesFetcher = new Timer(GetActivities, null, 0, cacheInterval * 1000);
        }