/// <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(); }
private static void Main(string[] args) { Console.WriteLine("Initializing the Bot..."); var botConfiguration = SetUpConfig.InitializeConfiguration(); var container = SetUpBot.NewBotDepedencyContainer(botConfiguration); WaitForCommands(container); }
/// <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(); }
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); }
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(); }
/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="Config"/> class. /// </summary> public Config() { SetUpConfig setup = Config.DefaultSetup; setup.Invoke(this); }
/// <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(); }
/// <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(); }