Removed interfaces for all models
This commit is contained in:
@@ -135,7 +135,7 @@ namespace DevConsole
|
||||
private static void OptionF()
|
||||
{
|
||||
//Guid guid = Guid.NewGuid();
|
||||
IEnumerable<IDirectoriesModel> dm = gsmParser.QueryDirectoryById("600");
|
||||
List<DirectoriesModel> dm = gsmParser.QueryDirectoryById("600");
|
||||
foreach (var entry in dm)
|
||||
{
|
||||
//entry.Path = guid.ToString();
|
||||
@@ -144,7 +144,7 @@ namespace DevConsole
|
||||
}
|
||||
#endregion
|
||||
|
||||
private static void PrintGameEntries(IEnumerable<IGameEntryModel> gameEntries)
|
||||
private static void PrintGameEntries(List<GameEntryModel> gameEntries)
|
||||
{
|
||||
foreach (var game in gameEntries)
|
||||
{
|
||||
@@ -155,7 +155,7 @@ namespace DevConsole
|
||||
}
|
||||
}
|
||||
|
||||
private static void PrintDirectories(IEnumerable<IDirectoriesModel> directoryEntries)
|
||||
private static void PrintDirectories(List<DirectoriesModel> directoryEntries)
|
||||
{
|
||||
foreach (var directory in directoryEntries)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
public interface IDatabaseConnection
|
||||
{
|
||||
public void OpenConnection(string dbLocation, int port);
|
||||
|
||||
public void CloseCurrentConnection();
|
||||
|
||||
public bool IsConnectionOpen();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FireLance.Interfaces
|
||||
{
|
||||
public interface IDirectoriesModel
|
||||
{
|
||||
int GameID { get; set; }
|
||||
string SpecialPath { get; set; }
|
||||
string Path { get; set; }
|
||||
string RegHive { get; set; }
|
||||
string RegPath { get; set; }
|
||||
string RegValue { get; set; }
|
||||
string DefinedFiles { get; set; }
|
||||
string ExcludedFiles { get; set; }
|
||||
bool Recurse { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FireLance.Interfaces
|
||||
{
|
||||
public interface IGameEntryModel
|
||||
{
|
||||
string GameName { get; set; }
|
||||
string BackupWarning { get; set; }
|
||||
string RestoreWarning { get; set; }
|
||||
string LastModified { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace FireLance.Interfaces
|
||||
{
|
||||
public interface ISaveDataModel
|
||||
{
|
||||
int GameID { get; set; }
|
||||
string SHA256Hash { get; set; }
|
||||
string Description { get; set; }
|
||||
DateTime CreationDate { get; set; }
|
||||
object SaveData { get; set; }
|
||||
uint BackupSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,6 @@
|
||||
using FireLance.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FireLance.Model
|
||||
namespace FireLance.Model
|
||||
{
|
||||
public class DirectoriesModel : IDirectoriesModel
|
||||
public class DirectoriesModel
|
||||
{
|
||||
public int GameID { get; set; }
|
||||
public string SpecialPath { get; set; }
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace FireLance.Model
|
||||
{
|
||||
public class GameEntryModel
|
||||
{
|
||||
public string GameName { get; set; }
|
||||
public string BackupWarning { get; set; }
|
||||
public string RestoreWarning { get; set; }
|
||||
public string LastModified { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
using FireLance.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System;
|
||||
|
||||
namespace FireLance.Model
|
||||
{
|
||||
public class SaveDataModel : ISaveDataModel
|
||||
public class SaveDataModel
|
||||
{
|
||||
public int GameID { get; set; }
|
||||
public string SHA256Hash { get; set; }
|
||||
@@ -1,12 +0,0 @@
|
||||
public class DirectoriesModel : FireLance.Interfaces.IDirectoriesModel
|
||||
{
|
||||
public int GameID { get; set; }
|
||||
public string SpecialPath { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string RegHive { get; set; }
|
||||
public string RegPath { get; set; }
|
||||
public string RegValue { get; set; }
|
||||
public string DefinedFiles { get; set; }
|
||||
public string ExcludedFiles { get; set; }
|
||||
public bool Recurse { get; set; }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using System.Data.Common;
|
||||
|
||||
public class GameEntryModel : FireLance.Interfaces.IGameEntryModel
|
||||
{
|
||||
public string GameName { get; set; }
|
||||
public string BackupWarning { get; set; }
|
||||
public string RestoreWarning { get; set; }
|
||||
public string LastModified { get; set; }
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Dapper;
|
||||
using FireLance.Interfaces;
|
||||
using FireLance.Model;
|
||||
|
||||
namespace GSMParser
|
||||
{
|
||||
@@ -32,19 +33,19 @@ namespace GSMParser
|
||||
return Convert.ToBoolean(DBConnection.State);
|
||||
}
|
||||
|
||||
public IEnumerable<IGameEntryModel> QueryGameById(string id)
|
||||
public List<GameEntryModel> QueryGameById(string id)
|
||||
{
|
||||
return DBConnection.Query<GameEntryModel>(QueryBuilder.GameEntryByGameId(id), new DynamicParameters());
|
||||
return (List<GameEntryModel>) DBConnection.Query<GameEntryModel>(QueryBuilder.GameEntryByGameId(id), new DynamicParameters());
|
||||
}
|
||||
|
||||
public IEnumerable<IDirectoriesModel> QueryDirectoryById(string id)
|
||||
public List<DirectoriesModel> QueryDirectoryById(string id)
|
||||
{
|
||||
return DBConnection.Query<DirectoriesModel>(QueryBuilder.DirectoryByGameId(id), new DynamicParameters());
|
||||
return (List<DirectoriesModel>) DBConnection.Query<DirectoriesModel>(QueryBuilder.DirectoryByGameId(id), new DynamicParameters());
|
||||
}
|
||||
|
||||
public IEnumerable<IGameEntryModel> QueryGameByName(string name)
|
||||
public List<GameEntryModel> QueryGameByName(string name)
|
||||
{
|
||||
return DBConnection.Query<GameEntryModel>(QueryBuilder.GameEntryByName(name), new DynamicParameters());
|
||||
return (List<GameEntryModel>) DBConnection.Query<GameEntryModel>(QueryBuilder.GameEntryByName(name), new DynamicParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user