Skip to content

Instantly share code, notes, and snippets.

View gshutler's full-sized avatar
📅
👨‍💻

Garry Shutler gshutler

📅
👨‍💻
View GitHub Profile
public static class ConventionHelper
{
public static string PluralUnderscore(string name)
{
return Underscore(Inflector.Net.Inflector.Pluralize(name));
}
public static string Underscore(string name)
{
return Regex.Replace(name, "([a-z])([A-Z])", "$1_$2").ToLowerInvariant().Trim();
public static class ServiceBusExtensions
{
public static bool HasSubscribersFor<T>(this IServiceBus serviceBus, T message)
{
IEnumerable<Action<object>> enumerable = serviceBus.OutboundPipeline.Enumerate(message);
return enumerable.Any();
}
}