2019-02-14 09:19:43 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ln.http.resources
|
|
|
|
|
{
|
2019-11-26 12:21:23 +01:00
|
|
|
|
public class ResourceApplication
|
2019-02-14 09:19:43 +01:00
|
|
|
|
{
|
|
|
|
|
public Resource RootResource { get; set; }
|
2019-11-26 12:21:23 +01:00
|
|
|
|
public HttpRouter HttpRouter { get; set; }
|
2019-02-14 09:19:43 +01:00
|
|
|
|
|
2019-11-26 12:21:23 +01:00
|
|
|
|
public ResourceApplication(Resource rootResource,HttpRouter httpRouter)
|
2019-02-14 09:19:43 +01:00
|
|
|
|
{
|
2019-11-26 12:21:23 +01:00
|
|
|
|
RootResource = rootResource;
|
|
|
|
|
HttpRouter = httpRouter ?? new ResourceRouter(this);
|
2019-02-14 09:19:43 +01:00
|
|
|
|
}
|
2019-11-26 12:21:23 +01:00
|
|
|
|
public ResourceApplication(Resource rootResource)
|
|
|
|
|
:this(rootResource, null) { }
|
|
|
|
|
public ResourceApplication()
|
|
|
|
|
:this(new BaseResource(""))
|
2019-02-14 09:19:43 +01:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|