完全清除Resource依赖, 目前可以直接使用源码

This commit is contained in:
2025-10-08 12:00:42 +08:00
parent 0d4d4b75bb
commit a09b3c1eb1
31 changed files with 49 additions and 2926 deletions

View File

@@ -1,7 +1,6 @@
using System;
using Flee.InternalTypes;
using Flee.Parsing;
using Flee.Resources;
namespace Flee.PublicTypes
{
@@ -53,7 +52,7 @@ namespace Flee.PublicTypes
if (_myReason == CompileExceptionReason.SyntaxError)
{
Exception innerEx = this.InnerException;
string msg = $"{Utility.GetCompileErrorMessage(CompileErrorResourceKeys.SyntaxError)}: {innerEx.Message}";
string msg = $"{Utility.GetCompileErrorMessage("SyntaxError")}: {innerEx.Message}";
return msg;
}
else

View File

@@ -5,7 +5,6 @@ using Flee.CalcEngine.PublicTypes;
using Flee.ExpressionElements.Base;
using Flee.InternalTypes;
using Flee.Parsing;
using Flee.Resources;
namespace Flee.PublicTypes
{
@@ -70,7 +69,7 @@ namespace Flee.PublicTypes
if (isAccessible == false)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.TypeNotAccessibleToExpression, t.Name);
string msg = Utility.GetGeneralErrorMessage("TypeNotAccessibleToExpression", t.Name);
throw new ArgumentException(msg);
}
}

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Reflection;
using Flee.InternalTypes;
using Flee.Resources;
namespace Flee.PublicTypes
{
@@ -156,7 +155,7 @@ namespace Flee.PublicTypes
if (mi == null)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.CouldNotFindPublicStaticMethodOnType, methodName, t.Name);
string msg = Utility.GetGeneralErrorMessage("CouldNotFindPublicStaticMethodOnType", methodName, t.Name);
throw new ArgumentException(msg);
}
@@ -172,7 +171,7 @@ namespace Flee.PublicTypes
if (mi.IsStatic == false | mi.IsPublic == false)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.OnlyPublicStaticMethodsCanBeImported);
string msg = Utility.GetGeneralErrorMessage("OnlyPublicStaticMethodsCanBeImported");
throw new ArgumentException(msg);
}

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Reflection;
using Flee.InternalTypes;
using Flee.Resources;
namespace Flee.PublicTypes
{
@@ -278,7 +277,7 @@ namespace Flee.PublicTypes
Utility.AssertNotNull(importNamespace, "importNamespace");
if (importNamespace.Length == 0)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.InvalidNamespaceName);
string msg = Utility.GetGeneralErrorMessage("InvalidNamespaceName");
throw new ArgumentException(msg);
}

View File

@@ -1,5 +1,4 @@
using Flee.InternalTypes;
using Flee.Resources;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -65,7 +64,7 @@ namespace Flee.PublicTypes
if (_myVariables.ContainsKey(name) == true)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.VariableWithNameAlreadyDefined, name);
string msg = Utility.GetGeneralErrorMessage("VariableWithNameAlreadyDefined", name);
throw new ArgumentException(msg);
}
@@ -96,7 +95,7 @@ namespace Flee.PublicTypes
if (success == false & throwOnNotFound == true)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.UndefinedVariable, name);
string msg = Utility.GetGeneralErrorMessage("UndefinedVariable", name);
throw new ArgumentException(msg);
}
else
@@ -175,7 +174,7 @@ namespace Flee.PublicTypes
if (requiredType.IsAssignableFrom(valueType) == false)
{
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.VariableValueNotAssignableToType, valueType.Name, requiredType.Name);
string msg = Utility.GetGeneralErrorMessage("VariableValueNotAssignableToType", valueType.Name, requiredType.Name);
throw new ArgumentException(msg);
}
}