backend/Magic.Core/Extension/BStyleServiceExtension.cs

(完整代码) 1KB

using Microsoft.Extensions.DependencyInjection;
using System;

namespace Magic.Core;

/// <summary>
/// B格
/// </summary>
public static class BStyleServiceExtension
{
    public static void AddBStyle(this IServiceCollection services, Action<BStyleServiceBuilder> configure)
    {
        var builder = new BStyleServiceBuilder();
        configure(builder);
    }
}
public class BStyleServiceBuilder
{
    public void UseDefault()
    {
        Console.ForegroundColor = ConsoleColor.Blue;
        Console.WriteLine(@"  __  __                   _              _   _   ______   _______ 
 |  \/  |                 (_)            | \ | | |  ____| |__   __|
 | \  / |   __ _    __ _   _    ___      |  \| | | |__       | |   
 | |\/| |  / _` |  / _` | | |  / __|     | . ` | |  __|      | |   
 | |  | | | (_| | | (_| | | | | (__   _  | |\  | | |____     | |   
 |_|  |_|  \__,_|  \__, | |_|  \___| (_) |_| \_| |______|    |_|   
                    __/ |                                          
                   |___/      ");
        Console.ForegroundColor = ConsoleColor.Red;
        Console.WriteLine(@"

gitee: https://gitee.com/zhengguojing/magic-net");
        Console.ForegroundColor = ConsoleColor.Yellow;
        Console.WriteLine(@"期待您的PR,让.net更好!

");
    }

    public void UseOther()
    {
        System.Console.WriteLine(@"另一个BStyle");
    }
}

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

AI 解读

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

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