Netflu.Util.DataFaker
1.0.1
dotnet add package Netflu.Util.DataFaker --version 1.0.1
NuGet\Install-Package Netflu.Util.DataFaker -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Netflu.Util.DataFaker" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Netflu.Util.DataFaker" Version="1.0.1" />
<PackageReference Include="Netflu.Util.DataFaker" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Netflu.Util.DataFaker --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Netflu.Util.DataFaker, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Netflu.Util.DataFaker@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Netflu.Util.DataFaker&version=1.0.1
#tool nuget:?package=Netflu.Util.DataFaker&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
1.Release Notes
v1.0.0
2.Getting Start
sample code
public void Run()
{
IDataFaker faker = null;
string dataStr = "";
//Enum
Console.WriteLine($"-- Test EnumFaker -----------------------------------------------------");
dataStr = "[:enum(alipay,weixin,bank,other)]";
CreateTest(dataStr, 5);
dataStr = "[:enum(10,20,50,100,200,300,500,800,1000)]";
CreateTest(dataStr, 10);
//Numeric
Console.WriteLine($"-- Test IntFaker -----------------------------------------------------");
dataStr = "[:int(0, 2)]";
CreateTest(dataStr, 5);
dataStr = "[:int(3000, 10000)]";
CreateTest(dataStr, 5);
//Time
Console.WriteLine($"-- Test DataFaker -----------------------------------------------------");
dataStr = "[:date(2000-1-1, 2023-1-1)]";
CreateTest(dataStr, 5);
dataStr = "[:date(2023-12-1)]";
CreateTest(dataStr, 5);
dataStr = "[:date]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test DataTimeFaker -----------------------------------------------------");
dataStr = "[:datetime(2000-1-1, 2023-1-1)]";
CreateTest(dataStr, 5);
dataStr = "[:datetime(2000-1-1)]";
CreateTest(dataStr, 5);
dataStr = "[:datetime]";
CreateTest(dataStr, 5);
//Text
Console.WriteLine($"-- Test EmailFaker -----------------------------------------------------");
dataStr = "[:email]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test Md5Faker -----------------------------------------------------");
dataStr = "[:md5]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test NickNameFaker -----------------------------------------------------");
dataStr = "[:nickname]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test UserNameFaker -----------------------------------------------------");
dataStr = "[:username]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test UuidFaker -----------------------------------------------------");
dataStr = "[:uuid]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test LongIdFaker -----------------------------------------------------");
dataStr = "[:longid]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test PhoneFaker -----------------------------------------------------");
dataStr = "[:phone]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- Test RndTextFaker -----------------------------------------------------");
Console.WriteLine($"-- 固定长度 -----------------------------------------------------");
dataStr = "[:rnd_text(80)]";
CreateTest(dataStr, 5);
Console.WriteLine($"-- 可变长度 -----------------------------------------------------");
dataStr = "[:rnd_text(8, 32)]";
CreateTest(dataStr, 5);
}
after running,console output
-- Test EnumFaker -----------------------------------------------------
-- Param: [:enum(alipay,weixin,bank,other)], loop 5
[1] weixin
[2] bank
[3] alipay
[4] weixin
[5] weixin
-- Param: [:enum(10,20,50,100,200,300,500,800,1000)], loop 10
[1] 500
[2] 200
[3] 50
[4] 200
[5] 300
[6] 20
[7] 20
[8] 200
[9] 500
[10] 800
-- Test IntFaker -----------------------------------------------------
-- Param: [:int(0, 2)], loop 5
[1] 2
[2] 1
[3] 1
[4] 0
[5] 2
-- Param: [:int(3000, 10000)], loop 5
[1] 6592
[2] 6394
[3] 6067
[4] 9610
[5] 8412
-- Test DataFaker -----------------------------------------------------
-- Param: [:date(2000-1-1, 2023-1-1)], loop 5
[1] 2006/5/14 0:00:00
[2] 2012/2/10 0:00:00
[3] 2006/4/24 0:00:00
[4] 2007/6/15 0:00:00
[5] 2017/6/1 0:00:00
-- Param: [:date(2023-12-1)], loop 5
[1] 2023/12/5 0:00:00
[2] 2023/12/4 0:00:00
[3] 2023/12/2 0:00:00
[4] 2023/12/5 0:00:00
[5] 2023/12/2 0:00:00
-- Param: [:date], loop 5
[1] 2022/8/25 0:00:00
[2] 2004/7/24 0:00:00
[3] 2009/1/8 0:00:00
[4] 2022/12/25 0:00:00
[5] 2002/7/4 0:00:00
-- Test DataTimeFaker -----------------------------------------------------
-- Param: [:datetime(2000-1-1, 2023-1-1)], loop 5
[1] 2018/5/30 0:26:00
[2] 2019/12/26 3:25:00
[3] 2007/10/16 17:45:00
[4] 2018/2/27 18:45:00
[5] 2015/12/9 21:22:00
-- Param: [:datetime(2000-1-1)], loop 5
[1] 2009/7/25 6:29:00
[2] 2021/10/3 11:43:00
[3] 2000/3/14 2:23:00
[4] 2010/12/28 21:24:00
[5] 2021/10/24 18:07:00
-- Param: [:datetime], loop 5
[1] 2020/1/7 2:57:00
[2] 2004/5/15 6:51:00
[3] 2023/2/18 8:42:00
[4] 2006/3/8 21:04:00
[5] 2001/10/15 23:44:00
-- Test EmailFaker -----------------------------------------------------
-- Param: [:email], loop 5
[1] 3037768@sohu.com
[2] 2337852@yeah.net
[3] ymxqlxphqbzq14621@aol.com
[4] jnvkxmrzsiu@3721.net
[5] woxpwfmgooioo92234@sina.com
-- Test Md5Faker -----------------------------------------------------
-- Param: [:md5], loop 5
[1] 03b97ce8d43f4eac9901bef1586b2ea2
[2] c0f82c95ff9812e701d44ba7a8d46520
[3] 5617a176b027b54a3815ecfe53e21ca8
[4] 7a1df26b887af843f653b442c8046134
[5] cfa3f44bad29958776d2a908e34024aa
-- Test NickNameFaker -----------------------------------------------------
-- Param: [:nickname], loop 5
[1] 最佳第一坏
[2] 风衣恩宠
[3] 五杀心灵
[4] 幼女三分
[5] 温柔恩宠
-- Test UserNameFaker -----------------------------------------------------
-- Param: [:username], loop 5
[1] cygcjytrhogvideejt
[2] oilmqy776
[3] durgan69017
[4] amqtemmm80
[5] pvwiqaf394
-- Test UuidFaker -----------------------------------------------------
-- Param: [:uuid], loop 5
[1] 5c2450df-6d61-4b94-9c36-a30de45e7e36
[2] 549689a2-1b1a-46f7-91c2-b3e372332d82
[3] 36d8f900-b3b9-4a08-a972-acd7a007ed58
[4] 2d436566-170a-4536-a70e-b060a278a807
[5] 65ba8a45-603e-49b0-b7a4-763cd67109c2
-- Test LongIdFaker -----------------------------------------------------
-- Param: [:longid], loop 5
[1] 4271769807830908928
[2] 4271769807835103232
[3] 4271769807835103233
[4] 4271769807835103234
[5] 4271769807839297536
-- Test PhoneFaker -----------------------------------------------------
-- Param: [:phone], loop 5
[1] 18537436228
[2] 17532456705
[3] 18351875205
[4] 18345802920
[5] 15816969007
-- Test RndTextFaker -----------------------------------------------------
-- 固定长度 -----------------------------------------------------
-- Param: [:rnd_text(80)], loop 5
[1] zmbKXpqWO0sHvJIgqcld8jfIPLL8pFO03K4T2GI2T7cEVXSL15f9hm1G7IvBThg9csDaFoeaJjA16Rnr
[2] t06kZEJHIoLjK7YlRTccJr6DQ4qxc09gV3HTavZNYvIRTvFCAOadpAY2utJUOLfHefEHp5BVtE4NYfkV
[3] odnDQWrKVFZgc5zDG0mnhyM5C5ka6ATF9ofkYRr7ntmZVVsoEr7XswoqGh0LmGEKlKWoPFeo9f0nBmZh
[4] CwMF3vMDzpTqQWLWeRoBy4OzCIODv0eU7J9puzHpxIoalnOcJT9kyOi7XN2kW9HzAzj6NVceAyEgGoDO
[5] umtSquVjb1IXwWIn1oPm4HFnrUa092qi9dqkFp8GTzVLD4idfQfRPQKdW6bMKVZZAaNJgYYBf9I4ltam
-- 可变长度 -----------------------------------------------------
-- Param: [:rnd_text(8, 32)], loop 5
[1] xKjNPJjJDD9DmwyPwBdhPw7sTl
[2] 7FrdWpZNAqClGe
[3] TKPytCKfpix4N0Dqtd2b3LacOCZnYkP
[4] 2PSnTUs3ma2uZkCM
[5] 0I8D2v8jmagdX65Ia2xXPNPkzoTIg3d
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.