diff --git a/source/Cosmos.Debug.Common/SQL.cs b/source/Cosmos.Debug.Common/SQL.cs
index 8ff019e7c..dd5af7510 100644
--- a/source/Cosmos.Debug.Common/SQL.cs
+++ b/source/Cosmos.Debug.Common/SQL.cs
@@ -55,17 +55,26 @@ namespace Cosmos.Debug.Common {
internal void CreateDB()
{
- using (var strm = typeof(SQL).Assembly.GetManifestResourceStream(typeof(SQL), "SQLite.sql"))
- {
- if (strm == null)
+ ExecuteAssemblyResource("SQLite.sql");
+ }
+
+ ///
+ /// Exceutes SQL file stored inside assembly.
+ ///
+ /// Name of the assembly resource to execute.
+ internal void ExecuteAssemblyResource(string resourceName)
+ {
+ using (var strm = typeof(SQL).Assembly.GetManifestResourceStream(typeof(SQL), resourceName))
{
- throw new Exception("Sql resource not found!");
+ if (strm == null)
+ {
+ throw new Exception("Sql resource not found!");
+ }
+ using (var reader = new StreamReader(strm))
+ {
+ Exec(reader.ReadToEnd());
+ }
}
- using (var reader = new StreamReader(strm))
- {
- Exec(reader.ReadToEnd());
- }
- }
}
}
}