RBSoftTech.DummyNET.Core 1.0.0

There is a newer version of this package available.
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
                    
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="RBSoftTech.DummyNET.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RBSoftTech.DummyNET.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RBSoftTech.DummyNET.Core" />
                    
Project file
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 RBSoftTech.DummyNET.Core --version 1.0.0
                    
#r "nuget: RBSoftTech.DummyNET.Core, 1.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 RBSoftTech.DummyNET.Core@1.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=RBSoftTech.DummyNET.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RBSoftTech.DummyNET.Core&version=1.0.0
                    
Install as a Cake Tool

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 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 (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.

Version Downloads Last Updated
1.0.1 649 1/1/2023
1.0.0 820 12/24/2022