SetField() public method

Sets the field.
public SetField ( Field field, object value, SitecoreFieldConfiguration config, SitecoreDataMappingContext context ) : void
field Field The field.
value object The value.
config Glass.Mapper.Sc.Configuration.SitecoreFieldConfiguration The config.
context SitecoreDataMappingContext The context.
return void
Exemplo n.º 1
0
        /// <summary>
        /// Sets the field.
        /// </summary>
        /// <param name="field">The field.</param>
        /// <param name="value">The value.</param>
        /// <param name="config">The config.</param>
        /// <param name="context">The context.</param>
        public override void SetField(Sitecore.Data.Fields.Field field, object value, SitecoreFieldConfiguration config, SitecoreDataMappingContext context)
        {
            if (value == null)
            {
                field.Value = string.Empty;
                return;
            }

            _baseMapper.SetField(field, (T)value, config, context);
        }