public CallDescriptor(ControllerDescriptor controller, MethodInfo method) { Controller = controller; Descriptor = MethodDescriptorAttribute.GetDescriptor(method); CacheHeader = CachingAttribute.GetAttribute(method); TokenRequirements = RequiresTokenAttribute.GetAttribute(method); Info = method; Parameters = Info.GetParameters().Select(x => new ParameterDescriptor(x)).ToList(); JsonSerialization = JsonSerializerAttribute.GetAttribute(method); Attributes = Info.GetCustomAttributes().ToDictionary(x => x.GetType(), y => y); }
public void AddRoute(string url, ControllerDescriptor descriptor) { Controllers.Add(url.ToLower(), descriptor); }
public ControllerRoute(string path, ControllerDescriptor controller) : base(path) { Controller = controller; }