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]);
     }
 }
Esempio 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();
    }
Esempio n. 4
0
 // Writes the attributes from staticClassState parameter into the existing class (defined in the constructor)
 public void writeAttributes(StaticClassState staticClassState)
 {
     writeAttributesDo (staticClassState);
 }
Esempio n. 5
0
 public static void saveClassState()
 {
     initialState = new StaticClassState (typeof (Sqlite));
     initialState.readAttributes ();
 }
 // Writes the attributes from staticClassState parameter into the existing class (defined in the constructor)
 public void writeAttributes(StaticClassState staticClassState)
 {
     writeAttributesDo(staticClassState);
 }
Esempio 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 ();
    }