forked from fajiao/OnvifServer-CSharp
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.
40 lines
681 B
40 lines
681 B
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()
|
|
{
|
|
}
|
|
|
|
#region Operate
|
|
|
|
[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;
|
|
}
|
|
|
|
#endregion Operate
|
|
}
|
|
}
|