Inheritance: Attribute, IDirectRouteFactory, IRouteInfoProvider
        /// <summary>
        /// Initializes a new instance of the <see cref="RelativeRouteAttribute"/> class with the specified template.
        /// </summary>
        /// <param name="template">The pattern of the route to match.</param>
        /// <exception cref="System.ArgumentNullException">template</exception>
        public RelativeRouteAttribute(string template)
        {
            if (template == null)
                throw new ArgumentNullException("template");

            this.wrappedAttribute = new RouteAttribute(template);
        }
Ejemplo n.º 2
0
        public void EmptyCtor_Is_EmptyString()
        {
            RouteAttribute attr = new RouteAttribute();

            Assert.Equal(String.Empty, attr.Template);
        }