Ejemplo n.º 1
0
        public void Format(FormatEntityContext <TEntity> context)
        {
            var value = _property.GetProperty(context.Entity);

            if (value.HasValue)
            {
                _formatter.Format(context.CreateValueContext(value));
            }
        }
Ejemplo n.º 2
0
        public void Format(FormatEntityContext <TEntity> context)
        {
            var value = _property.GetProperty(context.Entity);

            if (value.HasValue)
            {
                _entityFormatter.Format(context, value.Value);
            }
        }
Ejemplo n.º 3
0
        public TextSlice GetSlice(TEntity entity)
        {
            var value = _property.GetProperty(entity);

            if (value.HasValue)
            {
                return(_entityMap.GetSlice(value.Value));
            }

            return(Slice.Empty);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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));
                }
            }
        }
Ejemplo n.º 6
0
        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));
                    }
                }
            }
        }