Suoranta.EnterpriseLib.Web - Developer API

DateTimeConverter Class

AutoMapper type and value converters for date-related system types.

Namespace:  Suoranta.EnterpriseLib.Util.AutoMapper
Assembly:  Suoranta.EnterpriseLib.Base (in Suoranta.EnterpriseLib.Base.dll)

Syntax


public abstract class DateTimeConverter : ITypeConverter<DateTime, DateTimeOffset>, 
	IValueConverter<DateTime, DateTimeOffset>

Remarks


  • Type converters have global scope within the profile. Example registration:
    C#
    CreateMap<string, DateTime>().ConvertUsing(new DateTimeConverter());
  • Value converters are scoped to a single map, and receive the source and destination objects to resolve to a value to map to the destination member. Example registration:
    C#
    .ForMember(src => src.Date, cfg => cfg.ConvertUsing(new DateTimeConverter()));
  • Value resolvers

Inheritance Hierarchy


Object
  Suoranta.EnterpriseLib.Util.AutoMapper..::..DateTimeConverter