Class EventBusPattern
The EventBusPattern describes an event pattern the LambdaSharp EventBus should forward to an app.
Inheritance
Namespace: LambdaSharp.App.EventBus
Assembly: LambdaSharp.App.dll
Syntax
public sealed class EventBusPattern
Properties
Detail
The Detail property sets the event pattern clauses for the 'detail' event property.
Declaration
[JsonPropertyName("detail")]
public object Detail { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
DetailType
The DetailType property sets the event pattern clauses for the 'detail-type' event property.
Declaration
[JsonPropertyName("detail-type")]
public IEnumerable<object> DetailType { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
Resources
The Resources property sets the event pattern clauses for the 'resources' event property.
Declaration
[JsonPropertyName("resources")]
public IEnumerable<object> Resources { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
Source
The Source property sets the event pattern clauses for the 'source' event property.
Declaration
[JsonPropertyName("source")]
public IEnumerable<object> Source { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> |
Methods
AnythingBut(Object)
The AnythingBut(Object) method creates an event pattern clause that matches everything that does not match the nested event pattern clause.
Declaration
public static object AnythingBut(object pattern)
Parameters
Type | Name | Description |
---|---|---|
System.Object | pattern | A nested event pattern clause. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |
Cidr(String)
The Cidr(String) method creates an event pattern clause that checks if an IP address falls within the specified CIDR mask.
Declaration
public static object Cidr(string mask)
Parameters
Type | Name | Description |
---|---|---|
System.String | mask | The CIDR mask to match against. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |
Exists(Boolean)
The Exists(Boolean) method creates an event pattern clauses that matches if a JSON property exists or not.
Declaration
public static object Exists(bool exists)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | exists | Boolean determining when the event pattern clause should match. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |
Numeric(String, Double)
The Numeric(String, Double) method creates an event pattern clauses that matches a numeric condition.
Declaration
public static object Numeric(string operation, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | operation | The numeric compare operation. |
System.Double | value | The numeric value to compare to. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |
Numeric(String, Double, String, Double)
The Numeric(String, Double, String, Double) method creates an event pattern clauses that matches both numeric conditions.
Declaration
public static object Numeric(string firstOperation, double firstValue, string secondOperation, double secondValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | firstOperation | The first numeric compare operation. |
System.Double | firstValue | The first numeric value to compare to. |
System.String | secondOperation | The second numeric compare operation. |
System.Double | secondValue | The second numeric value to compare to. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |
Prefix(String)
The Prefix(String) method creates an event pattern clause that matches the prefix of a literal string value.
Declaration
public static object Prefix(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The string prefix to match. |
Returns
Type | Description |
---|---|
System.Object | An event pattern clause. |