1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------
4 namespace System.ServiceModel.Activities.Dispatcher
5 {
6     using System.Globalization;
7     using System.ServiceModel;
8     using System.ServiceModel.Channels;
9     using System.Xml;
10     using SR2 = System.ServiceModel.Activities.SR;
11 
12     class DurableDispatcherAddressingFault : MessageFault
13     {
14         FaultCode faultCode;
15         FaultReason faultReason;
16 
DurableDispatcherAddressingFault()17         public DurableDispatcherAddressingFault()
18         {
19             this.faultCode = FaultCode.CreateSenderFaultCode(XD2.ContextHeader.MissingContextHeader, XD2.ContextHeader.Namespace);
20             this.faultReason = new FaultReason(new FaultReasonText(SR2.CurrentOperationCannotCreateInstance, CultureInfo.CurrentCulture));
21         }
22 
23         public override FaultCode Code
24         {
25             get
26             {
27                 return this.faultCode;
28             }
29         }
30 
31         public override bool HasDetail
32         {
33             get
34             {
35                 return false;
36             }
37         }
38 
39         public override FaultReason Reason
40         {
41             get
42             {
43                 return this.faultReason;
44             }
45         }
46 
OnWriteDetailContents(XmlDictionaryWriter writer)47         protected override void OnWriteDetailContents(XmlDictionaryWriter writer)
48         {
49             throw FxTrace.Exception.AsError(new NotImplementedException());
50         }
51     }
52 }
53