ICloneable c = (ICloneable)message;
IBaseMessage outMsg = (IBaseMessage)c.Clone();
streamOut.Position = 0;
outMsg.BodyPart.Data = streamOut;
// Clean up resources
pipelineContext.ResourceTracker.AddResource(outMsg.BodyPart.Data);
return outMsg;
ICloneable c = (ICloneable)message;
IBaseMessage outMsg = (IBaseMessage)c.Clone();
streamOut.Position = 0;
outMsg.BodyPart.Data = streamOut;
// Clean up resources
pipelineContext.ResourceTracker.AddResource(outMsg.BodyPart.Data);
return outMsg;
转载于:https://www.cnblogs.com/upzone/archive/2009/02/06/1385303.html