MessageBodyDescription.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Description / MessageBodyDescription.cs / 1 / MessageBodyDescription.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------
using System;
using System.ServiceModel.Channels; 
using System.Collections.Generic;
using System.Text; 
using System.Runtime.Serialization; 

namespace System.ServiceModel.Description 
{
    public class MessageBodyDescription
    {
        private XmlName wrapperName; 
        private string wrapperNs;
        private MessagePartDescriptionCollection parts; 
        private MessagePartDescription returnValue; 

        public MessageBodyDescription() 
        {
            parts = new MessagePartDescriptionCollection();
        }
 
        internal MessageBodyDescription(MessageBodyDescription other)
        { 
            this.WrapperName = other.WrapperName; 
            this.WrapperNamespace = other.WrapperNamespace;
            this.parts = new MessagePartDescriptionCollection(); 
            foreach (MessagePartDescription mpd in other.Parts)
            {
                this.Parts.Add(mpd.Clone());
            } 
            if (other.ReturnValue != null)
            { 
                this.ReturnValue = other.ReturnValue.Clone(); 
            }
        } 

        internal MessageBodyDescription Clone()
        {
            return new MessageBodyDescription(this); 
        }
 
        public MessagePartDescriptionCollection Parts 
        {
            get { return parts; } 
        }

        public MessagePartDescription ReturnValue
        { 
            get { return returnValue; }
            set { returnValue = value; } 
        } 

        public string WrapperName 
        {
            get { return wrapperName == null ? null : wrapperName.EncodedName; }
            set { wrapperName = new XmlName(value, true /*isEncoded*/); }
        } 

        public string WrapperNamespace 
        { 
            get { return wrapperNs; }
            set { wrapperNs = value; } 
        }

    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK