Exemplo n.º 1
0
        public static bool IsMatchPackagePublish(
            this INugetServerProvider provider,
            HttpContext context)
        {
            if (!provider.IsMatchVerbs(context,
                                       HttpMethods.IsPut,
                                       HttpMethods.IsDelete))
            {
                return(false);
            }

            return(provider.IsMatchResource(
                       context,
                       NugetServerResourceType.PackagePublish
                       ));
        }
Exemplo n.º 2
0
        public static bool IsMatchPackageBaseAddress(
            this INugetServerProvider provider,
            HttpContext context
            )
        {
            if (!provider.IsMatchVerbs(context,
                                       HttpMethods.IsHead,
                                       HttpMethods.IsGet))
            {
                return(false);
            }

            return(provider.IsMatchResource(
                       context,
                       NugetServerResourceType.PackageBaseAddress
                       ));
        }