public string Resolve(PropertyName property) { if (property.IsConditionless()) { return(null); } if (!property.Name.IsNullOrEmpty()) { return(property.Name); } if (property.Expression != null && !property.CacheableExpression) { return(Resolve(property.Expression, property.Property)); } if (Properties.TryGetValue(property, out var propertyName)) { return(propertyName); } propertyName = Resolve(property.Expression, property.Property, true); Properties.TryAdd(property, propertyName); return(propertyName); }
internal string Resolve(PropertyName property) { if (property.IsConditionless()) { return(null); } if (!property.Name.IsNullOrEmpty()) { return(property.Name); } string f; if (this.Properties.TryGetValue(property, out f)) { return(f); } f = this.Resolve(property.Expression, property.Property); this.Properties.TryAdd(property, f); return(f); }
public string Resolve(PropertyName property) { if (property.IsConditionless()) { return(null); } if (!property.Name.IsNullOrEmpty()) { return(property.Name); } string propertyName; if (this.Properties.TryGetValue(property, out propertyName)) { return(propertyName); } propertyName = this.Resolve(property.Expression, property.Property, true); this.Properties.TryAdd(property, propertyName); return(propertyName); }
public string PropertyName(PropertyName property) { if (property.IsConditionless()) { return(null); } var name = !property.Name.IsNullOrEmpty() ? property.Name : property.Expression != null ? this.FieldResolver.Resolve(property.Expression) : property.Property != null ? this.FieldResolver.Resolve(property.Property) : null; if (name == null) { throw new ArgumentException("Could not resolve a property name"); } return(name); }
public string Resolve(PropertyName property) { if (property.IsConditionless()) { return(null); } if (!property.Name.IsNullOrEmpty()) { if (property.Name.Contains(".")) { throw new ArgumentException("Property names cannot contain dots."); } return(property.Name); } string f; if (this.Properties.TryGetValue(property, out f)) { return(f); } f = this.Resolve(property.Expression, property.Property, true); this.Properties.TryAdd(property, f); return(f); }