Created
June 29, 2015 03:41
-
-
Save theoutlander/f4b53d2b0164685bcc00 to your computer and use it in GitHub Desktop.
Servicestack date issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using Funq; | |
using ServiceStack; | |
using ServiceStack.Text; | |
namespace ServiceStackBugs | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
new AppHost().Init().Start("http://*:8088/"); | |
"ServiceStack SelfHost listening at http://localhost:8088 ".Print(); | |
Process.Start("http://localhost:8088/"); | |
Console.ReadLine(); | |
} | |
} | |
[Route("/test")] | |
public class Test | |
{ | |
public DateTime? Date { get; set; } | |
} | |
public class AppHost : AppSelfHostBase | |
{ | |
/// <summary> | |
/// Default constructor. | |
/// Base constructor requires a name and assembly to locate web service classes. | |
/// </summary> | |
public AppHost() | |
: base("ServiceStackBugs", typeof(MyServices).Assembly) | |
{ | |
} | |
/// <summary> | |
/// Application specific configuration | |
/// This method should initialize any IoC resources utilized by your web service classes. | |
/// </summary> | |
/// <param name="container"></param> | |
public override void Configure(Container container) | |
{ | |
} | |
} | |
public class MyServices : Service | |
{ | |
public object Any(Test request) | |
{ | |
Console.WriteLine(request.Date); | |
return request; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment