Skip to content

Commit 5bafb31

Browse files
committed
updated webapi sample, added servicestack sample
1 parent 3e0e3e4 commit 5bafb31

36 files changed

+13036
-18
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using ServiceStack.ServiceInterface;
3+
using ServiceStack.WebHost.Endpoints;
4+
using System.Reflection;
5+
6+
public class Hello {
7+
public string Name { get; set; }
8+
}
9+
10+
public class HelloResponse {
11+
public string Result { get; set; }
12+
}
13+
14+
public class HelloService : Service
15+
{
16+
public object Any(Hello request)
17+
{
18+
return new HelloResponse { Result = "Hello, " + request.Name };
19+
}
20+
}
21+
22+
public class AppHost : AppHostHttpListenerBase {
23+
public AppHost() : base("StarterTemplate HttpListener", Assembly.GetExecutingAssembly()) { }
24+
25+
public override void Configure(Funq.Container container) {
26+
Routes
27+
.Add<Hello>("/hello")
28+
.Add<Hello>("/hello/{Name}");
29+
}
30+
}
31+
32+
var port = "http://*:999/";
33+
var appHost = new AppHost();
34+
appHost.Init();
35+
appHost.Start(port);
36+
37+
Console.WriteLine("listening on {0}", port);
38+
Console.ReadKey();
Binary file not shown.
Binary file not shown.
Binary file not shown.

samples/servicestackhost/ServiceStack.3.9.37/lib/net35/ServiceStack.xml

Lines changed: 3504 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

samples/servicestackhost/ServiceStack.Common.3.9.37/lib/net35/ServiceStack.Common.xml

Lines changed: 952 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

samples/servicestackhost/ServiceStack.Common.3.9.37/lib/net35/ServiceStack.Interfaces.xml

Lines changed: 1723 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)