Ejemplo n.º 1
0
 public static FriendsCache OpenOrCreate(string filename)
 {
     if (System.IO.File.Exists(filename))
         return new FriendsCache(filename);
     else
     {
         FriendsCache ret = new FriendsCache(filename);
         ret.CreateTables();
         ret.CreateIndexes();
         return ret;
     }
 }
Ejemplo n.º 2
0
 public FriendsCache(string filename)
 {
     var builder = new SQLiteConnectionStringBuilder
     {
         BinaryGUID = true,
         DataSource = filename,
         Version = 3
     };
     string connectionString = builder.ToString();
     m_sqlCon = new SQLiteConnection(connectionString);
     m_sqlCon.Open();
     m_instance = this;
 }