When working with network protocols (like AMQP, NFS, or SMB), maintain the integrity of the original protocol data structures during serialization, deserialization, and transformation operations. Modifying protocol-specific data can lead to unintended changes in the service contract and unexpected behavior for clients.

For message-based protocols:

Example from AMQP handling:

// Incorrect: Directly modifying protocol data
amqpMessage.Properties.ContentType = normalizedContentType; // Mutates original AMQP data

// Correct: Keep protocol representation intact, normalize only in your model
EventData eventData = new EventData(amqpMessage);
eventData.ContentType = normalizedContentType; // Only the .NET projection is affected

For file transfer protocols: