你好,我刚刚在VS中创建了一个新鲜的空webApp,并安装了servicestack。
我在寻找响应到内存中的缓存(通过MemCached),但是在服务Any方法中,我无法访问base.RequestContext对象。
这个类确实继承了ServiceStack.Service (以前不是ServiceStack.ServiceInterface.Service吗?)
public class UtentiService : Service
{
public object Get(I_Utenti request)
{
var cacheKey =
如果没有类函数,我无法访问“价格”变量,我能知道为什么吗?
这是密码。
class var price : Int {
return 25000
}
class func display()
{
println("The \(name) with \(model) was released in \(year) with rs.\(price)")
}
var Foo = (function () {
var cls = function () {
this.prototype = {
sayhi: function () {
alert('hi');
}
};
};
cls.staticMethod = function () {};
return cls;
})();
var f = new Foo();
为什么我无法访问我的sayhi方法?this不是引用了cls变量吗