コード例 #1
0
        public PooperService(DiscordClient discord, ConnectionStringProvider csp)
        {
            this.Discord = discord;
            this.Discord.GuildMemberUpdated += this.Discord_GuildMemberUpdated;
            this.Discord.GuildMemberAdded   += this.Discord_GuildMemberAdded;

            this.ConnectionStringProvider = csp;
        }
コード例 #2
0
 /// <summary>
 /// Creates a new database context with specified connection string provider.
 /// </summary>
 /// <param name="csp">Connection string provider to use when connecting to PostgreSQL.</param>
 public DatabaseContext(ConnectionStringProvider csp)
 {
     this.ConnectionStringProvider = csp;
 }
コード例 #3
0
 /// <summary>
 /// Creates a new database context with specified context options and connection string provider.
 /// </summary>
 /// <param name="options">Database context options.</param>
 /// <param name="csp">Connection string provider to use when connecting to PostgreSQL.</param>
 public DatabaseContext(DbContextOptions <DatabaseContext> options, ConnectionStringProvider csp)
     : base(options)
 {
     this.ConnectionStringProvider = csp;
 }