public FormatManager(NServiceMVC.NsConfiguration config) { if (config.AllowJson) JSON = new JsonFormatHandler(); if (config.AllowXml) XML = new XmlFormatHandler(); AllowXhtml = config.AllowXhtml; }
/// <summary> /// Creates a new instance of the reflector /// </summary> /// <param name="config">The current NServiceMVC configuration</param> /// <param name="formatter">The current NServiceMVC FormatManager</param> public MetadataReflector(NServiceMVC.NsConfiguration config, Formats.FormatManager formatter) { Configuration = config; Formatter = formatter; // note: must initialize model before route ModelTypes = FindModelTypes(); BasicModelTypes = FindBasicModelTypes(); RouteDetails = FindRouteDetails(); }