Skip to content

Releases: qingfeng346/Scorpio-CSharp

v1.0.7

11 Mar 11:05
Compare
Choose a tag to compare
  • 可以访问 c# 类私有变量和函数(去反射不支持)
  • 增加 let 关键字,用法同 var local
  • 增加 string.cs_format 函数,格式化c#字符串, 示例 :
//输出 00100,200
print(string.cs_format("{0:D5},{1}", toint(100), 200))
  • 增加 array.toarray 函数, sco array 转 c# array, 示例 :
// arr 为 int[] {100,200,300}
var arr = array.toarray([100,200,300], import_type("System.Int32"))
  • 增加 userdata.typeof 函数,获取c#类变量的类型(支持去反射), 示例 :
//c# 代码
public class TestClass {
    public int a;
    public string b { get; set; }
}
//sco 代码
var TestClass = import_type("TestClass")
//t1 的类型为 System.Int32 等同于 import_type("System.Int32")
var t1 = userdata.typeof(TestClass, "a")
//t1 的类型为 System.String
var t2 = userdata.typeof(TestClass, "b")

v1.0.5

15 Feb 05:47
Compare
Choose a tag to compare
  • 修复临时作用域变量自运算的BUG(多谢avatarANDY同学的反馈)

v1.0.4

20 Dec 11:10
Compare
Choose a tag to compare
  • 修复脚本长度小于10字符时, 解析出错的问题

v1.0.3

28 Nov 12:18
Compare
Choose a tag to compare
  • 修复新脚本解析格式化字符串的问题

v1.0.2

27 Nov 02:45
Compare
Choose a tag to compare
  • 修复struct无参构造函数调用失败
  • 全新的脚本解析,速度更快,增加语法更容易

v1.0.0

08 Nov 02:25
Compare
Choose a tag to compare
  • 第一个发行版
  • linux运行需要先安装 libunwind 和 icu,可以使用 yum install libunwind 和 yum install icu 安装