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.

37 lines
657 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
{
[ApiController]
3 years ago
[ApiDescriptionSettings("Test")]
[Route("test/[controller]")]
3 years ago
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;
}
}
}