Пример #1
0
        public string CreateUrlFromInput(object input)
        {
            if (Input == null)
            {
                throw new InvalidOperationException("Cannot call this method if the RouteDefinition has not input type");
            }

            return(Input.CreateUrlFromInput(input));
        }
Пример #2
0
        public string CreateUrlFromInput(object input)
        {
            if (input is IMakeMyOwnUrl)
            {
                return(input.As <IMakeMyOwnUrl>().ToUrlPart(Pattern));
            }


            if (input == null)
            {
                return(Pattern);
            }

            if (Input == null)
            {
                throw new InvalidOperationException("Cannot call this method if the RouteDefinition has not input type");
            }

            return(Input.CreateUrlFromInput(input));
        }