using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.TestApp.Application.Dto;
namespace Volo.Abp.TestApp.Application;
///
/// A documented application service for testing API descriptions.
///
///
/// This service is used in integration tests to verify XML doc extraction.
///
[Description("Documented service description from attribute")]
[Display(Name = "Documented Service")]
public class DocumentedAppService : ApplicationService, IDocumentedAppService
{
///
/// Gets a greeting message for the specified name.
///
/// The name of the person to greet.
/// A personalized greeting message.
[Description("Get greeting description from attribute")]
[Display(Name = "Get Greeting")]
public async Task GetGreetingAsync(string name)
{
return await Task.FromResult($"Hello, {name}!");
}
///
/// Creates a documented item.
///
/// The input for creating a documented item.
/// The created documented item.
public async Task CreateAsync(DocumentedDto input)
{
return await Task.FromResult(input);
}
///
/// Searches for items matching the query.
///
/// The search query string.
/// The maximum number of results to return.
/// A list of matching item names.
public async Task SearchAsync(
[Description("Query param description from attribute")] [Display(Name = "Search Query")] string query,
int maxResults)
{
return await Task.FromResult($"Results for {query}");
}
public async Task DeleteAsync(int id)
{
await Task.CompletedTask;
}
}