| | | 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; |
| | | 5 | | |
| | | 6 | | namespace CoreWCF.Description |
| | | 7 | | { |
| | | 8 | | public class FaultDescription |
| | | 9 | | { |
| | | 10 | | private XmlName _name; |
| | | 11 | | |
| | 162 | 12 | | public FaultDescription(string action) |
| | | 13 | | { |
| | 162 | 14 | | Action = action ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(action)); |
| | 162 | 15 | | } |
| | | 16 | | |
| | 324 | 17 | | public string Action { get; internal set; } |
| | | 18 | | |
| | | 19 | | // Not serializable on purpose, metadata import/export cannot |
| | | 20 | | // produce it, only available when binding to runtime |
| | 492 | 21 | | public Type DetailType { get; set; } |
| | | 22 | | |
| | | 23 | | public string Name |
| | | 24 | | { |
| | 0 | 25 | | get { return _name.EncodedName; } |
| | 0 | 26 | | set { SetNameAndElement(new XmlName(value, true /*isEncoded*/)); } |
| | | 27 | | } |
| | | 28 | | |
| | 324 | 29 | | public string Namespace { get; set; } |
| | | 30 | | |
| | 444 | 31 | | internal XmlName ElementName { get; set; } |
| | | 32 | | |
| | 0 | 33 | | internal bool HasProtectionLevel => false; |
| | | 34 | | |
| | | 35 | | internal void SetNameAndElement(XmlName name) |
| | | 36 | | { |
| | 30 | 37 | | ElementName = _name = name; |
| | 30 | 38 | | } |
| | | 39 | | |
| | | 40 | | internal void SetNameOnly(XmlName name) |
| | | 41 | | { |
| | 132 | 42 | | _name = name; |
| | 132 | 43 | | } |
| | | 44 | | } |
| | | 45 | | } |