public override string ToString() { if (_rhs != null) { return(_lhs.ToString() + _operation + _rhs); } return(_lhs.ToString()); }
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); }
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); }
public override string ToString() { return(_expression.ToString()); }