public static StandardRequest WithRequestId()

in src/DotPulsar/Internal/Requests/StandardRequest.cs [37:65]


    public static StandardRequest WithRequestId(ulong requestId)
        => new(requestId, null, null, null);

    public static StandardRequest WithConsumerId(ulong requestId, ulong consumerId, BaseCommand.Type? commandType = null)
        => new(requestId, consumerId, null, commandType);

    public static StandardRequest WithProducerId(ulong requestId, ulong producerId, BaseCommand.Type? commandType = null)
        => new(requestId, null, producerId, commandType);

    public bool SenderIsConsumer(ulong consumerId)
        => _consumerId.HasValue && _consumerId.Value == consumerId;

    public bool SenderIsProducer(ulong producerId)
        => _producerId.HasValue && _producerId.Value == producerId;

    public bool IsCommandType(BaseCommand.Type commandType)
        => _commandType.HasValue && _commandType.Value == commandType;

#if NETSTANDARD2_0
    public bool Equals(IRequest other)
#else
    public bool Equals([AllowNull] IRequest other)
#endif
    {
        if (other is StandardRequest request)
            return _requestId.Equals(request._requestId);

        return false;
    }