void DeepCopy()

in src/AmqpMessage.cs [642:697]


        void DeepCopy(AmqpMessage source)
        {
            if (source.header != null)
            {
                this.header = new Header();
                this.header.Durable = source.header.Durable;
                this.header.Priority = source.header.Priority;
                this.header.Ttl = source.header.Ttl;
                this.header.FirstAcquirer = source.header.FirstAcquirer;
                this.header.DeliveryCount = source.header.DeliveryCount;
            }

            if (source.deliveryAnnotations != null)
            {
                this.deliveryAnnotations = new DeliveryAnnotations();
                this.deliveryAnnotations.Map.Merge(source.deliveryAnnotations.Map);
            }

            if (source.messageAnnotations != null)
            {
                this.messageAnnotations = new MessageAnnotations();
                this.messageAnnotations.Map.Merge(source.messageAnnotations.Map);
            }

            if (source.applicationProperties != null)
            {
                this.applicationProperties = new ApplicationProperties();
                this.applicationProperties.Map.Merge(source.applicationProperties.Map);
            }

            if (source.properties != null)
            {
                this.properties = new Properties();
                this.properties.MessageId = source.properties.MessageId;
                this.properties.UserId = source.properties.UserId;
                this.properties.To = source.properties.To;
                this.properties.Subject = source.properties.Subject;
                this.properties.ReplyTo = source.properties.ReplyTo;
                this.properties.CorrelationId = source.properties.CorrelationId;
                this.properties.ContentType = source.properties.ContentType;
                this.properties.ContentEncoding = source.properties.ContentEncoding;
                this.properties.AbsoluteExpiryTime = source.properties.AbsoluteExpiryTime;
                this.properties.CreationTime = source.properties.CreationTime;
                this.properties.GroupId = source.properties.GroupId;
                this.properties.GroupSequence = source.properties.GroupSequence;
                this.properties.ReplyToGroupId = source.properties.ReplyToGroupId;
            }

            if (source.footer != null)
            {
                this.footer = new Footer();
                this.footer.Map.Merge(source.footer.Map);
            }

            this.sectionFlags |= (source.sectionFlags & SectionFlag.NonBody);
        }