If I have a class like this:
public abstract class ActionBase
{
public abstract bool RunRemote();
public abstract void RunLocal();
public void Run()
{
if (RunRemote())
{
var connection = new SQLiteConnection("Data Source=Data.db;Version=3;");
connection.Open();
var cmd = new SQLiteCommand("UPDATE Actions SET Complete = 1 WHERE Id = @Id", connection);
cmd.Parameters.Add(new SQLiteParameter("@Id", Id));
cmd.ExecuteNonQuery();
cmd.Dispose();
connection.Dispose();
}
RunLocal();
}
}
What I want is to only expose Run() as public, but abstract and virtual cannot be marked as private. Is there a clean way of doing this (e.g. not using delegates etc.)
Thanks,
Joe