Lorem.Universal.NET
5.0.0
dotnet add package Lorem.Universal.NET --version 5.0.0
NuGet\Install-Package Lorem.Universal.NET -Version 5.0.0
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="Lorem.Universal.NET" Version="5.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lorem.Universal.NET" Version="5.0.0" />
<PackageReference Include="Lorem.Universal.NET" />
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 Lorem.Universal.NET --version 5.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lorem.Universal.NET, 5.0.0"
#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 Lorem.Universal.NET@5.0.0
#: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=Lorem.Universal.NET&version=5.0.0
#tool nuget:?package=Lorem.Universal.NET&version=5.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lorem.NET for netstandard
A .NET library for all things random! Updated to be a .Net 8 and .Net 9 library.
Usage
Text Helpers
// this will generate a string with three words:
string words = LoremNET.Lorem.Words(3);
// this will generate a string with two to five words:
string words = LoremNET.Lorem.Words(2, 5);
// this will generate a string with five to ten words with "uppercaseFirstLetter" set to "false" and "includePunctuation" set to "true":
string words = LoremNET.Lorem.Words(5, 10, false, true);
// a sentence is the same as "Words" except that it will include punctuation by default and will include a "." at the end of a string:
string sentence = LoremNET.Lorem.Sentence(5, 10);
// a paragraph is a string composed of multiple sentences; this paragraph will have five to six words per sentence, and four to ten sentences:
string paragraph = LoremNET.Lorem.Paragraph(5, 6, 4, 10);
// paragraphs is an array of paragraphs; this method will have eight to nine words per sentence, four to five sentences per paragraph, and one to three paragraphs:
IEnumerable<string> paragraphs = LoremNET.Lorem.Paragraphs(8, 9, 4, 5, 1, 3);
Breaking Change : As of v5.0, support for anything other than .Net 8 and .Net 9 has been removed.
Extras
// this will generate a random valid email address:
string email = LoremNET.Lorem.Email();
// this will generate a random hex number (i.e. a color)
string hex = LoremNET.Lorem.HexNumber();
// this will generate a random DateTime object between 1/1/1950 and the current DateTime:
DateTime dateTime = LoremNET.Lorem.DateTime();
// this will generate a random DateTime object between 1/1/1995 and 12/31/2020:
DateTime dateTime = LoremNET.Lorem.DateTime(new DateTime(1995, 1, 1), new DateTime(2020, 12, 31))
// this will return "true" 55% of the time:
bool isTruth = LoremNET.Lorem.Chance(55, 100);
// this will randomly select an item from the group:
string[] numbers = GetNumbers();
string number = LoremNET.Lorem.Random(numbers);
// this will randomly select a value from the enum:
MyEnum value = LoremNET.Lorem.Enum<MyEnum>();
RandomHelper
RandomHelper has been removed in v5.0, replaced with Random.Shared provided by the framework.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Lorem.Universal.NET:
Repository | Stars |
---|---|
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
|
|
Squidex/squidex
Headless CMS and Content Managment Hub
|