完全清除Resource依赖, 目前可以直接使用源码
This commit is contained in:
@@ -4,7 +4,6 @@ using System.Reflection;
|
||||
using Flee.ExpressionElements;
|
||||
using Flee.ExpressionElements.Base;
|
||||
using Flee.PublicTypes;
|
||||
using Flee.Resources;
|
||||
using IDynamicExpression = Flee.PublicTypes.IDynamicExpression;
|
||||
using System;
|
||||
|
||||
@@ -161,7 +160,7 @@ namespace Flee.InternalTypes
|
||||
Utility.AssertNotNull(owner, "owner");
|
||||
if (_myOptions.OwnerType.IsAssignableFrom(owner.GetType()) == false)
|
||||
{
|
||||
string msg = Utility.GetGeneralErrorMessage(GeneralErrorResourceKeys.NewOwnerTypeNotAssignableToCurrentOwner);
|
||||
string msg = Utility.GetGeneralErrorMessage("NewOwnerTypeNotAssignableToCurrentOwner");
|
||||
throw new ArgumentException(msg);
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@ using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using Flee.Resources;
|
||||
|
||||
namespace Flee.InternalTypes
|
||||
{
|
||||
@@ -321,8 +320,9 @@ namespace Flee.InternalTypes
|
||||
|
||||
public static int GetILGeneratorLength(ILGenerator ilg)
|
||||
{
|
||||
System.Reflection.FieldInfo fi = typeof(ILGenerator).GetField("m_length", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
return (int)fi.GetValue(ilg);
|
||||
//System.Reflection.FieldInfo fi = typeof(ILGenerator).GetField("m_length", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
//return (int)fi.GetValue(ilg);
|
||||
return ilg.ILOffset;
|
||||
}
|
||||
|
||||
public static bool IsLongBranch(int startPosition, int endPosition)
|
||||
@@ -338,14 +338,14 @@ namespace Flee.InternalTypes
|
||||
|
||||
public static string GetGeneralErrorMessage(string key, params object[] args)
|
||||
{
|
||||
string msg = FleeResourceManager.Instance.GetGeneralErrorString(key);
|
||||
return string.Format(msg, args);
|
||||
string msg = $"{key}";
|
||||
return $"[{msg}]{string.Join(',',args)}";
|
||||
}
|
||||
|
||||
public static string GetCompileErrorMessage(string key, params object[] args)
|
||||
{
|
||||
string msg = FleeResourceManager.Instance.GetCompileErrorString(key);
|
||||
return string.Format(msg, args);
|
||||
string msg = $"{key}";
|
||||
return $"[{msg}]{string.Join(',', args)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user