44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using System;
|
|
using ln.http.router;
|
|
using ln.http.exceptions;
|
|
using ln.http;
|
|
using ln.json.mapping;
|
|
using ln.types.odb.ng;
|
|
using System.Linq;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
namespace ln.json.http
|
|
{
|
|
public abstract class HttpObjectContainer : SimpleRouter
|
|
{
|
|
public HttpObjectContainer()
|
|
{
|
|
}
|
|
|
|
public abstract object GetNativeIdentity(string identityText);
|
|
public abstract object GetObjectIdentity(object o);
|
|
|
|
public abstract object CreateObject();
|
|
public abstract void DeleteObject(object o);
|
|
|
|
public abstract IEnumerable GetObjects();
|
|
public virtual object GetObject(object identity)
|
|
{
|
|
foreach (object o in GetObjects())
|
|
{
|
|
if (Object.Equals(identity, GetObjectIdentity(o)))
|
|
return o;
|
|
}
|
|
throw new KeyNotFoundException();
|
|
}
|
|
|
|
|
|
|
|
HttpResponse Request(HttpRequest request)
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|