| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System.ComponentModel; |
| | | 5 | | |
| | | 6 | | namespace CoreWCF.Description |
| | | 7 | | { |
| | | 8 | | public class MessageBodyDescription |
| | | 9 | | { |
| | | 10 | | private XmlName _wrapperName; |
| | | 11 | | |
| | 5018 | 12 | | public MessageBodyDescription() |
| | | 13 | | { |
| | 5018 | 14 | | Parts = new MessagePartDescriptionCollection(); |
| | 5018 | 15 | | } |
| | | 16 | | |
| | 80 | 17 | | internal MessageBodyDescription(MessageBodyDescription other) |
| | | 18 | | { |
| | 80 | 19 | | WrapperName = other.WrapperName; |
| | 80 | 20 | | WrapperNamespace = other.WrapperNamespace; |
| | 80 | 21 | | Parts = new MessagePartDescriptionCollection(); |
| | 160 | 22 | | foreach (MessagePartDescription mpd in other.Parts) |
| | | 23 | | { |
| | 0 | 24 | | Parts.Add(mpd.Clone()); |
| | | 25 | | } |
| | | 26 | | |
| | 80 | 27 | | if (other.ReturnValue != null) |
| | | 28 | | { |
| | 0 | 29 | | ReturnValue = other.ReturnValue.Clone(); |
| | | 30 | | } |
| | 80 | 31 | | } |
| | | 32 | | |
| | | 33 | | internal MessageBodyDescription Clone() |
| | | 34 | | { |
| | 80 | 35 | | return new MessageBodyDescription(this); |
| | | 36 | | } |
| | | 37 | | |
| | 69848 | 38 | | public MessagePartDescriptionCollection Parts { get; } |
| | | 39 | | |
| | | 40 | | [DefaultValue(null)] |
| | 79966 | 41 | | public MessagePartDescription ReturnValue { get; set; } |
| | | 42 | | |
| | | 43 | | [DefaultValue(null)] |
| | | 44 | | public string WrapperName |
| | | 45 | | { |
| | 11641 | 46 | | get { return _wrapperName?.EncodedName; } |
| | 10284 | 47 | | set { _wrapperName = new XmlName(value, true /*isEncoded*/); } |
| | | 48 | | } |
| | | 49 | | |
| | | 50 | | [DefaultValue(null)] |
| | 11520 | 51 | | public string WrapperNamespace { get; set; } |
| | | 52 | | } |
| | | 53 | | } |