public static AmpMessage CreateResponseMessage(string requestId) { var data = requestId.Split('|'); AmpMessage message = new AmpMessage() { ServiceId = ushort.Parse(data[0]), MessageId = ushort.Parse(data[1]), InvokeMessageType = InvokeMessageType.Response }; return(message); }
private static void AddAuditLog(ILogger writer, IAuditLoggerFormat <AmpMessage> format, AuditLogType logType, IRpcContext context, AmpMessage req, AmpMessage rsp, long elapsedMS) { if (writer == null || format == null) { return; } var entity = new AuditLogEntity() { Context = context, Request = req, Response = rsp, ElapsedMS = elapsedMS, Writer = writer, Formater = format, LogType = logType }; logDict.Enqueue(entity); StartWrite(); }
public void PushResponse(AmpMessage response) { _rsp = response; }
public void PushRequest(AmpMessage request) { _req = request; }