27 lines
662 B
C#
27 lines
662 B
C#
using System;
|
|
using BITKit;
|
|
using Cysharp.Threading.Tasks;
|
|
using Godot;
|
|
using IDIS.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace BITFactory;
|
|
/// <summary>
|
|
/// 标识码注册与查询服务
|
|
/// </summary>
|
|
public partial class IDIS_GodotBasedService:EntityComponent
|
|
{
|
|
public override void BuildService(IServiceCollection serviceCollection)
|
|
{
|
|
serviceCollection.AddTransient<IDIS_Service, IDIS_Service_SQLiteBased>();
|
|
}
|
|
|
|
public override async void OnStart()
|
|
{
|
|
base.OnStart();
|
|
var service = Entity.ServiceProvider.GetRequiredService<IDIS_Service>();
|
|
await service.IsExistAsync("123");
|
|
}
|
|
}
|