/
Service.svc.cs
42 lines (32 loc) · 1.24 KB
/
Service.svc.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace CallContextNotWorking
{
//[EndpointBehaviuor] - Uncomment if you want to resolve the defect.
// This will enable the CallContextResetInspector.cs that will reset
// CallContext on every request.
public class Service : IService
{
private const string LookupKey = "Infomation";
public string GetPaymentDetails()
{
var data = CallContextWrapper.Get<DataItem>(LookupKey);
if (data != null)
{
return "(GetPaymentDetails) CallContext already has \"DataItem\" set!. The value is " + data.Id;
}
data = new DataItem() { Id = "GetPaymentDetails" };
CallContextWrapper.Set(LookupKey, data);
return "OK";
}
public string GetCardDetails()
{
var data = CallContextWrapper.Get<DataItem>(LookupKey);
if (data != null)
{
return "(GetCardDetails) CallContext already has \"DataItem\" set!. The value is " + data.Id;
}
data = new DataItem() { Id = "GetCardDetails" };
CallContextWrapper.Set(LookupKey, data);
return "OK";
}
}
}