Seqeasy.StringPattern 0.0.1.4

dotnet add package Seqeasy.StringPattern --version 0.0.1.4                
NuGet\Install-Package Seqeasy.StringPattern -Version 0.0.1.4                
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="Seqeasy.StringPattern" Version="0.0.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Seqeasy.StringPattern --version 0.0.1.4                
#r "nuget: Seqeasy.StringPattern, 0.0.1.4"                
#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.
// Install Seqeasy.StringPattern as a Cake Addin
#addin nuget:?package=Seqeasy.StringPattern&version=0.0.1.4

// Install Seqeasy.StringPattern as a Cake Tool
#tool nuget:?package=Seqeasy.StringPattern&version=0.0.1.4                

Seqeasy

pipeline status

Lite-weight and easy-to-use sequence generating library using buildable patterns. Provides built-in support for a number of standard types, as well as support for custom types. Sequences can be built using pre-defined or custom character sets. Also provides a thread-safe context. Supports .netstandard2.1 and on.

Pattern Types

  • Constant: Prints a constant value to a sequence
  • Random character/letter/number: Prints a random letter, number, or character (letter or number) to the sequence.
  • Incrementer: Prints an incrementing value to the sequence. Portions of incrementing value can be split within sequence using "increment chain".
  • DateTime: Prints a date/time value to the sequence.

How to use

The simplest way to get started is by using the PatternBuilder class using a default character set (character sets can be found within the Seqeasy.CharacterSets namespace.

using Seqeasy;
using Seqeasy.CharacterSets.Special;

var builder = new PatternBuilder<HexCharSet>();

HexCharSet is a CharacterSet that uses the hexadecimal characters [0-9A-F].

PatternBuilder methods can be chained. Upon finalizing the building, GetGenerator can be called to produce a SequenceGenerator:

var generator = builder.AddConst("H").AddChar(4).GetGenerator();

In this example, a sequence value is produced by calling generator.GetNext(). The following code:

for (var i=0; i< 5; i++)
{
    Console.WriteLine(generator.GetNext());
}

will produce output similar to:

H97E2
HF1CD
H273A
H62A2
H799A

To use an incrementer, simply call PatterhBuilder.AddIncrement:

var generator = builder.AddConst("H").AddChar(1).AddIncrement(4).GetGenerator();

This will produce the following:

H50000
H70001
H20002
H50003
H10004
H70005
H10006
HC0007
H30008
H10009
H5000A
H1000B
HF000C
H6000D
H2000E
HE000F
H40010
H50011
HF0012
HA0013

Extensions

  • Seqeasy.Extensions: Set of experimental token/section types that are not in main Seqeasy library.
  • Seqeasy.StringPattern: Experimental class used to consume and produce a string pattern to generate generators.
  • Seqeasy.StringPattern.Electrician: Source generator for Seqeasy.StringPattern used for type discovery to locate token types.
  • Seqeasy.Tests: Test set for Seqeasy core.

Preview at akolman.info

Product 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.1

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1.4 488 4/9/2022
0.0.1.2 432 4/8/2022
0.0.1.1 419 3/21/2022