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); }
public static void Log(object source, bool send, ulong code, uint p1, uint p2) { AmqpDebugImpl instance = AmqpDebugImpl.GetInstance(source); instance.LogInternal(send, code, p1, p2); }