Esempio n. 1
0
        public static IDocumentationProviderEx GetDocumentationProviderEx(this ServicesContainer container)
        {
            var result = container.GetDocumentationProvider() as IDocumentationProviderEx;

            if (result == null)
            {
                var msg = string.Format("{0} is not registered as {1} service provider.",
                                        typeof(WebApiHtmlDocumentationProvider),
                                        typeof(IDocumentationProvider));
                throw new InvalidOperationException(msg);
            }

            return(result);
        }