public static bool IsOfResource(this ActionDescriptor action, string resourceCode, EndpointScope scope) { var hateoasAttr = action.GetHateoasAttribute(); return(hateoasAttr.ResourceCode == resourceCode && hateoasAttr.Scope == scope); }
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); }