Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PushNotificationRule.cs
3using Waher.Script;
4
6{
10 [CollectionName("PushNotificationRules")]
11 [TypeName(TypeNameSerialization.None)]
12 [Index("BareJid", "MessageType", "LocalName", "Namespace")]
14 {
15 private Expression patternMatchingExpression;
16 private Expression contentExpression;
17
21 [ObjectId]
22 public string ObjectId { get; set; }
23
27 public CaseInsensitiveString BareJid { get; set; }
28
32 public string MessageType { get; set; }
33
37 public string LocalName { get; set; }
38
42 public string Namespace { get; set; }
43
47 public string Channel { get; set; }
48
52 public string MessageVariable { get; set; }
53
57 public string PatternMatchingScript { get; set; }
58
62 public string ContentScript { get; set; }
63
68 {
69 get
70 {
71 if (this.patternMatchingExpression is null && !string.IsNullOrEmpty(this.PatternMatchingScript))
72 this.patternMatchingExpression = new Expression(this.PatternMatchingScript);
73
74 return this.patternMatchingExpression;
75 }
76 }
77
82 {
83 get
84 {
85 if (this.contentExpression is null && !string.IsNullOrEmpty(this.ContentScript))
86 this.contentExpression = new Expression(this.ContentScript);
87
88 return this.contentExpression;
89 }
90 }
91 }
92}
string Namespace
Namespace of XML content element in message
string PatternMatchingScript
Pattern-matching script used to extract information from the message being forwarded.
Expression PatternMatchingExpression
Parsed pattern-matching expression
string ContentScript
Content-building script to use when building content to include in notification message.
string MessageVariable
Variable to put the Message XML in, before patternmatching or content script is executed.
string LocalName
Local Name of XML content element in message
Represents a case-insensitive string.
Class managing a script expression.
Definition: Expression.cs:39
MessageType
Type of message received.
Definition: MessageType.cs:7
TypeNameSerialization
How the type name should be serialized.