GetParameterNames() public method

Gets the parameter names.
public GetParameterNames ( ) : IEnumerable
return IEnumerable
        public async Task <bool> HasLinkParameter(string linkName, string parameterName)
        {
            string link;
            var    spaceRootDocument = await loadSpaceRootResource.Value.ConfigureAwait(false);

            if (spaceRootDocument != null && spaceRootDocument.HasLink(linkName))
            {
                link = spaceRootDocument.Link(linkName);
            }
            else
            {
                var rootDocument = await loadRootResource.Value.ConfigureAwait(false);

                if (rootDocument.HasLink(linkName))
                {
                    link = rootDocument.Link(linkName);
                }
                else
                {
                    return(false);
                }
            }

            var template = new UrlTemplate(link);

            return(template.GetParameterNames().Contains(parameterName));
        }
Exemplo n.º 2
0
        public bool HasLinkParameter(string linkName, string parameterName)
        {
            string link;

            if (loadSpaceRootResource.Value != null && loadSpaceRootResource.Value.HasLink(linkName))
            {
                link = loadSpaceRootResource.Value.Link(linkName);
            }
            else if (loadRootResource.Value.HasLink(linkName))
            {
                link = loadRootResource.Value.Link(linkName);
            }
            else
            {
                return(false);
            }

            var template = new UrlTemplate(link);

            return(template.GetParameterNames().Contains(parameterName));
        }