NServiceBus.Validations.AssertIsValidForReply C# (CSharp) Method

AssertIsValidForReply() public method

public AssertIsValidForReply ( Type messageType ) : void
messageType System.Type
return void
        public void AssertIsValidForReply(Type messageType)
        {
            if (conventions.IsInSystemConventionList(messageType))
            {
                return;
            }
            if (!conventions.IsCommandType(messageType) && !conventions.IsEventType(messageType))
            {
                return;
            }
            throw new Exception("Reply is neither supported for Commands nor Events. Commands should be sent to their logical owner. Events should be published.");
        }