| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="PhoneFaker.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | using System.Globalization; |
| | | 8 | | using MyNet.Generator; |
| | | 9 | | using MyNet.Globalization.Localization.Providers; |
| | | 10 | | using MyNet.Text.Randomize; |
| | | 11 | | |
| | | 12 | | namespace MyNet.Fakers.Contacts; |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Current implementation of <see cref="IPhoneFaker"/>. |
| | | 16 | | /// </summary> |
| | | 17 | | public sealed class PhoneFaker(ITextRandomGenerator patternGenerator, IRandomGenerator random, ICultureScopedServiceSour |
| | 9 | 18 | | : PatternFakerBase<IPhoneFakerProvider>(patternGenerator, random, source), IPhoneFaker |
| | | 19 | | { |
| | | 20 | | /// <inheritdoc /> |
| | 6 | 21 | | public string Number(CultureInfo? culture = null) => Randomize(x => x.NumberFormats, culture); |
| | | 22 | | |
| | | 23 | | /// <inheritdoc /> |
| | 0 | 24 | | public string MobileNumber(CultureInfo? culture = null) => Randomize(x => x.MobileNumberFormats, culture); |
| | | 25 | | |
| | | 26 | | /// <inheritdoc /> |
| | 0 | 27 | | public string InternationalNumber(CultureInfo? culture = null) => Randomize(x => x.InternationalNumberFormats, cultu |
| | | 28 | | } |
| | | 29 | | |