private ServiceCache() { _instanceCache = new InstanceCache(); _dict = new Dictionary<RouteAttribute, MethodInfo>(); foreach (var a in WebServiceConfig.WebServiceConfiguration.Assemblies) { foreach (Type t in a.GetTypes()) { if (t.Implemented(typeof(IRESTfulApi))) { foreach (MethodInfo method in t.GetMethods()) { var route = method.GetSingleAttribute<RouteAttribute>(); if (route != null) _dict[route] = method; } } } } }
private ServiceCache() { _instanceCache = new InstanceCache(); _dict = new Dictionary <RouteAttribute, MethodInfo>(); foreach (var a in WebServiceConfig.WebServiceConfiguration.Assemblies) { foreach (Type t in a.GetTypes()) { if (t.Implemented(typeof(IRESTfulApi))) { foreach (MethodInfo method in t.GetMethods()) { var route = method.GetSingleAttribute <RouteAttribute>(); if (route != null) { _dict[route] = method; } } } } } }