Пример #1
0
        public string GetString(string name)
        {
            name = name.ToLower();
            var returnValue = _dataNvc[name];

            if (returnValue == null && _dataObj != null)
            {
                var obj = ExtendAttributesUtils.Eval(_dataObj, name);
                if (obj != null)
                {
                    if (obj is string)
                    {
                        returnValue = _dataNvc[name] = obj as string;
                    }
                    else
                    {
                        returnValue = _dataNvc[name] = obj.ToString();
                    }
                }
            }

            if (!string.IsNullOrEmpty(returnValue))
            {
                returnValue = ExtendAttributesUtils.UnFilterSql(returnValue);
            }

            return(returnValue ?? string.Empty);
        }
Пример #2
0
        public bool ContainsKey(string name)
        {
            name = name.ToLower();
            var returnValue = _dataNvc[name];

            if (returnValue == null && _dataObj != null)
            {
                var obj = ExtendAttributesUtils.Eval(_dataObj, name);
                if (obj != null)
                {
                    if (obj is string)
                    {
                        returnValue = _dataNvc[name] = obj as string;
                    }
                    else
                    {
                        returnValue = _dataNvc[name] = obj.ToString();
                    }
                }
            }

            return(returnValue != null);
        }