Mimosa 1.0.8

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

// Install Mimosa as a Cake Tool
#tool nuget:?package=Mimosa&version=1.0.8                

Mimosa

Get started

Mimosa is a flexible workflow framework. The usage of the framework is simple & strateforward:


    // Create state change settings
    var rules = new TriggerStateSettings<char, mState>();

    // Define state change rules
    rules.Setup(mState.New)
        .Allow(mState.Deployed, c=>c.CurtInput == 'y', mAction.CodeReview);
    rules.Setup(mState.Deployed)
        .Allow(mState.Released, c=>c.CurtInput == 'y', mAction.Release);

    // Create trigger with initial state
    var trigger = new Trigger<char, mState>(mState.New, rules);

    // Activate trigger with next appropriate action
    trigger.Next(mAction.Develop);
    trigger.Next(mAction.Approve2);

    // Validate state
    Assert.AreEqual(mState.Released, trigger.State);

    // Define states
    public enum mStates
    {
        New,
        Implemented,
        Approved,
        Rejected,
        Deployed
    }

    // Define actions
    public enum mAction
    {
        Develop,
        Approve,
        Approve2,
        Reject,
        Deploy
    }

Recognize the comment content within http request file:


            var file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "sampleHttpRequest.http");
            var txt = File.ReadAllText(file);
            var b = new StringBuilder();
            var sm = new Trigger<char,HttpState>(HttpState.Nothing, HttpRequestSyntax.Rules);
            sm.OnTransit += new Trigger<char,HttpState>.OnTransitDelegate((context, newState) =>
            {
                var curtState = context.CurtState;
                if (newState == HttpState.Comment)
                {
                    b.Append(context.CurtInput.ToString());
                }
                return true;
            });

            for (int i = 0; i < txt.Length; i++)
            {
                var ch = txt[i];
                if (ch == '\r' || ch == '\n')
                {
                    sm.Next(TextAction.TakeSymbol, ch);
                }
                else if (char.IsDigit(ch))
                {
                    sm.Next(TextAction.TakeDigit, ch);
                }
                else if (char.IsLetter(ch))
                {
                    sm.Next(TextAction.TakeLetter, ch);
                }
                else if (char.IsWhiteSpace(ch))
                {
                    sm.Next(TextAction.TakeWhitespace, ch);
                }
                else
                {
                    sm.Next(TextAction.TakeSymbol, ch);
                }
            }
            sm.Next(TextAction.TakeEnd, '\0');

            var commentContent = b.ToString();

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.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.

Version Downloads Last updated
1.0.8 82 10/26/2024
1.0.6 83 10/26/2024
1.0.5 86 10/13/2024
1.0.4 82 10/13/2024
1.0.3 144 9/11/2023
1.0.2 125 9/11/2023
1.0.0 117 9/11/2023