Exemplo n.º 1
0
 private void writeAttributesDo(StaticClassState staticClassState)
 {
     foreach (var field in classType.GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic))
     {
         string name = field.Name;
         field.SetValue(name, attributes [name]);
     }
 }
Exemplo n.º 2
0
 private void writeAttributesDo(StaticClassState staticClassState)
 {
     foreach (var field in classType.GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic))
     {
         string name = field.Name;
         field.SetValue (name, attributes [name]);
     }
 }
    private static void updateDatabase(string databaseFile)
    {
        StaticClassState classOriginalState = new StaticClassState(typeof(Sqlite));

        classOriginalState.readAttributes();

        classOriginalState.writeAttributes(Sqlite.InitialState);

        Sqlite.CurrentVersion = "0";
        Sqlite.setSqlFilePath(databaseFile);
        Sqlite.Connect();

        Sqlite.ConvertToLastChronojumpDBVersion();

        classOriginalState.writeAttributes(classOriginalState);
        Sqlite.Connect();
    }
Exemplo n.º 4
0
 // Writes the attributes from staticClassState parameter into the existing class (defined in the constructor)
 public void writeAttributes(StaticClassState staticClassState)
 {
     writeAttributesDo (staticClassState);
 }
Exemplo n.º 5
0
 public static void saveClassState()
 {
     initialState = new StaticClassState (typeof (Sqlite));
     initialState.readAttributes ();
 }
Exemplo n.º 6
0
 // Writes the attributes from staticClassState parameter into the existing class (defined in the constructor)
 public void writeAttributes(StaticClassState staticClassState)
 {
     writeAttributesDo(staticClassState);
 }
Exemplo n.º 7
0
    private static void updateDatabase(string databaseFile)
    {
        StaticClassState classOriginalState = new StaticClassState (typeof (Sqlite));

        classOriginalState.readAttributes ();

        classOriginalState.writeAttributes (Sqlite.InitialState);

        Sqlite.CurrentVersion = "0";
        Sqlite.setSqlFilePath (databaseFile);
        Sqlite.Connect ();

        Sqlite.ConvertToLastChronojumpDBVersion ();

        classOriginalState.writeAttributes (classOriginalState);
        Sqlite.Connect ();
    }