Normal
Nope, you can use it without any changes.The keyword is static. In VB.NET lingo, this translates to shared.Therefore, this class cannot be and doesn't need to be instantiated because there can only ever be one instance of it - its singleton.To access the methods, simply go MediaPortal.TV.Database.TVDatabase.AddRecording or whatever.Keep in mind that the method can only ever be accessed by one call at a time, shown by the lock (typeof(TVDatabase)) statement. So if MP happens to be using the TVdatabase, then your plugin will have to wait until MP finishes before you can use it.The database itself however does allow multiple user access, so if you want to can connect directly to the database file. BTW, if you do choose this way and you want to use ADO.NET work SQLite, there is a dll that lets you do this. See http://sourceforge.net/projects/adodotnetsqlite.Sam
Nope, you can use it without any changes.
The keyword is static. In VB.NET lingo, this translates to shared.
Therefore, this class cannot be and doesn't need to be instantiated because there can only ever be one instance of it - its singleton.
To access the methods, simply go MediaPortal.TV.Database.TVDatabase.AddRecording or whatever.
Keep in mind that the method can only ever be accessed by one call at a time, shown by the lock (typeof(TVDatabase)) statement. So if MP happens to be using the TVdatabase, then your plugin will have to wait until MP finishes before you can use it.
The database itself however does allow multiple user access, so if you want to can connect directly to the database file. BTW, if you do choose this way and you want to use ADO.NET work SQLite, there is a dll that lets you do this. See http://sourceforge.net/projects/adodotnetsqlite.
Sam