Added Variable array

This commit is contained in:
Jordan Wages 2025-08-26 23:24:08 -05:00
commit 62ea3efe16
4 changed files with 46 additions and 5 deletions

View file

@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<AssemblyName>CSMic.Core</AssemblyName>
<Version>2.0.0-beta-03</Version>
<Version>2.0.0-beta-04</Version>
<PackageId>CSMic</PackageId>
<LangVersion>latest</LangVersion>
</PropertyGroup>

View file

@ -73,7 +73,10 @@ namespace CSMic
{
get
{
return null;
return this.numericVariables.Select(nv => new Variable(VariableType.Numeric, nv.Key, nv.Value))
.Concat(this.expressionVariables.Select(nv => new Variable(VariableType.Expression, nv.Key, nv.Value)))
.Concat(this.numericArrayVariables.Select(nv => new Variable(VariableType.NumericArray, nv.Key, nv.Value)))
.AsEnumerable();
}
}
#endregion

View file

@ -14,7 +14,35 @@ namespace CSMic
private string name;
private object value;
private object? value;
#endregion
#region Properties
public VariableType Type
{
get
{
return this.type;
}
}
public string Name
{
get
{
return this.name;
}
}
public object? Value
{
get
{
return this.value;
}
}
#endregion
@ -23,9 +51,19 @@ namespace CSMic
public Variable()
{
this.type = VariableType.None;
this.value = string.Empty;
this.name = string.Empty;
this.value = null;
}
public Variable(VariableType type, string name, object? value)
{
this.type = type;
this.name = name;
this.value = value;
}
#endregion
}
}

View file

@ -6,7 +6,7 @@
<AssemblyName>CSMic.StandardLibrary</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.0.0-beta-03</Version>
<Version>2.0.0-beta-04</Version>
<PackageId>CSMic.StandardLibrary</PackageId>
<LangVersion>latest</LangVersion>
</PropertyGroup>