public ContentRouteConstraint(IContentRouter contentRouter, IContentTypeExpander contentTypeExpander, string contentTypeorGroupIdOrTypeName = null) { ContentRouter = contentRouter; ContentTypeExpander = contentTypeExpander; Types = contentTypeorGroupIdOrTypeName != null?ContentTypeExpander.Expand(contentTypeorGroupIdOrTypeName) : Enumerable.Empty <ContentTypeDescriptor>(); if (Types == null) { throw new Exception($"Routing could not use the constraint :contentroute({contentTypeorGroupIdOrTypeName}) because it did not resolve to a content type or group or type name"); } }
public ContentRouteConstraint(IContentRouter contentRouter) { ContentRouter = contentRouter; }