Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IdentitySummaryFormatter.cs
1using System;
3using System.Globalization;
4using System.Linq;
11
13{
17 public sealed class DisplayQuad
18 {
19 public string Label { get; }
20 public string Value { get; }
21 public string? Mapping { get; }
22 public bool FromField { get; }
23 public bool IsInvalid { get; }
24
25 public DisplayQuad(string Label, string Value, string? Mapping, bool FromField, bool IsInvalid = false)
26 {
27 this.Label = Label;
28 this.Value = Value;
29 this.Mapping = Mapping;
30 this.FromField = FromField;
31 this.IsInvalid = IsInvalid;
32 }
33 }
34
40 public static class IdentitySummaryFormatter
41 {
42 public sealed class AttachmentInfo
43 {
44 public string FileName { get; }
45 public string? ContentType { get; }
46
47 public AttachmentInfo(string FileName, string? ContentType)
48 {
49 this.FileName = FileName;
50 this.ContentType = ContentType;
51 }
52 }
53
54 public sealed class KycSummaryResult
55 {
56 public List<DisplayQuad> Personal { get; } = new List<DisplayQuad>();
57 public List<DisplayQuad> Address { get; } = new List<DisplayQuad>();
58 public List<DisplayQuad> Attachments { get; } = new List<DisplayQuad>();
59 public List<DisplayQuad> CompanyInfo { get; } = new List<DisplayQuad>();
60 public List<DisplayQuad> CompanyAddress { get; } = new List<DisplayQuad>();
61 public List<DisplayQuad> CompanyRepresentative { get; } = new List<DisplayQuad>();
62 }
63
64 public sealed class DisplayField
65 {
66 public string Key { get; }
67 public string Label { get; }
68 public string Value { get; }
69 public bool IsReviewable { get; }
70
71 public DisplayField(string Key, string Label, string Value, bool IsReviewable)
72 {
73 this.Key = Key;
74 this.Label = Label;
75 this.Value = Value;
76 this.IsReviewable = IsReviewable;
77 }
78 }
79
80 public sealed class IdentityGroupsResult
81 {
82 public List<DisplayField> Personal { get; } = new List<DisplayField>();
83 public List<DisplayField> Organization { get; } = new List<DisplayField>();
84 public List<DisplayField> Technical { get; } = new List<DisplayField>();
85 public List<DisplayField> Other { get; } = new List<DisplayField>();
86 }
87
91 public static KycSummaryResult BuildKycSummaryFromProperties(IEnumerable<Property> Properties,
92 KycProcess Process,
93 IEnumerable<AttachmentInfo>? Attachments = null,
94 CultureInfo? Culture = null,
95 ISet<string>? InvalidMappings = null)
96 {
97 CultureInfo EffectiveCulture = Culture ?? CultureInfo.CurrentCulture;
98
99 Dictionary<string, string> LabelMap = GetLabelMap();
100
101 // Classification sets
102 HashSet<string> PersonalKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
103 {
113 Constants.XmppProperties.EMail
114 };
115
116 HashSet<string> AddressKeys = new(StringComparer.OrdinalIgnoreCase)
117 {
124 Constants.XmppProperties.Country
125 };
126
127 HashSet<string> CompanyInfoKeys = new(StringComparer.OrdinalIgnoreCase)
128 {
133 "ORGTRADENAME"
134 };
135
136 HashSet<string> CompanyAddressKeys = new(StringComparer.OrdinalIgnoreCase)
137 {
144 Constants.XmppProperties.OrgCountry
145 };
146
147 HashSet<string> CompanyRepresentativeKeys = new(StringComparer.OrdinalIgnoreCase)
148 {
149 "ORGREPNAME",
150 "ORGREPCPF",
151 "ORGREPBDATE",
152 "ORGREPRG",
153 "ORGEMAIL",
154 "ORGPHONE"
155 };
156
157 // Prepare dictionary for quick lookup
158 Dictionary<string, string> Dict = new(StringComparer.OrdinalIgnoreCase);
159 foreach (Property P in Properties ?? Array.Empty<Property>())
160 {
161 if (P is null)
162 continue;
163
164 string Name = P.Name ?? string.Empty;
165 string Value = P.Value ?? string.Empty;
166 if (string.IsNullOrWhiteSpace(Name) || string.IsNullOrWhiteSpace(Value))
167 continue;
168
169 Dict[Name] = Value.Trim();
170 }
171
172 // Compose BirthDate if we have parts
173 string DayStr = Get(Dict, Constants.XmppProperties.BirthDay);
174 string MonthStr = Get(Dict, Constants.XmppProperties.BirthMonth);
175 string YearStr = Get(Dict, Constants.XmppProperties.BirthYear);
176
177 if (int.TryParse(DayStr, out int Day) && int.TryParse(MonthStr, out int Month) && int.TryParse(YearStr, out int Year))
178 {
179 try
180 {
181 DateTime BirthDate = new(Year, Month, Day);
182 Dict[Constants.CustomXmppProperties.BirthDate] = BirthDate.ToString("D", EffectiveCulture);
183 }
184 catch (Exception Ex)
185 {
186 ServiceRef.LogService.LogException(Ex);
187 }
188 }
189
190 // Compose Company Representative BirthDate if we have parts
191 DayStr = Get(Dict, "ORGREPBDAY");
192 MonthStr = Get(Dict, "ORGREPBMONTH");
193 YearStr = Get(Dict, "ORGREPBYEAR");
194
195 if (int.TryParse(DayStr, out Day) && int.TryParse(MonthStr, out Month) && int.TryParse(YearStr, out Year))
196 {
197 try
198 {
199 DateTime BirthDate = new(Year, Month, Day);
200 Dict["ORGREPBDATE"] = BirthDate.ToString("d", EffectiveCulture);
201 }
202 catch (Exception Ex)
203 {
204 ServiceRef.LogService.LogException(Ex);
205 }
206 }
207
208 KycSummaryResult Result = new();
209
210 // Personal
211 foreach (string Key in PersonalKeys)
212 {
213 if (Key.Equals(Constants.XmppProperties.BirthDay, StringComparison.OrdinalIgnoreCase) ||
214 Key.Equals(Constants.XmppProperties.BirthMonth, StringComparison.OrdinalIgnoreCase) ||
215 Key.Equals(Constants.XmppProperties.BirthYear, StringComparison.OrdinalIgnoreCase))
216 {
217 continue;
218 }
219
220 if (!Dict.TryGetValue(Key, out string? Val) || string.IsNullOrWhiteSpace(Val))
221 continue;
222
223 string Label = GetLabel(LabelMap, Key);
224
225 if (Key.Equals(Constants.XmppProperties.Nationality, StringComparison.OrdinalIgnoreCase))
226 Val = ISO_3166_1.ToName(Val) ?? Val;
227
228 if (Key.Equals(Constants.XmppProperties.Gender, StringComparison.OrdinalIgnoreCase))
229 {
230 string Normalized = Val.Trim().ToUpperInvariant();
231 string ResourceKey = Normalized switch
232 {
233 "M" or "MALE" => nameof(AppResources.Male),
234 "F" or "FEMALE" => nameof(AppResources.Female),
235 _ => nameof(AppResources.Other)
236 };
237 Microsoft.Extensions.Localization.LocalizedString Localized = ServiceRef.Localizer[ResourceKey, false];
238 if (!Localized.ResourceNotFound)
239 Val = Localized.Value;
240 }
241
242 bool IsInvalid = InvalidMappings?.Contains(Key) ?? false;
243 Result.Personal.Add(new DisplayQuad(Label, Val, Key, Process.HasMapping(Key), IsInvalid));
244 }
245
246 // Address
247 foreach (string Key in AddressKeys)
248 {
249 if (!Dict.TryGetValue(Key, out string? Val) || string.IsNullOrWhiteSpace(Val))
250 continue;
251
252
253 string Label = GetLabel(LabelMap, Key);
254
255 if (Key.Equals(Constants.XmppProperties.Country, StringComparison.OrdinalIgnoreCase))
256 Val = ISO_3166_1.ToName(Val) ?? Val;
257
258 bool IsInvalid = InvalidMappings?.Contains(Key) ?? false;
259 Result.Address.Add(new DisplayQuad(Label, Val, Key, Process.HasMapping(Key), IsInvalid));
260 }
261
262 // Company Info
263 foreach (string Key in CompanyInfoKeys)
264 {
265 if (!Dict.TryGetValue(Key, out string? Val) || string.IsNullOrWhiteSpace(Val))
266 continue;
267
268 string Label = GetLabel(LabelMap, Key);
269 bool IsInvalid = InvalidMappings?.Contains(Key) ?? false;
270 Result.CompanyInfo.Add(new DisplayQuad(Label, Val, Key, Process.HasMapping(Key), IsInvalid));
271 }
272
273 // Company Address
274 foreach (string Key in CompanyAddressKeys)
275 {
276 if (!Dict.TryGetValue(Key, out string? Val) || string.IsNullOrWhiteSpace(Val))
277 continue;
278
279 string Label = GetLabel(LabelMap, Key);
280 bool IsInvalid = InvalidMappings?.Contains(Key) ?? false;
281 Result.CompanyAddress.Add(new DisplayQuad(Label, Val, Key, Process.HasMapping(Key), IsInvalid));
282 }
283
284 // Company Representative
285 foreach (string Key in CompanyRepresentativeKeys)
286 {
287 if (!Dict.TryGetValue(Key, out string? Val) || string.IsNullOrWhiteSpace(Val))
288 continue;
289 string Label = GetLabel(LabelMap, Key);
290 bool IsInvalid = InvalidMappings?.Contains(Key) ?? false;
291 Result.CompanyRepresentative.Add(new DisplayQuad(Label, Val, Key, Process.HasMapping(Key), IsInvalid));
292 }
293
294 // Attachments
295 if (Attachments is not null)
296 {
297 foreach (AttachmentInfo Att in Attachments)
298 {
299 if (string.IsNullOrEmpty(Att.FileName))
300 continue;
301
302 string Base = Att.FileName.Split('.')[0];
303
304 string Description;
305 switch (Base)
306 {
307 case "Passport":
308 {
309 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_Passport), false];
310 Description = L.ResourceNotFound ? Base : L.Value;
311 break;
312 }
313 case "IdCardFront":
314 {
315 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_IdCardFront), false];
316 Description = L.ResourceNotFound ? Base : L.Value;
317 break;
318 }
319 case "IdCardBack":
320 {
321 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_IdCardBack), false];
322 Description = L.ResourceNotFound ? Base : L.Value;
323 break;
324 }
325 case "DriverLicenseFront":
326 {
327 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_DriverLicenseFront), false];
328 Description = L.ResourceNotFound ? Base : L.Value;
329 break;
330 }
331 case "DriverLicenseBack":
332 {
333 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_DriverLicenseBack), false];
334 Description = L.ResourceNotFound ? Base : L.Value;
335 break;
336 }
337 case "ProfilePhoto":
338 {
339 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_ProfilePhoto), false];
340 Description = L.ResourceNotFound ? Base : L.Value;
341 break;
342 }
343 case "ORGAOA":
344 {
345 Microsoft.Extensions.Localization.LocalizedString L = ServiceRef.Localizer[nameof(AppResources.Attachment_ArticleOfAssociation), false];
346 Description = L.ResourceNotFound ? Base : L.Value;
347 break;
348 }
349 default:
350 Description = Att.FileName;
351 break;
352 }
353
354 bool IsInvalid = InvalidMappings?.Contains(Base) ?? false;
355 Result.Attachments.Add(new DisplayQuad(Att.FileName, Description, Base, Process.HasMapping(Base), IsInvalid));
356 }
357 }
358
359 return Result;
360 }
361
366 public static IdentityGroupsResult BuildIdentityGroups(LegalIdentity Identity, CultureInfo? Culture = null)
367 {
368 CultureInfo EffectiveCulture = Culture ?? CultureInfo.CurrentCulture;
369
370 // Reviewable keys set
371 HashSet<string> ReviewableKeys = new(StringComparer.OrdinalIgnoreCase)
372 {
397 Constants.XmppProperties.OrgNumber
398 };
399
400 // Classification sets
401 HashSet<string> PersonalKeys = new(StringComparer.OrdinalIgnoreCase)
402 {
421 Constants.XmppProperties.EMail
422 };
423
424 HashSet<string> OrgKeys = new(StringComparer.OrdinalIgnoreCase)
425 {
436 Constants.XmppProperties.OrgNumber
437 };
438
439 HashSet<string> TechnicalKeys = new(StringComparer.OrdinalIgnoreCase)
440 {
449 Constants.XmppProperties.DeviceId
450 };
451
452 Dictionary<string, string> LabelMap = GetIdentityLabelMap();
453 IdentityGroupsResult Result = new();
454 HashSet<string> UsedKeys = new(StringComparer.OrdinalIgnoreCase);
455
456 // Custom/composed BirthDate
457 string D = Identity[Constants.XmppProperties.BirthDay];
458 string M = Identity[Constants.XmppProperties.BirthMonth];
459 string Y = Identity[Constants.XmppProperties.BirthYear];
460 if (int.TryParse(D, out int Day) && int.TryParse(M, out int Month) && int.TryParse(Y, out int Year))
461 {
462 try
463 {
464 string BirthDateStr = new DateTime(Year, Month, Day).ToString("d", EffectiveCulture);
465 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
467 GetLabel(LabelMap, Constants.CustomXmppProperties.BirthDate),
468 BirthDateStr);
469 UsedKeys.Add(Constants.XmppProperties.BirthDay);
470 UsedKeys.Add(Constants.XmppProperties.BirthMonth);
471 UsedKeys.Add(Constants.XmppProperties.BirthYear);
472 }
473 catch (Exception Ex)
474 {
475 ServiceRef.LogService.LogException(Ex);
476 }
477 }
478
479 // Iterate raw properties
480 foreach (Property? Prop in Identity.Properties ?? Array.Empty<Property>())
481 {
482 if (Prop is null || UsedKeys.Contains(Prop.Name))
483 continue;
484
485 string Key = Prop.Name;
486 string Value = Prop.Value ?? string.Empty;
487 if (string.IsNullOrWhiteSpace(Value))
488 continue;
489
490 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
491 Key, GetLabel(LabelMap, Key), Value);
492 UsedKeys.Add(Key);
493 }
494
495 // Extra metadata fields
496 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
498 GetLabel(LabelMap, Constants.CustomXmppProperties.Neuro_Id), Identity.Id ?? string.Empty);
499
500 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
502 GetLabel(LabelMap, Constants.CustomXmppProperties.Provider), Identity.Provider ?? string.Empty);
503
504 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
506 GetLabel(LabelMap, Constants.CustomXmppProperties.State), ServiceRef.Localizer["IdentityState_" + Identity.State.ToString()]);
507
508 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
510 GetLabel(LabelMap, Constants.CustomXmppProperties.Created), Identity.Created.ToString("g", EffectiveCulture));
511
512 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
514 GetLabel(LabelMap, Constants.CustomXmppProperties.Updated), Identity.Updated.ToString("g", EffectiveCulture));
515
516 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
518 GetLabel(LabelMap, Constants.CustomXmppProperties.From), Identity.From.ToString("d", EffectiveCulture));
519
520 AddField(Result, PersonalKeys, OrgKeys, TechnicalKeys, ReviewableKeys,
522 GetLabel(LabelMap, Constants.CustomXmppProperties.To), Identity.To.ToString("d", EffectiveCulture));
523
524 return Result;
525 }
526
527 private static string Get(Dictionary<string, string> Dict, string Key)
528 {
529 if (Dict.TryGetValue(Key, out string? Value))
530 return Value;
531 return string.Empty;
532 }
533
534 private static string GetLabel(Dictionary<string, string> LabelMap, string Key)
535 {
536 if (LabelMap.TryGetValue(Key, out string? Label) && !string.IsNullOrEmpty(Label))
537 return Label;
538 return Key;
539 }
540
541 private static Dictionary<string, string> GetLabelMap()
542 {
543 // Use ServiceRef.Localizer for labels used in KYC summary
544 Dictionary<string, string> Map = new(StringComparer.OrdinalIgnoreCase)
545 {
563
564 // Organization fields
569 { "ORGTRADENAME", ServiceRef.Localizer[nameof(AppResources.TradeName)].Value },
577 { "ORGREPNAME", ServiceRef.Localizer[nameof(AppResources.OrgRepName)].Value },
578 { "ORGREPCPF", ServiceRef.Localizer[nameof(AppResources.OrgRepCPF)].Value },
579 { "ORGREPBDATE", ServiceRef.Localizer[nameof(AppResources.OrgRepBirthDate)].Value },
580 { "ORGREPRG", ServiceRef.Localizer[nameof(AppResources.OrgRepRG)].Value },
581 { "ORGEMAIL", ServiceRef.Localizer[nameof(AppResources.OrgEMail)].Value },
582 { "ORGPHONE", ServiceRef.Localizer[nameof(AppResources.OrgPhone)].Value }
583 };
584
585 return Map;
586 }
587
588 private static Dictionary<string, string> GetIdentityLabelMap()
589 {
590 Dictionary<string, string> Map = new(StringComparer.OrdinalIgnoreCase)
591 {
628 };
629
630 return Map;
631 }
632
633 private static void AddField(IdentityGroupsResult Result,
634 HashSet<string> PersonalKeys,
635 HashSet<string> OrgKeys,
636 HashSet<string> TechnicalKeys,
637 HashSet<string> ReviewableKeys,
638 string Key,
639 string Label,
640 string Value)
641 {
642 bool IsReviewable = ReviewableKeys.Contains(Key);
643 DisplayField Field = new(Key, Label, Value, IsReviewable);
644
645 if (PersonalKeys.Contains(Key)) Result.Personal.Add(Field);
646 else if (OrgKeys.Contains(Key)) Result.Organization.Add(Field);
647 else if (TechnicalKeys.Contains(Key)) Result.Technical.Add(Field);
648 else Result.Other.Add(Field);
649 }
650 }
651}
Custom XMPP Protocol Properties.
Definition: Constants.cs:322
const string To
“To” / expiry date
Definition: Constants.cs:361
const string State
Current state (Approved, Rejected, …)
Definition: Constants.cs:341
const string Created
When it was created
Definition: Constants.cs:346
const string Updated
When it was last updated
Definition: Constants.cs:351
const string Provider
Issuer / Provider
Definition: Constants.cs:336
const string PersonalNumber
Personal number
Definition: Constants.cs:394
const string OrgAddress2
Organization Address line 2
Definition: Constants.cs:474
const string OrgArea
Organization Area
Definition: Constants.cs:479
const string OrgRegion
Organization Region
Definition: Constants.cs:494
const string Nationality
Nationality
Definition: Constants.cs:434
const string BirthYear
Birth Year
Definition: Constants.cs:454
const string OrgCity
Organization City
Definition: Constants.cs:484
const string OrgRole
Organization Role
Definition: Constants.cs:509
const string Phone
Phone number
Definition: Constants.cs:524
const string EMail
e-Mail address
Definition: Constants.cs:529
const string OrgZipCode
Organization Zip Code
Definition: Constants.cs:489
const string MiddleNames
Middle names
Definition: Constants.cs:379
const string OrgCountry
Organization Country
Definition: Constants.cs:499
const string OrgDepartment
Organization Department
Definition: Constants.cs:504
const string Address2
Address line 2
Definition: Constants.cs:404
const string OrgAddress
Organization Address line 1
Definition: Constants.cs:469
const string Address
Address line 1
Definition: Constants.cs:399
const string LastNames
Last names
Definition: Constants.cs:384
const string OrgNumber
Organization number
Definition: Constants.cs:464
const string BirthMonth
Birth Month
Definition: Constants.cs:449
const string FirstName
First name
Definition: Constants.cs:374
const string OrgName
Organization name
Definition: Constants.cs:459
A set of never changing property constants and helpful values.
Definition: Constants.cs:24
A strongly-typed resource class, for looking up localized strings, etc.
static string OrgNumber
Looks up a localized string similar to Organization Number.
static string OrgRepRG
Looks up a localized string similar to Representative RG.
static string Attachment_ProfilePhoto
Looks up a localized string similar to Photo of face.
static string Address2
Looks up a localized string similar to Address (row 2).
static string Female
Looks up a localized string similar to Female.
static string OrgAddress
Looks up a localized string similar to Organization Address.
static string Address
Looks up a localized string similar to Address.
static string OrgEMail
Looks up a localized string similar to Corporate email.
static string Male
Looks up a localized string similar to Male.
static string TradeName
Looks up a localized string similar to Trade name.
static string BirthDate
Looks up a localized string similar to Birth Date.
static string Attachment_DriverLicenseFront
Looks up a localized string similar to Front of driver's license.
static string OrgRepCPF
Looks up a localized string similar to Representative CPF.
static string OrgRepBirthDate
Looks up a localized string similar to Representative birth date.
static string Updated
Looks up a localized string similar to Updated.
static string Country
Looks up a localized string similar to Country.
static string Attachment_Passport
Looks up a localized string similar to Passport image.
static string FirstName
Looks up a localized string similar to First name.
static string Provider
Looks up a localized string similar to Provider.
static string Region
Looks up a localized string similar to Region or State.
static string Issued
Looks up a localized string similar to Issued.
static string Status
Looks up a localized string similar to Status.
static string OrgCity
Looks up a localized string similar to Organization City.
static string EMail
Looks up a localized string similar to E-Mail.
static string OrgPhone
Looks up a localized string similar to Corporate phone.
static string OrgRole
Looks up a localized string similar to Role.
static string Attachment_IdCardFront
Looks up a localized string similar to Front of ID card.
static string Area
Looks up a localized string similar to Area.
static string OrgCountry
Looks up a localized string similar to Organization Country.
static string OrgAddress2
Looks up a localized string similar to Organization Address (row 2).
static string ZipCode
Looks up a localized string similar to Zip or Postal Code.
static string Expires
Looks up a localized string similar to Expires.
static string Nationality
Looks up a localized string similar to Nationality.
static string MiddleNames
Looks up a localized string similar to Middle name(s).
static string Attachment_DriverLicenseBack
Looks up a localized string similar to Back of driver's license.
static string DeviceID
Looks up a localized string similar to Device ID.
static string OrgName
Looks up a localized string similar to Organization Name.
static string PersonalNumber
Looks up a localized string similar to Personal number.
static string OrgDepartment
Looks up a localized string similar to Department.
static string FullName
Looks up a localized string similar to Full name.
static string Gender
Looks up a localized string similar to Gender.
static string OrgRegion
Looks up a localized string similar to Organization Region.
static string Created
Looks up a localized string similar to Created.
static string Attachment_ArticleOfAssociation
Looks up a localized string similar to Article of association.
static string PhoneNr
Looks up a localized string similar to Phone number.
static string OrgRepName
Looks up a localized string similar to Representative name.
static string City
Looks up a localized string similar to City.
static string OrgArea
Looks up a localized string similar to Organization Area.
static string Other
Looks up a localized string similar to Other.
static string NetworkID
Looks up a localized string similar to Network ID.
static string LastNames
Looks up a localized string similar to Last name(s).
static string OrgZipCode
Looks up a localized string similar to Organization Zip or Postal Code.
static string NeuroID
Looks up a localized string similar to Neuro-ID.
static string Attachment_IdCardBack
Looks up a localized string similar to Back of ID card.
Conversion between Country Names and ISO-3166-1 country codes.
Definition: ISO_3166_1.cs:10
static ? string ToName(string? CountryCode)
Converts the code to a country name (if found). If not found, returns the original code.
Definition: ISO_3166_1.cs:98
Represents a displayable set of three related strings: a label, a value, and an optional mapping.
Builds friendly, localized summaries for identity-like data from mapped properties and attachments....
static IdentityGroupsResult BuildIdentityGroups(LegalIdentity Identity, CultureInfo? Culture=null)
Build grouped identity fields (Personal/Organization/Technical/Other) from a LegalIdentity....
static KycSummaryResult BuildKycSummaryFromProperties(IEnumerable< Property > Properties, KycProcess Process, IEnumerable< AttachmentInfo >? Attachments=null, CultureInfo? Culture=null, ISet< string >? InvalidMappings=null)
Build a KYC-oriented summary (Personal, Address, Attachments) from mapped properties.
Represents a parsed KYC process with pages, fields, and current values.
Definition: KycProcess.cs:11
Base class that references services in the app.
Definition: ServiceRef.cs:43
static ILogService LogService
Log service.
Definition: ServiceRef.cs:214
static IReportingStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:370
Definition: ImplTypes.g.cs:58