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.
|
|
|
using EC.App.Core;
|
|
|
|
using Furion.DataValidation;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using System;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
namespace OnvifWebServer.Controllers.Onvif
|
|
|
|
{
|
|
|
|
[ApiController]
|
|
|
|
[ApiDescriptionSettings("Test")]
|
|
|
|
[Route("test/[controller]")]
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|