2using System.Collections.Generic;
3using System.Threading.Tasks;
23 : base(
"Legal/ValidatePNr",
24 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
44 string CountryCode = (string)Parameters[
"PCountryCode"].AssociatedObjectValue;
45 string PNr = (string)Parameters[
"PPNr"].AssociatedObjectValue;
53 {
"countrySupported", CountrySupported },
54 {
"isValid", Isvalid },
55 {
"normalized", Normalized }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
Represents an HTTP request.
Represets a response of an HTTP client request.
async Task Return(object Object)
Returns an object to the client. This method can only be called once per response,...
Class managing a script expression.
Personal Number Schemes available in different countries.
static Grade Supports(string CountryCode)
If the validator supports personal numbers from a given country.
static async Task< bool?> IsValid(string CountryCode, string PersonalNumber)
Checks if a personal number is valid, in accordance with registered personal number schemes.
static async Task< string > Normalize(string CountryCode, string PersonalNumber)
Normmalizes a personal number entered in lax mode.
Abstract base class for agent resources supporting the POST method.
static AccountUser AssertUserAuthenticated(HttpRequest Request)
Makes sure the request is made by an authenticated API user.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
Validates (and normalizes) a personal number.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
ValidatePNr()
Validates (and normalizes) a personal number.