public string FormatEntityName <T>() { if (typeof(T).IsInterface) { return(_defaultEntityNameFormatter.FormatEntityName <T>()); } var eventName = _eventNameProvider.GetEventName <T>(); return(eventName.IsSuccess ? eventName.Value : throw new InvalidOperationException(JsonConvert.SerializeObject(eventName.Error))); }
public Result <string> GetMessageType <TType>() { return(_eventNameProvider.GetEventName <TType>() .OnSuccess(eventName => $"event-namespace:message:{eventName}")); }