forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppHost.cs
More file actions
36 lines (30 loc) · 913 Bytes
/
AppHost.cs
File metadata and controls
36 lines (30 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using Funq;
using ServiceStack.Configuration;
using ServiceStack.IntegrationTests.ServiceInterface;
using ServiceStack.Logging;
using ServiceStack.Logging.Support.Logging;
using ServiceStack.WebHost.Endpoints;
namespace ServiceStack.IntegrationTests.Host.Web
{
/// <summary>
/// An example of a AppHost to have your services running inside a webserver.
/// </summary>
public class AppHost
: AppHostBase
{
private static ILog log;
public AppHost()
: base("ServiceStack IntegrationTests", typeof(PingService).Assembly)
{
LogManager.LogFactory = new DebugLogFactory();
log = LogManager.GetLogger(typeof(AppHost));
}
public override void Configure(Container container)
{
container.Register<IResourceManager>(new ConfigurationResourceManager());
var config = container.Resolve<IResourceManager>();
log.InfoFormat("AppHost Configured: " + DateTime.Now);
}
}
}