Esempio n. 1
0
        public static string getValueFromBuffer(string sKey)
        {
            var result = MongoDBHelpers.getBufferValue(sKey);

            if (result == null)
            {
                throw new KeyNotFoundException($"[getValueFromBuffer] Not found buffer key: {sKey}");
            }
            return(result);
        }
Esempio n. 2
0
        public static string processWithBuffer(string param)
        {
            if (param == null)
            {
                return(null);
            }
            string sValue = param;

            if (Regex.Match(param, @"^@.*@$").Success)
            {
                var sKey      = param.Substring(1, param.Length - 2);
                var tempValue = MongoDBHelpers.getBufferValue(sKey);
                if (tempValue != null)
                {
                    sValue = tempValue;
                }
                else
                {
                    throw new KeyNotFoundException($"[processWithBuffer] Not found buffer key: {sKey}");
                }
            }
            return(sValue);
        }