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