public void Format(FormatEntityContext <TEntity> context) { var value = _property.GetProperty(context.Entity); if (value.HasValue) { _formatter.Format(context.CreateValueContext(value)); } }
public void Format(FormatEntityContext <TEntity> context) { var value = _property.GetProperty(context.Entity); if (value.HasValue) { _entityFormatter.Format(context, value.Value); } }
public TextSlice GetSlice(TEntity entity) { var value = _property.GetProperty(entity); if (value.HasValue) { return(_entityMap.GetSlice(value.Value)); } return(Slice.Empty); }
public TextSlice GetSlice(TEntity entity) { var value = _property.GetProperty(entity); if (value.IsPresent && value.HasValue) { string text; if (_formatter.TryGetString(value, out text)) { return(new StringSlice(new StringText(text))); } } return(Slice.Empty); }
public void Format(FormatEntityContext <TEntity> context) { var value = _property.GetProperty(context.Entity); if (value.HasValue) { if (value.Slice is ParsedTextSlice) { context.Append(value.Slice); } else { _formatter.Format(context.CreateValueContext(value)); } } }
public void Format(FormatEntityContext <TEntity> context) { var value = _property.GetProperty(context.Entity); if (value.HasValue) { for (int i = 0;; i++) { Value <TValue> currentValue; if (!value.TryGetValue(i, out currentValue) || !value.IsPresent) { break; } if (value.HasValue) { _formatter.Format(context.CreateValueContext(currentValue)); } } } }