示例#1
0
 public override string ToString()
 {
     if (_rhs != null)
     {
         return(_lhs.ToString() + _operation + _rhs);
     }
     return(_lhs.ToString());
 }
示例#2
0
        public virtual bool FillWithAttributes(IJSONDocument source, IJSONDocument target)
        {
            if (source != null && target != null)
            {
                IJsonValue wrapedValue;
                if (_fieldName.ToString().Equals("_key"))
                {
                    if (source.Contains("!_key"))
                    {
                        target.Key = source.GetString("!_key");
                    }
                    else
                    {
                        target.Add("!_key", source.Key);
                    }
                    return(true);
                }

                if (_fieldName.Evaluate(out wrapedValue, source))
                {
                    IAttributeChain attributor = Attributor.Create(Attributor.Delimit(_fieldName.InString, new[] { '$' }));
                    Attributor.TryUpdate(target, wrapedValue.Value, attributor, true);
                    return(true);
                }
            }
            return(false);
        }
示例#3
0
        public bool Apply(Common.Server.Engine.IJSONDocument document)
        {
            var attribute = _targetField as Attribute;

            if (attribute != null)
            {
                return(Attributor.TryRename(document, _newName.ToString(), attribute));
            }
            return(false);
        }
示例#4
0
 public override string ToString()
 {
     return(_expression.ToString());
 }