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 DateTimeExtentions | |
{ | |
public static string ToDateTimeHighPrecision(this DateTime source) | |
{ | |
return source.ToString("MM/dd/yyyy h:mm:ss.fff tt"); | |
} | |
} |
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
[HttpGet("GetAllCommandHandlers")] | |
public async Task<IEnumerable<string>> GetAllCommandHandlers() | |
{ | |
var genericType = typeof(ICommandHandler<>); | |
var types = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()) | |
.Where(t => t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition().Equals(genericType))) | |
.Select(x => $"{x.FullName}.{x.Name}").ToList(); | |
var genericTypeWithResult = typeof(ICommandHandler<,>); | |
var typesWithresult = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()) |
OlderNewer