Microsoft.Azure.Amqp.AmqpDebug.AmqpDebugImpl.Log C# (CSharp) Method

Log() public static method

public static Log ( object source, bool send, Performative command ) : void
source object
send bool
command Microsoft.Azure.Amqp.Framing.Performative
return void
            public static void Log(object source, bool send, Performative command)
            {
                AmqpDebugImpl instance = AmqpDebugImpl.GetInstance(source);
                ulong code = command.DescriptorCode;
                uint p1 = 0;
                uint p2 = 0;
                if (code == Transfer.Code)
                {
                    Transfer transfer = (Transfer)command;
                    p1 = transfer.DeliveryId ?? 0;
                    p2 = transfer.Settled() ? 1u : 0u;
                }
                else if (code == Disposition.Code)
                {
                    Disposition disp = (Disposition)command;
                    p1 = disp.First ?? 0;
                    p2 = disp.Last ?? p1;
                }
                else if (code == Flow.Code)
                {
                    Flow flow = (Flow)command;
                    p1 = flow.IncomingWindow ?? 0;
                    p2 = flow.NextIncomingId ?? 0;
                    if (flow.Handle.HasValue)
                    {
                        instance.LogInternal(send, code, flow.DeliveryCount.Value, flow.LinkCredit.Value);
                    }
                }

                instance.LogInternal(send, code, p1, p2);
            }

Same methods

AmqpDebug.AmqpDebugImpl::Log ( object source, bool send, ulong code, uint p1, uint p2 ) : void