public static void ThrowIfNotModelWithAttributeRoutes(this ActionModel actionModel, ILocalizer localizer) { actionModel.ThrowIfNotOriginalModel(localizer); if (!actionModel.HasAttributeRoutes()) { throw new ArgumentException("ActionModel with AttributeRoutes was expected."); } }