「ServiceStack/はじめに/最初のWebサービスを作ってみる」の版間の差分
| (2人の利用者による、間の2版が非表示) | |||
| 42行目: | 42行目: | ||
== ステップ3: Webサービスを作ってみる == | == ステップ3: Webサービスを作ってみる == | ||
もし「Global.asax. | もし「Global.asax.cs」ファイルが無ければ手動で追加する。Xamarin Studioの新しいファイルダイアログでは「ASP.NET Web Forms」の「コードビハインド付きGlobal.asax」である。 | ||
まず、ServiceStackのサービスは3つの要素から構成されるという基本を覚えよう。 | まず、ServiceStackのサービスは3つの要素から構成されるという基本を覚えよう。 | ||
| 92行目: | 92行目: | ||
using System.Web; | using System.Web; | ||
using System.Web.SessionState; | using System.Web.SessionState; | ||
using ServiceStack | |||
using ServiceStack; | |||
public class Global : System.Web.HttpApplication | public class Global : System.Web.HttpApplication | ||
{ | { | ||
public class HelloAppHost : AppHostBase | public class HelloAppHost : ServiceStack.AppHostBase | ||
{ | { | ||
//Tell Service Stack the name of your application and where to find your web services | //Tell Service Stack the name of your application and where to find your web services | ||
| 115行目: | 116行目: | ||
</source> | </source> | ||
これで完成である。ServiceStackに関するすべての構成はAppHostで行われる。いわゆるアプリケーションのエントリポイントのようなものである。 | |||
== 動かしてみる == | == 動かしてみる == | ||
| 123行目: | 124行目: | ||
== 外部リンク == | == 外部リンク == | ||
* https://github.com/ServiceStack/ServiceStack/wiki/Create-your-first-webservice | * https://github.com/ServiceStack/ServiceStack/wiki/Create-your-first-webservice | ||
== 参考文献 == | |||
{{reflist}} | |||
{{stub}} | {{stub}} | ||