RBSoftTech.DummyNET.Core
1.0.0
See the version list below for details.
dotnet add package RBSoftTech.DummyNET.Core --version 1.0.0
NuGet\Install-Package RBSoftTech.DummyNET.Core -Version 1.0.0
<PackageReference Include="RBSoftTech.DummyNET.Core" Version="1.0.0" />
<PackageVersion Include="RBSoftTech.DummyNET.Core" Version="1.0.0" />
<PackageReference Include="RBSoftTech.DummyNET.Core" />
paket add RBSoftTech.DummyNET.Core --version 1.0.0
#r "nuget: RBSoftTech.DummyNET.Core, 1.0.0"
#:package RBSoftTech.DummyNET.Core@1.0.0
#addin nuget:?package=RBSoftTech.DummyNET.Core&version=1.0.0
#tool nuget:?package=RBSoftTech.DummyNET.Core&version=1.0.0
DummyNET
DummyNET is a suite of engines to create dummy data.
You can create dummy data using three objects
- Dummy engine
- Sequence
- Sequence options
Dummy Engine
Dummy engine allows you to create sequences of dummy values. An engine can manage more sequences. Each sequence is uniquely identify by its name.
Sequence
A sequence is a set of values. You can change the behavior of a sequence using sequence options. A sequence can have four different behaviors:
- Random : engine creates values in random mode. The sequence can contain the same value more than once
- Random unique : engine creates values in random mode. The sequence can contain the same value only once
- Random constant : engine creates a random value and it repeats always the same value
- Defined constant : you can choise a specific value. Engine repeats the constant value.
Sequence options
Sequence's options allow you
- to change the behavior of a sequence
- to choise the name of a sequence
- to choise a constant value (used for defined constant behavior only)
DummyNET.Core
DummyNET.Core is a core library. It defines interfaces and base classes for DummyNET project.
It define two base engines
- SetDummyEngine
- EnumDummyEngine
SetDummyEngine
SetDummyEngine is a specific implementation of DummyEngine. It creates sequences of values from a defined set.
When a sequence is defined with defined constant behavior, the defined constant value must be contained in set.
Getting started with SetDummyEngine
If you want to build your SetDummyEngine, start with define a set
string[] rainbow = new string[] { "Red", "Orange", "Yellow", "Green", "Ligth Blue", "Indigo", "Violet" };
Now you can define the SequenceOptions
public class RainbowSequenceOptions : SetSequenceOptions<string>
{
public RainbowSequenceOptions(SequenceBehavior behavior,string name)
:this(behavior,name,rainbow,"Red")
{}
public RainbowSequenceOptions(SequenceBehavior behavior,string name,string definedConstantValue)
:base(behavior,name,rainbow,definedConstantValue)
{}
private static readonly string[] rainbow;
static RainbowSequenceOptions()
{
rainbow = new string[] { "Red", "Orange", "Yellow", "Green", "Ligth Blue", "Indigo", "Violet" };
}
}
Now you can define yuor sequence
public class RainbowSequence : SetSequence<string,RainbowSequenceOptions>
{
public RainbowSequence(RainbowSequenceOptions options)
:base(options)
{}
}
The last step is to create your DummyEngine
public class RainbowDummyEngine : SetDummyEngine<string,RainbowSequence,RainbowSequenceOptions>
{
protected override RainbowSequence CreateSequence(RainbowSequenceOptions options)
{
return new RainbowSequence(options);
}
}
Now you are ready to use your SetDummyEngine
string sequenceName = "MyRainbowSequence";
RainbowSequenceOptions options = new RainbowSequenceOptions(SequenceBehavior.Random,sequenceName);
RainbowDummyEngine engine = new RainbowDummyEngine();
engine.StartNewSequence(options);
string rainbowColor = engine.GetValue(sequenceName);
engine.StopSequence(sequenceName);
EnumDummyEngine
EnumDummyEngine is a specific implementation of DummyEngine. It creates sequences of values from an enumerator.
Getting started with EnumDummyEngine
If you want to build your EnumDummyEngine, start with define an enumerator
public enum Trafficlight { Red, Orange, Green};
Now you can define the SequenceOptions
public class TrafficlightSequenceOptions : EnumSequenceOptions<Trafficlight>
{
public TrafficlightSequenceOptions(SequenceBehavior behavior,string name)
:this(behavior,name,default(Trafficlight))
{}
public TrafficlightSequenceOptions(SequenceBehavior behavior,string name,Trafficlight definedConstantValue)
:base(behavior,name,definedConstantValue)
{}
}
Now you can define yuor sequence
public class TrafficlightSequence : EnumSequence<Trafficlight,TrafficlightSequenceOptions>
{
public TrafficlightSequence(TrafficlightSequenceOptions options)
:base(options)
{}
}
The last step is to create your DummyEngine
public class TrafficlightDummyEngine : EnumDummyEngine<Trafficlight,TrafficlightSequence,TrafficlightSequenceOptions>
{
protected override TrafficlightSequence CreateSequence(TrafficlightSequenceOptions options)
{
return new TrafficlightSequence(options);
}
}
Now you are ready to use your EnumDummyEngine
string sequenceName = "MyTrafficlightSequence";
TrafficlightSequenceOptions options = new TrafficlightSequenceOptions(SequenceBehavior.Random,sequenceName);
TrafficlightDummyEngine engine = new TrafficlightDummyEngine();
engine.StartNewSequence(options);
Trafficlight trafficLightStatus = engine.GetValue(sequenceName);
engine.StopSequence(sequenceName);
| 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RBSoftTech.DummyNET.Core:
| Package | Downloads |
|---|---|
|
RBSoftTech.DummyNET.Boolean
DummyNET is a suite of engines to create dummy data. |
GitHub repositories
This package is not used by any popular GitHub repositories.