FSC-Beauty-Compile 1.0.1

Additional Details

Programming languages are a good thing. I believe that there are so many needs for a good programming language to build plugins. That's why a much better solution is in development and this package goes out of support. Thank you for using this package.

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

// Install FSC-Beauty-Compile as a Cake Tool
#tool nuget:?package=FSC-Beauty-Compile&version=1.0.1                

FSC.Beauty NuGet Package README

Welcome to the FSC.Beauty! This language is designed to help you easily integrate scripting into your .NET applications. Whether you are looking to add scripting capabilities to your existing project or create new, dynamic applications, FSC.Beauty offers a simple yet powerful solution.

Features

  • Integrate Scripting into .NET Applications: Use FSC.Beauty to add scripting functionalities to your .NET applications.
  • Custom Functionality: Easily extend the language with your own functions.
  • Cross-Platform Support: Compatible with various .NET-supported platforms.
  • Simple Syntax: FSC.Beauty's easy-to-understand syntax makes scripting accessible for all levels of developers.

Getting Started

Usage

Here's a basic example to get you started with using FSC.Beauty in your .NET application. This example demonstrates how to set up a simple script and integrate custom functions.

Example Script
using FSC.Beauty.Runtime;
using FSC.Dirty.Runtime.Template;
using System.Text;

namespace fsc.beauty
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string code = @"
extern Title(""Example Script"")

extern WriteLine(""This script shows how you can write plugins with FSC.Beauty in your .NET Application including the call of own functions"")
extern LongBeep(10)
extern Pause()

extern Exit(0)
";
            CustomFunctions customFunctions = new CustomFunctions();
            customFunctions.LoadFunctions();
            Runtime runtime = new Runtime(customFunctions);
            runtime.AddScript(code);
            runtime.Run();
        }
    }
}

public class CustomFunctions : IFscRuntime
{
    public bool UseDefaultTemplate => true;

    public CallMethodDictionary ExternCallMethods { get; set; } = new CallMethodDictionary();

    public void LoadFunctions()
    {
        ExternCallMethods.Add("LongBeep", (object[] args) =>
        {
            int name = Convert.ToInt32(args[0]);
            StringBuilder beep = new StringBuilder("B");
            for (int i = 0; i < name; i++)
            {
                beep.Append("e");
            }
            beep.Append("p");
            Console.WriteLine(beep.ToString());
            return null;
        });
    }
}

In this example, we define a simple script that uses both built-in and custom functions. The CustomFunctions class demonstrates how you can extend the scripting functionalities by adding your own methods.

Documentation

For more detailed documentation on using FSC.Beauty, including syntax guides and advanced features, please visit the Wiki on GitHub.

License

FSC.Beauty is released under MIT License, allowing for wide-ranging use and modification.


Thank you for choosing FSC.Beauty for your .NET scripting needs. We look forward to seeing the innovative ways you use this package in your applications!

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

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.1 153 1/31/2024 1.0.1 is deprecated because it is no longer maintained.
1.0.0 102 1/31/2024

Fixed a small bug, where it was impossible to call the same function twice with the same variable as parameter.