Adopt .NET naming and structure: CsMic.* namespaces, PascalCase projects and solution; update Coco namespace; update package id and NuGet publish target; adjust project refs and tests.

This commit is contained in:
Jordan Wages 2025-08-20 20:10:34 -05:00
commit 0a67e6e2cc
24 changed files with 54 additions and 49 deletions

View file

@ -0,0 +1,43 @@
using CsMic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CsMic.StandardLibrary.Functions
{
public class Min : FunctionBase, ICodedFunction
{
public string Name
{
get
{
return "min";
}
}
public override IEnumerable<FunctionArgument> ExpectedArguments
{
get
{
yield return new FunctionArgument("first", FunctionValue.NUMBER);
yield return new FunctionArgument("second", FunctionValue.NUMBER);
}
}
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
{
var inputFirst = _args[0].Value;
var inputSecond = _args[1].Value;
decimal first = Convert.ToDecimal(inputFirst.Value);
decimal second = Convert.ToDecimal(inputSecond.Value);
return new FunctionValue(FunctionValueType.Numeric, Math.Min(first, second));
});
}
}
}