CustomAsset() public method

public CustomAsset ( string path, Assembly resourceAssembly, string resourceName ) : void
path string
resourceAssembly System.Reflection.Assembly
resourceName string
return void
Example #1
0
        public static SwaggerUiConfig MobileAppUi(this SwaggerUiConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            Assembly thisAssembly = typeof(SwaggerUiConfigExtensions).Assembly;

            config.CustomAsset("o2c-html", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.o2c.html");
            config.CustomAsset("lib/swagger-oauth-js", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.swagger-oauth.js");

            return(config);
        }
Example #2
0
        public static SwaggerUiConfig MobileAppUi(this SwaggerUiConfig config, HttpConfiguration httpConfig)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            if (httpConfig == null)
            {
                throw new ArgumentNullException("httpConfig");
            }

            httpConfig.MessageHandlers.Add(new SwaggerUiSecurityFilter(httpConfig));

            Assembly thisAssembly = typeof(SwaggerUiConfigExtensions).Assembly;

            config.CustomAsset("o2c-html", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.o2c.html");
            config.CustomAsset("swagger-ui-min-js", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.swagger-ui.min.js");
            config.CustomAsset("index", thisAssembly, "Microsoft.Azure.Mobile.Server.Swagger.index.html");

            return(config);
        }