1
0

GUI 啟動完成

This commit is contained in:
2024-03-25 17:39:44 +08:00
parent 739e92cee8
commit 3382627c8c
18 changed files with 299 additions and 48 deletions

View File

@@ -1,21 +1,28 @@
using CoreProfilerExample.Repository.Interfaces;
using CoreProfilerExample.Common.Extensions;
using CoreProfilerExample.Repository.Interfaces;
using CoreProfilerExample.Service.Extensions;
using CoreProfilerExample.Service.Interfaces;
using CoreProfilerExample.Service.Models.Dtos;
using CoreProfilerExample.Service.Models.ParameterDtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
namespace CoreProfilerExample.Service.Implements
{
public class WeatherService(IWeatherForecastRepository weatherForecast) : IWeatherService
public class WeatherService : IWeatherService
{
public WeatherService(IWeatherForecastRepository weatherForecast)
{
this.weatherForecast = weatherForecast;
}
private readonly IWeatherForecastRepository weatherForecast = null!;
public Task<GetWeatherForecastDto> GetWeatherForecastAsync(GetWeatherForecastParameterDto parameterDto)
{
return weatherForecast.GetAsync(parameterDto.ForecastDays).ToDtoAsync();
using (MethodBase.GetCurrentMethod()?.ProfilingStep())
{
return weatherForecast.GetAsync(parameterDto.ForecastDays).ToDtoAsync();
}
}
}
}