コード例 #1
0
        /// <summary>
        ///     Given the specific product and version and actionName
        /// </summary>
        /// <param name="product"></param>
        /// <param name="version"></param>
        /// <param name="sectionName"></param>
        /// <returns>Specific API read timeout</returns>
        public static int GetSpecificApiReadTimeoutValue(string product, string version, string actionName)
        {
            if (string.IsNullOrEmpty(product) || string.IsNullOrEmpty(version) || string.IsNullOrEmpty(actionName))
            {
                return(0);
            }

            return(TimeoutConfig.Get(product, version, actionName) * 1000);
        }
コード例 #2
0
        public int GetSpecificApiReadTimeoutValue(string product, string version, string actionName)
        {
            if (string.IsNullOrEmpty(product) || string.IsNullOrEmpty(version) || string.IsNullOrEmpty(actionName))
            {
                return(0);
            }

            var jsonData = currentJsonData;

            if (jsonData[product] == null ||
                jsonData[product][version] == null ||
                jsonData[product][version][actionName] == null)
            {
                return(0);
            }

            // return jsonData[product][version][actionName].ToObject<int>() * 1000;
            return(TimeoutConfig.Get(product, version, actionName) * 1000);
        }