NServiceBus.Conventions.IsInSystemConventionList C# (CSharp) Method

IsInSystemConventionList() public method

Returns true is message is a system message type.
public IsInSystemConventionList ( Type t ) : bool
t System.Type
return bool
        public bool IsInSystemConventionList(Type t)
        {
            Guard.AgainstNull(nameof(t), t);
            return IsSystemMessageActions.Any(isSystemMessageAction => isSystemMessageAction(t));
        }

Usage Example

        static List<Type> GetMessageTypesHandledByThisEndpoint(MessageHandlerRegistry handlerRegistry, Conventions conventions)
        {
            var messageTypesHandled = handlerRegistry.GetMessageTypes()//get all potential messages
                .Where(t => !conventions.IsInSystemConventionList(t)) //never auto-route system messages
                .ToList();

            return messageTypesHandled;
        }
All Usage Examples Of NServiceBus.Conventions::IsInSystemConventionList