Example #1
0
        internal static void Init()
        {
            string[] tokenService = ORNGSettings.getSettings().TokenService.Split(':');
            int      min          = ORNGSettings.getSettings().SocketPoolMin;
            int      max          = ORNGSettings.getSettings().SocketPoolMax;
            int      expire       = ORNGSettings.getSettings().SocketPoolExpire;
            int      timeout      = ORNGSettings.getSettings().SocketReceiveTimeout;

            sockets = new SocketConnectionPool(tokenService[0], Int32.Parse(tokenService[1]), min, max, expire, timeout);
        }
        static OpenSocialManager()
        {
            if (ConfigurationManager.AppSettings["OpenSocial.ShindigURL"] == null)
                return;
            string[] tokenService = ConfigurationManager.AppSettings["OpenSocial.TokenService"].ToString().Trim().Split(':');
            int min = Convert.ToInt32(ConfigurationManager.AppSettings["OpenSocial.SocketPoolMin"].ToString());
            int max = Convert.ToInt32(ConfigurationManager.AppSettings["OpenSocial.SocketPoolMax"].ToString());
            int expire = Convert.ToInt32(ConfigurationManager.AppSettings["OpenSocial.SocketPoolExpire"].ToString());
            int timeout = Convert.ToInt32(ConfigurationManager.AppSettings["OpenSocial.SocketReceiveTimeout"].ToString());

            sockets = new SocketConnectionPool(tokenService[0], Int32.Parse(tokenService[1]), min, max, expire, timeout);
        }
        static OpenSocialManager()
        {
            shindigURL = ConfigurationManager.AppSettings["ORNG.ShindigURL"];
            if (shindigURL == null)
            {
                return;
            }
            string[] tokenService = ConfigurationManager.AppSettings["ORNG.TokenService"].ToString().Trim().Split(':');
            int      min          = Convert.ToInt32(ConfigurationManager.AppSettings["ORNG.SocketPoolMin"].ToString());
            int      max          = Convert.ToInt32(ConfigurationManager.AppSettings["ORNG.SocketPoolMax"].ToString());
            int      expire       = Convert.ToInt32(ConfigurationManager.AppSettings["ORNG.SocketPoolExpire"].ToString());
            int      timeout      = Convert.ToInt32(ConfigurationManager.AppSettings["ORNG.SocketReceiveTimeout"].ToString());

            sockets = new SocketConnectionPool(tokenService[0], Int32.Parse(tokenService[1]), min, max, expire, timeout);
        }
        static OpenSocialManager()
        {
            if (ORNGSettings.getSettings().Enabled)
            {
                shindigURL = ORNGSettings.getSettings().ShindigURL;
                features = ORNGSettings.getSettings().Features;

                string[] tokenService = ORNGSettings.getSettings().TokenService.Split(':');
                int min = ORNGSettings.getSettings().SocketPoolMin;
                int max = ORNGSettings.getSettings().SocketPoolMax;
                int expire = ORNGSettings.getSettings().SocketPoolExpire;
                int timeout = ORNGSettings.getSettings().SocketReceiveTimeout;

                sockets = new SocketConnectionPool(tokenService[0], Int32.Parse(tokenService[1]), min, max, expire, timeout);
            }
        }
        static OpenSocialManager()
        {
            if (ORNGSettings.getSettings().Enabled)
            {
                shindigURL = ORNGSettings.getSettings().ShindigURL;
                features = ORNGSettings.getSettings().Features;

                string[] tokenService = ORNGSettings.getSettings().TokenService.Split(':');
                int min = ORNGSettings.getSettings().SocketPoolMin;
                int max = ORNGSettings.getSettings().SocketPoolMax;
                int expire = ORNGSettings.getSettings().SocketPoolExpire;
                int timeout = ORNGSettings.getSettings().SocketReceiveTimeout;

                sockets = new SocketConnectionPool(tokenService[0], Int32.Parse(tokenService[1]), min, max, expire, timeout);
            }
        }