コード例 #1
0
        public SQliteService(IModelConverterService converter)
        {
            sqliteConnection = DependencyService.Get <ISQLite>().GetConnection();
            sqliteConnection.CreateTable <MobileCategory>();
            sqliteConnection.CreateTable <MobileEvent>();
            sqliteConnection.CreateTable <MobileUser>();

            converterService = converter;
        }
コード例 #2
0
        public void SetUp()
        {
            this._converterService = new ModelConverterService();
            IEventService eventService = new EventbriteService();
            var           location     = Cities.Amberg.GetLocation();

            this._events =
                eventService.GetEvents(location.Item1, location.Item2, new EventDateRange {
                Description = "Weekend"
            }).Result
                .ToArray();


            var fileName = "SQliteDatabaseTest.db3";
            var path     = Path.Combine(Path.GetTempPath(), fileName);

            Console.WriteLine(path);
            if (File.Exists(path))
            {
                File.Delete(path);
            }

            this._connection = new SQLiteConnection(new SQLite.Net.Platform.Win32.SQLitePlatformWin32(), path, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create | SQLiteOpenFlags.SharedCache);
            this._connection.CreateTable <MobileCategory>();
            this._connection.CreateTable <MobileUser>();
            this._connection.CreateTable <MobileEvent>();


            this._dummyUser = new MobileUser
            {
                Guid                        = "max.urvent",
                Gender                      = 0,
                EMail                       = "*****@*****.**",
                Birthday                    = DateTime.Now,
                AccessToken                 = "token",
                AccessTokenReceived         = DateTime.Now,
                AttractedTo                 = 1,
                EventDateRange              = 0,
                ExcludedCategories          = new List <MobileCategory>(),
                FacebookAccessToken         = "fbToken",
                FacebookAccessTokenReceived = DateTime.Now,
                MaxDistance                 = 20,
                Longitude                   = 0,
                Latitude                    = 0,
                LastLogin                   = DateTime.Now,
                UserEvents                  = new List <MobileEvent>()
            };
        }
コード例 #3
0
 public SectionService()
 {
     converter = new SectionConverterService();
 }
コード例 #4
0
 public ReviewService()
 {
     converter = new ReviewConverterService();
 }