You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
640 B

3 years ago
using EC.App.Core;
using Furion.DataValidation;
using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
namespace OnvifWebServer.Controllers.Onvif
{
[Route("test/[controller]")]
[ApiDescriptionSettings("Test")]
public class TestController : ApiController
{
public TestController()
{
}
[HttpGet]
public string TestString(string ip)
{
return ip;
}
[HttpGet]
public string TestValid([Required][DataValidation(ValidationTypes.IPv4)] string ip)
{
return ip;
}
[HttpGet]
public string TestException(string ip)
{
throw new Exception("test");
return ip;
}
}
}