Esempio n. 1
0
        public static bool IsOfResource(this ActionDescriptor action, string resourceCode, EndpointScope scope)
        {
            var hateoasAttr = action.GetHateoasAttribute();

            return(hateoasAttr.ResourceCode == resourceCode &&
                   hateoasAttr.Scope == scope);
        }
Esempio n. 2
0
        public static bool IsActionFor(this ActionDescriptor action, string resourceCode, EndpointScope scope)
        {
            bool isHttpGet = action.IsHttpGet();

            if (isHttpGet)
            {
                return(false);
            }

            var hateoasAttr = action.GetHateoasAttribute();

            return(hateoasAttr.ResourceCode == resourceCode &&
                   hateoasAttr.Scope == scope);
        }