blob: 240e6f32d4aaa83a62d3752d72bedfe6271b4d1e (
plain)
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
|
using System;
using System.Collections.Generic;
namespace ServiceStack.Host
{
public class ServiceMetadata
{
public ServiceMetadata()
{
this.OperationsMap = new Dictionary<Type, Type>();
}
public Dictionary<Type, Type> OperationsMap { get; protected set; }
public void Add(Type serviceType, Type requestType, Type responseType)
{
this.OperationsMap[requestType] = serviceType;
}
public Type GetServiceTypeByRequest(Type requestType)
{
Type serviceType;
OperationsMap.TryGetValue(requestType, out serviceType);
return serviceType;
}
}
}
|