Client/AntDesignClient/Gardener.Client.AntDesignUi/Services/ClientMessageService.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
//  gitee:https://gitee.com/hgflydream/Gardener 
//  issues:https://gitee.com/hgflydream/Gardener/issues 
// -----------------------------------------------------------------------------

using AntDesign;
using Gardener.Client.Base;
using Gardener.Client.Base.Services;
using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gardener.Client.AntDesignUi.Services
{
    [ScopedService]
    public class ClientMessageService : IClientMessageService
    {
        private readonly MessageService messageService;

        public ClientMessageService(MessageService messageService)
        {
            this.messageService = messageService;
        }

        public void Error(string content, double? duration = null, Action? onClose = null)
        {
            messageService.Error(content, duration, onClose);
        }

        public Task ErrorAsync(string content, double? duration = null, Action? onClose = null)
        {
            return messageService.Error(content, duration, onClose);
        }

        public void Info(string content, double? duration = null, Action? onClose = null)
        {
            messageService.Info(content, duration, onClose);
        }

        public Task InfoAsync(string content, double? duration = null, Action? onClose = null)
        {
           return messageService.Info(content, duration, onClose);
        }

        public void Loading(string content, double? duration = null, Action? onClose = null)
        {
            messageService.Loading(content, duration, onClose);
        }

        public Task LoadingAsync(string content, double? duration = null, Action? onClose = null)
        {
            return messageService.Loading(content, duration, onClose);
        }

        public void Success(string content, double? duration = null, Action? onClose = null)
        {
后面还有 29 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。