Debug logs in fetcher/sender, fixed error in HS

This commit is contained in:
2020-03-02 18:10:19 +04:00
parent a151c37f94
commit ef7d8a7d14
5 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -160,7 +160,9 @@ namespace Kruzya.TelegramBot.Core
private void HookAppDomain()
{
AppDomain.CurrentDomain.AssemblyResolve += delegate(object? sender, ResolveEventArgs args)
var appDomain = AppDomain.CurrentDomain;
appDomain.AssemblyResolve += delegate(object? sender, ResolveEventArgs args)
{
var basePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string assemblyPath = Path.Combine(basePath, new AssemblyName(args.Name).Name + ".dll");
+2 -1
View File
@@ -3,13 +3,14 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BotFramework;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Telegram.Bot.Exceptions;
using Telegram.Bot.Types;
namespace Kruzya.TelegramBot.Core.Service
{
public abstract class AbstractTimedHostedService
public abstract class AbstractTimedHostedService : IHostedService, IDisposable
{
private Timer _timer;