コード例 #1
0
        public void OnLoad(IServiceProvider serviceProvider)
        {
            try
            {
                _trace                   = serviceProvider.GetService(typeof(TopicTracer)) as TopicTracer;
                _attributeService        = serviceProvider.GetService(typeof(IAttributeService)) as IAttributeService;
                _chatMessageService      = serviceProvider.GetService(typeof(IChatMessageService)) as IChatMessageService;
                _chatReassignmentService = serviceProvider.GetService(typeof(IChatReassignmentService)) as IChatReassignmentService;

                Console.WriteLine("[{0}] - OnLoad", BotName);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
コード例 #2
0
ファイル: GoogleBot.cs プロジェクト: abi2107/ChatBot
        public void OnLoad(IServiceProvider serviceProvider)
        {
            try
            {
                _trace                   = serviceProvider.GetService(typeof(TopicTracer)) as TopicTracer;
                _attributeService        = serviceProvider.GetService(typeof(IAttributeService)) as IAttributeService;
                _chatMessageService      = serviceProvider.GetService(typeof(IChatMessageService)) as IChatMessageService;
                _chatReassignmentService = serviceProvider.GetService(typeof(IChatReassignmentService)) as IChatReassignmentService;

                ServicePointManager.Expect100Continue      = false;
                ServicePointManager.DefaultConnectionLimit = 2000;
                WebRequest.DefaultWebProxy = null;

                Console.WriteLine("[{0}] - OnLoad", BotName);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }