sscorlib -运行时库. 类似于.NET的mscore.lib,提供javascipt的语言扩展,包括类机制的自动转换等。
命名空间: system
ssfx.Core.dll - 核心库. 提供核心编程模型,UI概念,网络
命名空间: scriptFx, scriptFx.Net, script.UI
ssfx.UI.Forms.dll - UI控件库
命名空间: scriptFx.UI.Forms
ssfx.Reflection.dll - 类似.NET的反射工具
ssfx.XDAjax.dll - 跨域名AJAX,使用JSONP
ssfso.dll - 文件系统APIs
ssagctrl.dll - Microsoft Sliverlight XAML DOM
ssgadget.dll - Windows Vista Sidebar Gadgets
ssve4.dll - Microsoft Virtual Earth APIs
ssfeeds.dll - RSS Feeds
测试运行时库提供的Javascript语言扩展能力的demo:
///HelloWorld.cs
using System;
//using ScriptFX;
//using ScriptFX.UI;
namespace Easyfin
{
public class HelloWorld
{
private int _m;
public HelloWorld(int m)
{
this._m = m;
}
public int get()
{
return _m;
}
}
}
// ClassLibrary1.js
// 编译生成的Javascript
Type.createNamespace('Easyfin');
////////////////////////////////////////////////////////////////////////////////
// Easyfin.HelloWorld
Easyfin.HelloWorld = function Easyfin_HelloWorld(m) {
this._m = m;
}
Easyfin.HelloWorld.prototype = {
_m: 0,
get: function Easyfin_HelloWorld$get() {
return this._m;
}
}
Easyfin.HelloWorld.createClass('Easyfin.HelloWorld');
// ---- Do not remove this footer ----
// Generated using Script# v0.4.5.0 (http://projects.nikhilk.net)
// -----------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>HelloWorld Script#</title>
<script type="text/javascript" src="sscorlib.js"></script>1:
2: <script type="text/javascript" src="HelloWorld.js">1: </script>
2: </head>
3:
4: <body>
5: <script type="text/javascript">6: var obj = new Easyfin.HelloWorld(1);7: alert(obj.get());
8:
</script>
</body>
</html>
![script#helloworld](https://www.cnblogs.com/images/cnblogs_com/chioyang/WindowsLiveWriter/Script_14B41/script_helloworld_thumb_7a5d7919-5889-4090-9235-91f6513854f5.jpg)