NullObjectMapper.cs 742 B

12345678910111213141516171819202122
  1. using Abp.Dependency;
  2. namespace Abp.ObjectMapping
  3. {
  4. public sealed class NullObjectMapper : IObjectMapper, ISingletonDependency
  5. {
  6. /// <summary>
  7. /// Singleton instance.
  8. /// </summary>
  9. public static NullObjectMapper Instance { get; } = new NullObjectMapper();
  10. public TDestination Map<TDestination>(object source)
  11. {
  12. throw new AbpException("Abp.ObjectMapping.IObjectMapper should be implemented in order to map objects.");
  13. }
  14. public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
  15. {
  16. throw new AbpException("Abp.ObjectMapping.IObjectMapper should be implemented in order to map objects.");
  17. }
  18. }
  19. }