This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CustomSmtpAppender : SmtpAppender | |
| { | |
| public PatternLayout SubjectLayout { get; set; } | |
| protected override void SendBuffer(LoggingEvent[] events) | |
| { | |
| PrepareSubject(events); | |
| base.SendBuffer(events); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class AutoMapperExtensions | |
| { | |
| public static IMappingExpression<TSource, TDestination> | |
| IgnoreAllNonExisting<TSource, TDestination>(this IMappingExpression<TSource, TDestination> expression) | |
| { | |
| var sourceType = typeof(TSource); | |
| var destinationType = typeof(TDestination); | |
| var existingMaps = Mapper.GetAllTypeMaps().First(x => x.SourceType.Equals(sourceType) && x.DestinationType.Equals(destinationType)); | |
| foreach (var property in existingMaps.GetUnmappedPropertyNames()) | |
| { |