| | | 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.Xml; |
| | | 5 | | |
| | | 6 | | namespace CoreWCF.Description |
| | | 7 | | { |
| | | 8 | | public class MessageHeaderDescription : MessagePartDescription |
| | | 9 | | { |
| | | 10 | | private bool _isUnknownHeader; |
| | | 11 | | |
| | | 12 | | public MessageHeaderDescription(string name, string ns) |
| | 86 | 13 | | : base(name, ns) |
| | | 14 | | { |
| | 86 | 15 | | } |
| | | 16 | | |
| | | 17 | | internal MessageHeaderDescription(MessageHeaderDescription other) |
| | 0 | 18 | | : base(other) |
| | | 19 | | { |
| | 0 | 20 | | MustUnderstand = other.MustUnderstand; |
| | 0 | 21 | | Relay = other.Relay; |
| | 0 | 22 | | Actor = other.Actor; |
| | 0 | 23 | | TypedHeader = other.TypedHeader; |
| | 0 | 24 | | IsUnknownHeaderCollection = other.IsUnknownHeaderCollection; |
| | 0 | 25 | | } |
| | | 26 | | |
| | | 27 | | public override MessagePartDescription Clone() |
| | | 28 | | { |
| | 0 | 29 | | return new MessageHeaderDescription(this); |
| | | 30 | | } |
| | | 31 | | |
| | 98 | 32 | | public string Actor { get; set; } |
| | | 33 | | |
| | 98 | 34 | | public bool MustUnderstand { get; set; } |
| | | 35 | | |
| | 98 | 36 | | public bool Relay { get; set; } |
| | | 37 | | |
| | 200 | 38 | | public bool TypedHeader { get; set; } |
| | | 39 | | |
| | | 40 | | internal bool IsUnknownHeaderCollection |
| | | 41 | | { |
| | | 42 | | get |
| | | 43 | | { |
| | 352 | 44 | | return _isUnknownHeader || Multiple && (Type == typeof(XmlElement)); |
| | | 45 | | } |
| | | 46 | | set |
| | | 47 | | { |
| | 4 | 48 | | _isUnknownHeader = value; |
| | 4 | 49 | | } |
| | | 50 | | } |
| | | 51 | | } |
| | | 52 | | } |