コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OsirisContext"/> class.
 /// </summary>
 /// <param name="setupConfigMethod">
 /// The setup config method.
 /// </param>
 /// <param name="authenticator">
 /// The authenticator.
 /// </param>
 public OsirisContext(SetUpConfig setupConfigMethod, IAuthenticator authenticator)
 {
     this.Config       = new Config(setupConfigMethod);
     this.Communicator = new ApiCommunicator(this)
     {
         ApiAuthenticator = authenticator
     };
     this.Logger = new Logger();
 }
コード例 #2
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Initializing the Bot...");

            var botConfiguration = SetUpConfig.InitializeConfiguration();
            var container        = SetUpBot.NewBotDepedencyContainer(botConfiguration);

            WaitForCommands(container);
        }
コード例 #3
0
ファイル: Orion.cs プロジェクト: shane7218/OrionWindows
 /// <summary>
 /// Initializes a new instance of the <see cref="Orion"/> class.
 /// </summary>
 /// <param name="setupConfigMethod">
 /// The setup config method.
 /// </param>
 /// <param name="authenticator">
 /// The authenticator.
 /// </param>
 public Orion(SetUpConfig setupConfigMethod, IAuthenticator authenticator)
 {
     this.Config       = new Config(setupConfigMethod);
     this.Communicator = new ApiCommunicator(this)
     {
         ApiAuthenticator = authenticator
     };
     this.Logger = new DeleteMeLogger();
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: MisterJames/devchatterbot
        private static void Main(string[] args)
        {
            Console.WriteLine("Initializing the Bot...");

            (string connectionString, TwitchClientSettings clientSettings) = SetUpConfig.InitializeConfiguration();

            BotMain botMain = SetUpBot.NewBot(clientSettings, connectionString);

            WaitForCommands(botMain);
        }
コード例 #5
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Initializing the Bot...");
            TwitchClientSettings clientSettings = SetUpConfig.InitializeConfiguration();

            DbContextOptions <AppDataContext> options = new DbContextOptionsBuilder <AppDataContext>()
                                                        .UseInMemoryDatabase("fake-data-db")
                                                        .Options;

            var efGenericRepo = new EfGenericRepo(new AppDataContext(options));

            new FakeData(efGenericRepo).Initialize();

            Console.WriteLine("To exit, press [Ctrl]+c");

            BotMain botMain = SetUpBot.NewBot(clientSettings, efGenericRepo);

            botMain.Run();
        }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Config"/> class.
 /// </summary>
 /// <param name="setupMethod">
 /// The setup method.
 /// </param>
 public Config(SetUpConfig setupMethod)
 {
     setupMethod.Invoke(this);
 }
コード例 #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Config"/> class.
        /// </summary>
        public Config()
        {
            SetUpConfig setup = Config.DefaultSetup;

            setup.Invoke(this);
        }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OsirisContext"/> class.
 /// </summary>
 /// <param name="setupConfigMethod">
 /// The setup config method.
 /// </param>
 public OsirisContext(SetUpConfig setupConfigMethod)
 {
     this.Config       = new Config(setupConfigMethod);
     this.Communicator = new ApiCommunicator(this);
     this.Logger       = new Logger();
 }
コード例 #9
0
ファイル: Orion.cs プロジェクト: shane7218/OrionWindows
 /// <summary>
 /// Initializes a new instance of the <see cref="Orion"/> class.
 /// </summary>
 /// <param name="setupConfigMethod">
 /// The setup config method.
 /// </param>
 public Orion(SetUpConfig setupConfigMethod)
 {
     this.Config       = new Config(setupConfigMethod);
     this.Communicator = new ApiCommunicator(this);
     this.Logger       = new DeleteMeLogger();
 }