Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
InternalProcessing.cs
1using System;
2using System.Collections.Generic;
3using Waher.Events;
6
8{
13 {
14 private readonly string uri;
15 private bool responseReturned = false;
16
21 public InternalProcessing(string Uri)
22 : base()
23 {
24 this.uri = Uri;
25 }
26
34 public override void Error(EDalerUriErrorType ErrorType, string ErrorMessage, bool LogAsNotice)
35 {
36 if (!this.responseReturned)
37 {
38 this.responseReturned = true;
39
40 if (LogAsNotice)
41 {
42 Log.Notice(ErrorMessage, string.Empty, string.Empty, "InternalPayment",
43 new KeyValuePair<string, object>("ErrorType", ErrorType),
44 new KeyValuePair<string, object>("URI", this.uri));
45 }
46 else
47 {
48 Log.Error(ErrorMessage, string.Empty, string.Empty, "InternalPayment",
49 new KeyValuePair<string, object>("ErrorType", ErrorType),
50 new KeyValuePair<string, object>("URI", this.uri));
51 }
52
53 base.Error(ErrorType, ErrorMessage, LogAsNotice);
54 }
55 }
56
63 public override void Error(string ErrorType, string ErrorXml, string ErrorMessage)
64 {
65 if (!this.responseReturned)
66 {
67 this.responseReturned = true;
68
69 Log.Error(ErrorMessage, string.Empty, string.Empty, "InternalPayment",
70 new KeyValuePair<string, object>("ErrorType", ErrorType),
71 new KeyValuePair<string, object>("URI", this.uri));
72
73 base.Error(ErrorType, ErrorXml, ErrorMessage);
74 }
75 }
76
81 public override void Error(Exception Exception)
82 {
83 if (!this.responseReturned)
84 {
85 this.responseReturned = true;
86
87 Log.Critical(this.ErrorMessage, string.Empty, string.Empty, "InternalPayment",
88 new KeyValuePair<string, object>("ErrorType", this.ErrorType),
89 new KeyValuePair<string, object>("URI", this.uri));
90
91 base.Error(Exception);
92 }
93 }
94
99 public override void Result(string Xml)
100 {
101 if (!this.responseReturned)
102 {
103 this.responseReturned = true;
104 base.Result(Xml);
105 }
106 }
107
111 public override XmppAddress For => null;
112
117
122
126 public override bool Relayed => false;
127
128 }
129}
Static class managing the application event log. Applications and services log events on this static ...
Definition: Log.cs:13
static void Critical(string Message, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, string StackTrace, params KeyValuePair< string, object >[] Tags)
Logs a critical event.
Definition: Log.cs:1017
static void Error(string Message, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, string StackTrace, params KeyValuePair< string, object >[] Tags)
Logs an error event.
Definition: Log.cs:682
static void Notice(string Message, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, string StackTrace, params KeyValuePair< string, object >[] Tags)
Logs a notice event.
Definition: Log.cs:450
Contains information about one XMPP address.
Definition: XmppAddress.cs:9
Represents a case-insensitive string.
static readonly CaseInsensitiveString Empty
Empty case-insensitive string
string ErrorMessage
Error message, or null if no error.
InternalProcessing(string Uri)
Current state of URI from internal source
override void Result(string Xml)
Reports a positive result.
override void Error(EDalerUriErrorType ErrorType, string ErrorMessage, bool LogAsNotice)
Reports an error with the URI
override void Error(string ErrorType, string ErrorXml, string ErrorMessage)
Reports an error with the URI
override CaseInsensitiveString OriginalSender
Who the original sender of the URI is.
override void Error(Exception Exception)
Reports an error with the URI
override CaseInsensitiveString Sender
Who the sender of the URI is.