Method Create
- Assembly
- MailFathom.Infrastructure.dll
Create(Uri, IEnumerable<string>, double)
Composes the profile a configured analyzer is reached under.
public static PersonalDataAnalyzerProfile Create(Uri endpoint, IEnumerable<string> languages, double minimumConfidence)
Parameters
endpointUriThe analyzer's base address.
languagesIEnumerable<string>The two-letter codes of the languages it is asked in, in any order and with repeats allowed.
minimumConfidencedoubleHow sure the analyzer must be before it reports a finding, from 0 to 1.
Returns
- PersonalDataAnalyzerProfile
The validated profile, carrying the languages deduplicated and ordered.
Remarks
A relative address is refused rather than resolved against something, because there is nothing to resolve it against: a base address is what every call to the analyzer is composed from. A scheme other than HTTP is refused for the same reason a mistyped port would be — the request would never arrive, and startup is where that is worth finding out. An empty set of languages is refused for a sharper reason: a scan states a language on every request, so a deployment asking in none would scan every switched-on category and find nothing in it.
Exceptions
- ArgumentNullException
Thrown when
endpointorlanguagesis null.- ArgumentException
Thrown when the address is not an absolute HTTP address, when no language is named, when one of them is not a two-letter code, or when more than MaximumLanguages are named.
- ArgumentOutOfRangeException
Thrown when
minimumConfidenceis not a number between 0 and 1 inclusive.