Class ContextualSubjectMatcherProvider
Creates matchers for contextual subjects by splitting the subject value into words and matching the words in any order.
Implements
Namespace: Singulink.Cryptography
Assembly: Singulink.Cryptography.PasswordMatcher.dll
Syntax
public class ContextualSubjectMatcherProvider : IContextualSubjectMatcherProvider
Remarks
Values are split on the provider's delimiters, and additionally where the case changes from lower to upper and where letters change to digits or back, so that "MikeSmith", "mike_smith" and "mike1985" all yield the word "mike". Parts shorter than two characters are discarded.
Email subjects have their top-level domain removed, and website subjects have their protocol, "www." prefix, top-level domain and path removed before being split, so that "[email protected]" matches "mikem", "singulink", "mikemsingulink" or "singulinkmikem" but not "com".
Constructors
| Name | Description |
|---|---|
| ContextualSubjectMatcherProvider() | Initializes a new instance of the ContextualSubjectMatcherProvider class with the default delimiters. |
| ContextualSubjectMatcherProvider(IEnumerable<char>) | Initializes a new instance of the ContextualSubjectMatcherProvider class with the given delimiters. |
Properties
| Name | Description |
|---|---|
| Default | Gets the default provider, which splits subjects on spaces, commas, periods, dashes, underscores, plus signs, colons, semicolons and "@" characters. |
| Delimiters | Gets the characters that subject values are split into words on. |
Methods
| Name | Description |
|---|---|
| GetMatcher(ContextualSubject) | Gets a matcher for the given subject, or null if the subject has no value worth matching. |