示例#1
0
        public DonorService(ISQLiteService sqliteService)
        {
            _sqliteService = sqliteService;

            conn = _sqliteService.GetConnection();

            conn.CreateTableAsync <Donor>().Wait();
        }
示例#2
0
        public SessionService(ISQLiteService sqliteService)
        {
            _sqliteService = sqliteService;

            conn = _sqliteService.GetConnection();

            conn.CreateTableAsync <Session>().Wait();
        }
        public MockDonorService(ISQLiteService sqliteService)
        {
            _sqliteService = sqliteService;

            conn = _sqliteService.GetConnection();

            conn.CreateTableAsync <Donor>().Wait();
            InitializeData();
        }
        protected override void OnStart(StartParameter parameter)
        {
            base.OnStart(parameter);

            ISQLiteService         service    = ServiceProvider.GetService <ISQLiteService>();
            ISQLiteAsyncConnection connection = service.OpenDefaultConnection();

            if (!connection.Connection.TableExists <Property>())
            {
                connection.CreateTableAsync <Property>();
            }

            if (!connection.Connection.TableExists <RecentSearch>())
            {
                connection.CreateTableAsync <RecentSearch>();
            }

            // Set the root ViewModel to be displayed at startup
            this.SetRootViewModel <PropertySearchViewModel>();
        }
示例#5
0
 public ServerHoundModule(ISQLiteService sqliteService)
 {
     SQLiteService = sqliteService;
 }
示例#6
0
 public ItemRepository(ISQLiteService sqliteService) : base(sqliteService)
 {
 }
示例#7
0
 public GenericRepository(ISQLiteService sqliteService)
 {
     _conn = sqliteService.SQLiteAsyncConnection;
 }
 public PollModule(ISQLiteService sqliteService, IPollHandlerService pollHandlerService)
 {
     SQLiteService      = sqliteService;
     PollHandlerService = pollHandlerService;
 }
示例#9
0
        public HomeModule(ISQLiteService sqliteService)
        {
            //Get("/discordAppModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "clientSecret", "appName", "botToken", "verified");

            //    var discordAppModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordAppModel>($"select * from DiscordApps {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordAppModels);
            //});

            //Get("/discordAppModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "clientSecret", "appName", "botToken", "verified");

            //    var discordAppModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordAppModel>($"select * from DiscordApps {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordAppModels);
            //});

            //Get("discordAppOwnerModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "userId");

            //    var discordAppOwnerModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordAppOwnerModel>($"select * from DiscordAppOwners {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordAppOwnerModels);
            //});

            //Get("/discordChannelModeratorModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "channelId", "roleId", "userId");

            //    var discordChannelModeratorModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordChannelModeratorModel>($"select * from DiscordChannelModerators {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordChannelModeratorModels);
            //});

            //Get("/discordGuildModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "guildId", "charPrefix");

            //    var discordGuildModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordGuildModel>($"select * from DiscordGuilds {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordGuildModels);
            //});

            //Get("/discordGuildModeratorModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "guildId", "roldId", "userId");

            //    var discordGuildModeratorModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordGuildModeratorModel>($"select * from DiscordGuildModerators {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordGuildModeratorModels);
            //});

            //Get("/discordGuildModuleModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "guildId", "module", "active");

            //    var discordGuildModuleModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<DiscordGuildModuleModel>($"select * from DiscordGuildModules {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(discordGuildModuleModels);
            //});

            //Get("/freeGameNotificationModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "guildId", "roleId", "channelId");

            //    var freeGameNotificationModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<FreeGameNotificationModel>($"select * from FreeGameNotification {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(freeGameNotificationModels);
            //});

            //Get("/serverHoundModel", async args =>
            //{
            //    var where = Where(Request, "id", "clientId", "guildId", "dBans");

            //    var serverHoundModels = await sqliteService.SQLiteAsyncConnection.QueryAsync<ServerHoundModel>($"select * from ServerHound {where.Item1} order by Id", where.Item2);

            //    return Response.AsJson(serverHoundModels);
            //});
        }
示例#10
0
 public NotificationService(ISQLiteService sqliteService)
 {
     _sqliteService = sqliteService;
 }
示例#11
0
        public MockStatsService(ISQLiteService sqliteService)
        {
            _sqliteService = sqliteService;

            conn = _sqliteService.GetConnection();
        }
示例#12
0
 public App(IItemRepository itemRepository, ISQLiteService sqliteService)
 {
     _itemRepository = itemRepository;
     _sqliteService  = sqliteService;
 }
 public FreeGameNotificationModule(ISQLiteService sqliteService, IDiscordAppService discordAppService)
 {
     SQLiteService     = sqliteService;
     DiscordAppService = discordAppService;
 }
示例#14
0
 public BaseModule(IDiscordAppService discordAppService, ISQLiteService sqliteService)
 {
     DiscordAppService = discordAppService;
     SQLiteService     = sqliteService;
 }
 public Bootstrapper(ISQLiteService sqliteService)
 {
     SQLiteService = sqliteService;
 }
 public Startup(ISQLiteService sqliteService)
 {
     SQLiteService = sqliteService;
 }
示例#17
0
 public CacheService(ISQLiteService sqliteService)
 {
     _sqliteService = sqliteService;
 }
示例#18
0
 public PollHandlerService(ISQLiteService sqliteService, IDiscordAppService discordAppService)
 {
     SQLiteService = sqliteService;
     DiscordAppService = discordAppService;
 }
 public DiscordAppService(IProgram program, ILoggerService loggerService, ISQLiteService sqliteService)
 {
     Program       = program;
     LoggerService = loggerService;
     SQLiteService = sqliteService;
 }
 public GuildModule(IProgram program, ISQLiteService sqliteService)
 {
     CommandService = program.CommandService;
     SQLiteService  = sqliteService;
 }
示例#21
0
 public BookmarkService(ISQLiteService sqliteService)
 {
     _sqliteService = sqliteService;
 }
示例#22
0
 public Tests()
 {
     _sqliteService  = new SQLiteService("testDatabase.db3");
     _itemRepository = new ItemRepository(_sqliteService);
 }