![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
A Topic Selector is a mechanism for selecting topics either by name or by a topic selector pattern. More...
Public Types | |
enum | SelectorType { SelectorType.ALL, SelectorType.NAME, SelectorType.PATTERN, SelectorType.PATTERNS } |
Public Member Functions | |
bool | IsSimpleTopicNameSelector () |
Is the selector a simple topic name selector that selects only a named topic and not its children? More... | |
bool | SelectsChildren () |
This indicates whether the selector selects the children of any selected topic also. More... | |
abstract bool | IsTopicNameSelector () |
Is the selector a single topic name? More... | |
abstract bool | Matches (string topicName) |
This does a match to check if a specified topic name (or name subset) matches with the selector. More... | |
abstract new SelectorType | GetType () |
override string | ToString () |
Returns the string representation of this object. More... | |
Static Public Member Functions | |
static TopicSelector | Parse (string selector) |
Parses a topic selector. More... | |
static bool | IsTopicName (string name) |
Checks if a supplied string is a valid topic name (as opposed to a topic selector). More... | |
static bool | IsValidSelector (string selector) |
Check if the supplied string is a valid topic selector. This allows for regex metachars in the string, but does not check that the regex is valid. Only regex characters or valid codepoint characters are allowed. Also, the selector cannot start with a name delimiter. More... | |
static bool | IsValidTopicNodeName (string topicName) |
Validates a topic node name to ensure that it does not contain invalid characters. More... | |
Protected Member Functions | |
TopicSelector (string selectorString, bool selectsAllBelow, bool selectsAllInclusive) | |
Constructor. More... | |
Protected Attributes | |
const char | NameDelimiterChar = '/' |
Properties | |
int | HashCode [get, set] |
This allows for efficient equality matching of selectors. More... | |
bool | SelectsAllBelow [get, set] |
Does this topic selector select all topics beneath it? More... | |
bool | SelectsAllInclusive [get, set] |
string | SelectorString [get, set] |
string | Name [get, set] |
A Topic Selector is a mechanism for selecting topics either by name or by a topic selector pattern.
|
protected |
Constructor.
selectorString | |
selectsAllBelow | |
selectsAllInclusive |
|
pure virtual |
bool PushTechnology.DiffusionCore.Messaging.Topic.TopicSelector.IsSimpleTopicNameSelector | ( | ) |
Is the selector a simple topic name selector that selects only a named topic and not its children?
|
static |
Checks if a supplied string is a valid topic name (as opposed to a topic selector).
This validates a full hierarchic topic name (e.g. A/B/C) to ensure that it is correctly structured and each element is a valid topic node name.
name | the hierarchic topic name to validate which can be a simple topic name or a name representing a topic within a topic tree where the individual topic names are separated by topic name delimiters. |
|
pure virtual |
Is the selector a single topic name?
Implemented in PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorName, PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorPatterns, PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorSinglePattern, and PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorAll.
|
static |
Check if the supplied string is a valid topic selector. This allows for regex metachars in the string, but does not check that the regex is valid. Only regex characters or valid codepoint characters are allowed. Also, the selector cannot start with a name delimiter.
selector | The selector string. |
|
static |
Validates a topic node name to ensure that it does not contain invalid characters.
A topic name may comprise any UTF-8 encodable character except ',' '/' or any of the regular expression metacharacters.
This validates a topic node name and not a full hierarchic topic name and thus would reject a name that contained topic name delimiters.
topicName |
|
pure virtual |
This does a match to check if a specified topic name (or name subset) matches with the selector.
topicName | The topic name which must be a valid hierarchic topic name. |
Implemented in PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorName, PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorPatterns, PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorSinglePattern, and PushTechnology.DiffusionCore.Messaging.Topic.TopicSelectorAll.
|
static |
Parses a topic selector.
selector |
bool PushTechnology.DiffusionCore.Messaging.Topic.TopicSelector.SelectsChildren | ( | ) |
This indicates whether the selector selects the children of any selected topic also.
override string PushTechnology.DiffusionCore.Messaging.Topic.TopicSelector.ToString | ( | ) |
Returns the string representation of this object.
|
getset |
This allows for efficient equality matching of selectors.
|
getset |
|
getset |
|
getset |
Does this topic selector select all topics beneath it?
|
getset |