30 lines
630 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Npgsql;
namespace skyscraper5.Data.PostgreSql
{
public class PostgresqlToken
{
private readonly PostgresqlDataStore _postgresqlDataStore;
public PostgresqlToken(PostgresqlDataStore postgresqlDataStore)
{
_postgresqlDataStore = postgresqlDataStore;
}
public NpgsqlConnection GetConnection()
{
return new NpgsqlConnection(_postgresqlDataStore.connectionStringBuilder.ToString());
}
public void EnqueueTask(WriterTask task)
{
_postgresqlDataStore.EnqueueTask(task);
}
}
}