Exemplo n.º 1
0
    public async ValueTask StartAsync()
    {
        var bkSearchServerMethodInfos = _lpcServer.AddServerInstance(_bkSearcherServer);

        _logger.LogInformation("There are {Count} method bind to LPCServer: {Names}",
                               bkSearchServerMethodInfos.Count,
                               bkSearchServerMethodInfos.Select(x => x.Name));

        var notificationMethodInfos = _lpcServer.AddServerInstance(_notificationRecordServer);

        _logger.LogInformation("There are {Count} method bind to LPCServer: {Names}",
                               notificationMethodInfos.Count,
                               notificationMethodInfos.Select(x => x.Name));

        await _lpcServer.StartAsync();



        _afEventHub.RegisterHandler <SmallCacheExpiredEvent>(Action);
        await _afEventHub.EnsureStartAsync();
    }
Exemplo n.º 2
0
 public async ValueTask StartAsync()
 {
     _afEventHub.RegisterHandler <UserClickAfIconEvent>(HandleUserClickAfIconEvent);
     await _afEventHub.EnsureStartAsync();
 }