/** * <summary> * Wraps log request into a protocol message.</summary> * * <param name="req">Log request that need to be wrapped.</param> * <returns>Wrapped message.</returns> */ private static ProtoRequest WrapLogRequest(GridClientLogRequest req) { ProtoLogRequest.Builder builder = ProtoLogRequest.CreateBuilder() .SetFrom(req.From) .SetTo(req.To); if (req.Path != null) { builder.SetPath(req.Path); } return(WrapRequest(req, builder.Build())); }
/** * <summary> * Wraps log request into a protocol message.</summary> * * <param name="req">Log request that need to be wrapped.</param> * <returns>Wrapped message.</returns> */ private static GridClientLogRequest WrapLogRequest(ProtoRequest req) { ProtoLogRequest data = ProtoLogRequest.ParseFrom(req.Body); GridClientLogRequest bean = new GridClientLogRequest(Guid.Empty); if (data.HasPath) { bean.Path = data.Path; } if (data.HasFrom) { bean.From = data.From; } if (data.HasTo) { bean.To = data.To; } return(WrapRequest(bean, req)); }