Compare commits
10 Commits
BackupFold
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
271f2df7f9 | ||
|
|
d550ad44df | ||
|
|
4f8aeaead8 | ||
|
|
a424b6f7a2 | ||
|
|
27c322d759 | ||
|
|
8cda716487 | ||
|
|
3bf30af52f | ||
|
|
85c6f25721 | ||
|
|
c139b80459 | ||
|
|
300158ec25 |
@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.0" />
|
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.27" />
|
|
||||||
<PackageReference Include="System.Data.Odbc" Version="6.0.0" />
|
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Implementations\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.0" />
|
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.27" />
|
|
||||||
<PackageReference Include="System.Data.Odbc" Version="6.0.0" />
|
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Implementations\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.DataAccess
|
namespace TeamHobby.HobbyProjectGenerator.DataAccessLayer
|
||||||
{
|
{
|
||||||
public interface IDataSource<T>
|
public interface IDataSource<T>
|
||||||
{
|
{
|
||||||
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Data.Odbc;
|
using System.Data.Odbc;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.DataAccess
|
namespace TeamHobby.HobbyProjectGenerator.DataAccessLayer
|
||||||
{
|
{
|
||||||
public class SqlDAO : IDataSource<string>
|
public class SqlDAO : IDataSource<string>
|
||||||
{
|
{
|
||||||
@ -1,6 +1,6 @@
|
|||||||
// Print Statements used throughout the program.
|
// Print Statements used throughout the program.
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.DataAccess
|
namespace TeamHobby.HobbyProjectGenerator.DataAccessLayer
|
||||||
{
|
{
|
||||||
public class UiPrint
|
public class UiPrint
|
||||||
{
|
{
|
||||||
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.DataAccess
|
namespace TeamHobby.HobbyProjectGenerator.DataAccessLayer
|
||||||
{
|
{
|
||||||
public class RDSFactory
|
public class RDSFactory
|
||||||
{
|
{
|
||||||
@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
|
||||||
{
|
|
||||||
public interface ILogger
|
|
||||||
{
|
|
||||||
bool Log(LogEntry log);
|
|
||||||
|
|
||||||
// IList<string> GetAllLogs();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
|
||||||
{
|
|
||||||
public class DBLogger : ILogger
|
|
||||||
{
|
|
||||||
public DBLogger()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public IList<string> GetAllLogs()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Log(LogEntry log)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
|
||||||
{
|
|
||||||
// implementation of ILogger that stores logs as they initialize
|
|
||||||
public class InMemoryLogger : ILogger
|
|
||||||
{
|
|
||||||
// make readonly to prevent it from being changed somewhere other than in the constructor
|
|
||||||
private readonly IList<string> _logStore;
|
|
||||||
|
|
||||||
public InMemoryLogger()
|
|
||||||
{
|
|
||||||
// list of current logs
|
|
||||||
_logStore = new List<string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public InMemoryLogger(IList<string> logStore)
|
|
||||||
{
|
|
||||||
_logStore = logStore;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Log(LogEntry entry)
|
|
||||||
{
|
|
||||||
if (entry is null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(entry));
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// string interpolation to add UTC timestamp to log description
|
|
||||||
//_logStore.Add($"{DateTime.UtcNow}-> {description}");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public IList<string> GetAllLogs()
|
|
||||||
{
|
|
||||||
return _logStore;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override bool Equals(object? obj)
|
|
||||||
{
|
|
||||||
return obj is InMemoryLogger logger &&
|
|
||||||
EqualityComparer<IList<string>>.Default.Equals(_logStore, logger._logStore);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
return HashCode.Combine(_logStore);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
|
||||||
{
|
|
||||||
public enum LogLevel
|
|
||||||
{
|
|
||||||
Info, Debug, Warning, Error
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum LogCategory
|
|
||||||
{
|
|
||||||
View, Business, Server, Data, Datastore
|
|
||||||
}
|
|
||||||
|
|
||||||
// LogEntry is a record type with init properties for each field
|
|
||||||
// ensures that log entries are immutable after initialization
|
|
||||||
public record LogEntry
|
|
||||||
{
|
|
||||||
public LogLevel level { get; init; }
|
|
||||||
public LogCategory category { get; init; }
|
|
||||||
public string user { get; init; }
|
|
||||||
public string description { get; init; }
|
|
||||||
public DateTime timestamp { get; init; }
|
|
||||||
|
|
||||||
|
|
||||||
// Constructor requireing only the description as an arg
|
|
||||||
// Assigns default values for LogLevel (Info), LogCategory (Server), user ("System"), and the UTC time at initialization for timestamp
|
|
||||||
public LogEntry(string description)
|
|
||||||
{
|
|
||||||
this.level = LogLevel.Info;
|
|
||||||
this.category = LogCategory.Server;
|
|
||||||
this.user = "System";
|
|
||||||
this.description = description;
|
|
||||||
this.timestamp = DateTime.UtcNow;
|
|
||||||
}
|
|
||||||
// Constructor with args for all fields except timestamp
|
|
||||||
// timestamp is always set to the UTC time at the time of initialization
|
|
||||||
public LogEntry(LogLevel level, string user, LogCategory category, string description)
|
|
||||||
{
|
|
||||||
this.level = level;
|
|
||||||
this.category = category;
|
|
||||||
this.user = user;
|
|
||||||
this.description = description;
|
|
||||||
this.timestamp = DateTime.UtcNow;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
|
||||||
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
|
||||||
using TeamHobby.HobbyProjectGenerator.Logging.Implementations;
|
|
||||||
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
|
||||||
{
|
|
||||||
internal class LoggingManager
|
|
||||||
{
|
|
||||||
private readonly IDataSource<string> _conn;
|
|
||||||
private readonly ILogger _logger;
|
|
||||||
private readonly ILoggerFactory _factory;
|
|
||||||
private readonly LogEntry _logEntry;
|
|
||||||
|
|
||||||
// Both Constructors take an IDataSource arg to make logging extensible to future data sources
|
|
||||||
// first constructor has no additional args - defaults to using the DBFactiry implementation
|
|
||||||
public LoggingManager(IDataSource<string> dataSource)
|
|
||||||
{
|
|
||||||
_conn = dataSource;
|
|
||||||
_factory = new DBLoggerFactory();
|
|
||||||
_logger = _factory.CreateLogger();
|
|
||||||
}
|
|
||||||
// second constructor takes an additional ILoggerFactory arg - allows for extensible logger types
|
|
||||||
public LoggingManager(IDataSource<string> dataSource, ILoggerFactory factory)
|
|
||||||
{
|
|
||||||
_conn = dataSource;
|
|
||||||
_factory = factory;
|
|
||||||
_logger = _factory.CreateLogger();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Process()
|
|
||||||
{
|
|
||||||
_logger.Log(_logEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<Platforms>AnyCPU;x86</Platforms>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.Archive\TeamHobby.HobbyProjectGenerator.Archive.csproj" />
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.Archive\TeamHobby.HobbyProjectGenerator.Archive.csproj" />
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.Logging\TeamHobby.HobbyProjectGenerator.Logging.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Archive
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public interface IRelationArchivable
|
public interface IRelationArchivable
|
||||||
{
|
{
|
||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Archive
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public class ArchiveManager
|
public class ArchiveManager
|
||||||
{
|
{
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
||||||
|
|
||||||
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
|
{
|
||||||
|
public interface ILogger
|
||||||
|
{
|
||||||
|
// private IDataSource<string> _datasource = T;
|
||||||
|
// attempts to connect to the data source provided by the type T
|
||||||
|
// returns true if the connection is successful
|
||||||
|
|
||||||
|
// public bool Connect();
|
||||||
|
public bool Log(LogEntry Log);
|
||||||
|
|
||||||
|
// IList<string> GetAllLogs();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,13 +4,13 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging.Contracts
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer.Contracts
|
||||||
{
|
{
|
||||||
public interface ILoggerFactory
|
public interface ILoggerFactory
|
||||||
{
|
{
|
||||||
ILogger CreateLogger()
|
|
||||||
{
|
ILogger CreateLogger();
|
||||||
return new DBLogger();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3,8 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public class ConsoleLogger : ILogger
|
public class ConsoleLogger : ILogger
|
||||||
{
|
{
|
||||||
@ -0,0 +1,200 @@
|
|||||||
|
using System;
|
||||||
|
using System.Data.Odbc;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
||||||
|
|
||||||
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
|
{
|
||||||
|
public class DBLogger : ILogger
|
||||||
|
{
|
||||||
|
private SqlDAO _datasource;
|
||||||
|
public DBLogger()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// SELECT * FROM log
|
||||||
|
// public IList<LogEntry> GetAllLogs()
|
||||||
|
// {
|
||||||
|
// throw new NotImplementedException();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//INSERT INTO log(LvName, catName, userOP, logMessage) VALUES ('Debug','Data', 'SYSTEM', 'testing insert method')
|
||||||
|
|
||||||
|
// public bool Connect(SqlDAO logDatabase) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsActive() {
|
||||||
|
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||||
|
"TCPIP=1;" +
|
||||||
|
"SERVER=ocalhost;" +
|
||||||
|
"DATABASE=hbby;" +
|
||||||
|
"UID=ot;" + // omit password to force SQLException for incorrect passeword
|
||||||
|
"PASSWORD=wrong" +
|
||||||
|
"OPTION=3";
|
||||||
|
// bool isActive = true;
|
||||||
|
OdbcConnection active = new OdbcConnection(dbInfo);
|
||||||
|
try {
|
||||||
|
active.Open();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (OdbcException ex) {
|
||||||
|
// Console.WriteLine(ex.Message);
|
||||||
|
if (ex.ErrorCode == -2146232009 ) {
|
||||||
|
//Console.WriteLine(ex.ErrorCode);
|
||||||
|
Console.WriteLine("Database is active");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Console.WriteLine("Database is inactive");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Console.WriteLine("closed1");
|
||||||
|
active.Close();
|
||||||
|
}
|
||||||
|
// return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsAccessible() {
|
||||||
|
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||||
|
"TCPIP=1;" +
|
||||||
|
"SERVER=localhost;" +
|
||||||
|
"DATABASE=hobby;" +
|
||||||
|
"UID=root;" +
|
||||||
|
"PASSWORD=Teamhobby;" +
|
||||||
|
"OPTION=3";
|
||||||
|
OdbcConnection access = new OdbcConnection(dbInfo);
|
||||||
|
try {
|
||||||
|
access.Open();
|
||||||
|
Console.WriteLine("Database is active and accessible by the system");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Console.WriteLine("Database is active but inaccessible to the system at this time.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
access.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasCapacity() {
|
||||||
|
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||||
|
"TCPIP=1;" +
|
||||||
|
"SERVER=localhost;" +
|
||||||
|
"DATABASE=hobby;" +
|
||||||
|
"UID=root;" +
|
||||||
|
"PASSWORD=Teamhobby;" +
|
||||||
|
"OPTION=3";
|
||||||
|
OdbcConnection conn = new OdbcConnection(dbInfo);
|
||||||
|
|
||||||
|
// get the current capacity of the database in MB using the query:
|
||||||
|
// SELECT SUM(storage.MB) as CURRENT_CAPACITY_MB FROM (SELECT table_schema as name, ROUND(SUM(data_length + index_length)/1024/1024,1) as MB FROM information_schema.tables GROUP BY table_schema) as storage;
|
||||||
|
|
||||||
|
string sqlCurrentCap = $"SELECT SUM(storage.mb) as currentCap FROM (SELECT table_schema as name, ROUND(SUM(data_length + index_length)/1024/1024,1) as mb FROM information_schema.tables GROUP BY table_schema) as storage;";
|
||||||
|
|
||||||
|
// get the max capacity in GB; too big to be shown as MB
|
||||||
|
string sqlMaxCap = $"SELECT SUM(storage.mb) as maxCap FROM (SELECT table_schema as name, ROUND(SUM(max_data_length + max_index_length)/1024,1) as mb FROM information_schema.tables GROUP BY table_schema) as storage;";
|
||||||
|
|
||||||
|
// query the data base to get currentCap; the current storage capacity of the system's database (in megabytes)
|
||||||
|
conn.Open();
|
||||||
|
OdbcCommand command1 = new OdbcCommand(sqlCurrentCap, conn);
|
||||||
|
OdbcDataReader result1 = command1.ExecuteReader();
|
||||||
|
double currentCap = 0;
|
||||||
|
while (result1.Read()) {
|
||||||
|
//Console.WriteLine(result1[0].GetType());
|
||||||
|
//Console.WriteLine("currentCap = {0}", result1[0]);
|
||||||
|
currentCap = result1.GetDouble(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Console.WriteLine(currentCap);
|
||||||
|
//float currentCap1 = (float) currentCap;
|
||||||
|
result1.Close();
|
||||||
|
command1.Dispose();
|
||||||
|
conn.Close();
|
||||||
|
// Console.WriteLine("close conn");
|
||||||
|
|
||||||
|
// query the data base again to get maxCap; the maximum possible storage capacity of the system's database (in megabytes)
|
||||||
|
conn.Open();
|
||||||
|
// Console.WriteLine("open conn");
|
||||||
|
OdbcCommand command2 = new OdbcCommand(sqlMaxCap, conn);
|
||||||
|
OdbcDataReader result2 = command2.ExecuteReader();
|
||||||
|
// Console.WriteLine("open reader 1");
|
||||||
|
double maxCap = 0;
|
||||||
|
try {
|
||||||
|
while (result2.Read()) {
|
||||||
|
//Console.WriteLine(result2[0].GetType());
|
||||||
|
maxCap = result2.GetDouble(0);
|
||||||
|
// Console.WriteLine("maxCap = {0}", result2[0]);
|
||||||
|
}
|
||||||
|
// compare currentCap to maxCap
|
||||||
|
// return true if there is at least 1MB of free space available
|
||||||
|
// decrement max by 1 MB to allow for any required space from new logs
|
||||||
|
if ( (currentCap * 1024) < (maxCap - 1024) ) {
|
||||||
|
// Console.WriteLine(maxCap);
|
||||||
|
Console.WriteLine("Database has sufficient storage capacity to be written to at this time.\n Current Capacity: {0} MB\n Max Capacity: {1} MB\n", currentCap, maxCap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Console.WriteLine("Insufficient Storage Capacity to log entry to database.\n Current Capacity: {0} MB \n Max Capacity: {1} MB \n", currentCap, maxCap);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
result2.Close();
|
||||||
|
command2.Dispose();
|
||||||
|
conn.Close();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Console.WriteLine("close conn 2");
|
||||||
|
//Console.WriteLine(maxCap);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool Log(LogEntry log)
|
||||||
|
{
|
||||||
|
log.ShowLog();
|
||||||
|
|
||||||
|
//bool status = HasCapacity();
|
||||||
|
if ( (IsActive() == false || IsAccessible() == false) || (HasCapacity() == false) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
// SqlDAO sqlDS = (SqlDAO)_datasource;
|
||||||
|
string dbInfo = "DRIVER={MariaDB ODBC 3.1 Driver};" +
|
||||||
|
"TCPIP=1;" +
|
||||||
|
"SERVER=localhost;" +
|
||||||
|
"DATABASE=hobby;" +
|
||||||
|
"UID=root;" +
|
||||||
|
"PASSWORD=Teamhobby;" +
|
||||||
|
"OPTION=3";
|
||||||
|
_datasource = new SqlDAO(dbInfo);
|
||||||
|
|
||||||
|
//bool storage = HasCapacity();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// once connection is confirmed, try inserting the log via SQL statements
|
||||||
|
string sqlLog = $"INSERT INTO log (Lvname, catName, userOP, logMessage) VALUES ('{log.GetLevel()}','{log.GetCategory()}', " + $"'{log.GetUser()}', '{log.GetDescription()}');";
|
||||||
|
|
||||||
|
bool insertNewLog = _datasource.WriteData(sqlLog);
|
||||||
|
//Console.WriteLine($"Logging Succeeded: The following entry was written to the database: {log}");
|
||||||
|
// Console.WriteLine(_datasource.ReadData($"SELECT * FROM log;"));
|
||||||
|
return insertNewLog;
|
||||||
|
}
|
||||||
|
// if failed, that means the connection was a sucess but actually writing to the database failed
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to write log to database; likely due to error in SQL syntax");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,17 +3,18 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer.Contracts;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging.Implementations
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer.Implementations
|
||||||
{
|
{
|
||||||
public class DBLoggerFactory : ILoggerFactory
|
public class DBLoggerFactory : ILoggerFactory
|
||||||
{
|
{
|
||||||
public DBLoggerFactory()
|
public DBLoggerFactory()
|
||||||
{
|
{
|
||||||
|
//this._logDatabase = logDatabase;
|
||||||
}
|
}
|
||||||
public ILogger CreateLogger()
|
|
||||||
{
|
public ILogger CreateLogger() {
|
||||||
return new DBLogger();
|
return new DBLogger();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer.Contracts;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Logging
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public class FileLogger : ILogger
|
public class FileLogger : ILogger
|
||||||
{
|
{
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
|
public enum LogLevel
|
||||||
|
{
|
||||||
|
Info, Debug, Warning, Error
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LogCategory
|
||||||
|
{
|
||||||
|
View, Business, Server, Data, Datastore
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
namespace TeamHobby.HobbyProjectGenerator.Logging.Contracts
|
||||||
|
{
|
||||||
|
// LogEntry is a record type with init properties for each field
|
||||||
|
// ensures that log entries are immutable after initialization
|
||||||
|
// LogEntry is a record type with init properties for each field
|
||||||
|
// ensures that log entries are immutable after initialization
|
||||||
|
public record LogEntry
|
||||||
|
{
|
||||||
|
private LogLevel _level { get; init; }
|
||||||
|
private LogCategory _category { get; init; }
|
||||||
|
private string _user { get; init; }
|
||||||
|
private string _description { get; init; }
|
||||||
|
|
||||||
|
// Constructor with args for all fields except timestamp
|
||||||
|
// timestamp is always set to the UTC time at the time of initialization
|
||||||
|
public LogEntry(LogLevel level, LogCategory category, string user, string description)
|
||||||
|
{
|
||||||
|
this._level = level;
|
||||||
|
this._category = category;
|
||||||
|
this._user = user;
|
||||||
|
this._description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructor requiring only the description as an arg
|
||||||
|
// Assigns default values for LogLevel (Info), LogCategory (Server), user ("System"), and the UTC time at initialization for timestamp
|
||||||
|
// public LogEntry(string description)
|
||||||
|
// {
|
||||||
|
// this._level = LogLevel.Debug;
|
||||||
|
// this._category = LogCategory.Server;
|
||||||
|
// this._user = "SYSTEM";
|
||||||
|
// this._description = description;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public LogLevel GetLevel() {
|
||||||
|
return this._level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LogCategory GetCategory() {
|
||||||
|
return this._category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetUser() {
|
||||||
|
return this._user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetDescription() {
|
||||||
|
return this._description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowLog() {
|
||||||
|
Console.WriteLine("Timestamp: {0} | Level: {1}, | Category: {2}, | User: {3}, | Description: '{4}' ", DateTime.Now, this._level.ToString(),this._category.ToString(), this._user, this._description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.Logging.Contracts;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer.Contracts;
|
||||||
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer.Implementations;
|
||||||
|
|
||||||
|
|
||||||
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
|
{
|
||||||
|
|
||||||
|
public class LoggingManager
|
||||||
|
{
|
||||||
|
// private static IDataSource<string> _datasource;
|
||||||
|
private ILogger _logger;
|
||||||
|
private ILoggerFactory _factory;
|
||||||
|
private LogEntry _logEntry;
|
||||||
|
|
||||||
|
// assign default values for LogEntry fields
|
||||||
|
// these are not readonly because they can be overwritten to specify logging at specific field(s) from the main controller by using the public setters for each field
|
||||||
|
private LogLevel _level = LogLevel.Debug;
|
||||||
|
private LogCategory _category = LogCategory.Server;
|
||||||
|
private string _user = "System";
|
||||||
|
|
||||||
|
// Both Constructors take an IDataSource arg to make logging extensible to future data sources
|
||||||
|
// first constructor has no additional args - defaults to using a DBLoggerFactory to log to database
|
||||||
|
public LoggingManager()
|
||||||
|
{
|
||||||
|
// _datasource = datasource;
|
||||||
|
_logEntry = new LogEntry(_level, _category, _user, "Logging Manager instantiated");
|
||||||
|
_factory = new DBLoggerFactory();
|
||||||
|
_logger = _factory.CreateLogger();
|
||||||
|
}
|
||||||
|
// second constructor takes an additional ILoggerFactory arg - allows for extensible logger types
|
||||||
|
public LoggingManager(ILoggerFactory factory)
|
||||||
|
{
|
||||||
|
//_datasource = datasource;
|
||||||
|
_logEntry = new LogEntry(_level, _category, _user, "Logging Manager instantiated");
|
||||||
|
_factory = factory;
|
||||||
|
_logger = _factory.CreateLogger();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// // used to create a template entry with the desired fields to write entries at
|
||||||
|
// public void CreateLog(LogLevel level, LogCategory category, string user, string description) {
|
||||||
|
// _logEntry = new LogEntry(level,
|
||||||
|
// category, user, description);
|
||||||
|
// _logger.Log(_logEntry);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// creates a LogEntry object using a description arg
|
||||||
|
// uses whateever the current assignments for the other fields ares
|
||||||
|
public bool CreateLog(string description) {
|
||||||
|
// creates a LogEntry using the passed in description and current assignements from the necessary fields
|
||||||
|
_logEntry = new LogEntry(_level, _category, _user, description);
|
||||||
|
|
||||||
|
// attempt to log the LogEntry by calling the _logger's Log() method
|
||||||
|
try {
|
||||||
|
_logger.Log(_logEntry);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Level(LogLevel level) {
|
||||||
|
this._level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Category(LogCategory category) {
|
||||||
|
this._category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void User(string user) {
|
||||||
|
this._user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
// public static void Source(IDataSource<string> datasource) {
|
||||||
|
// _datasource = datasource;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public static IDataSource<string> GetDataSource() {
|
||||||
|
// return _datasource;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="UserManagement\Contracts\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\TeamHobby.HobbyProjectGenerator.DataAccessLayer\TeamHobby.HobbyProjectGenerator.DataAccessLayer.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -4,9 +4,9 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data.Odbc;
|
using System.Data.Odbc;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.UserManagement
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public class AccountService
|
public class AccountService
|
||||||
{
|
{
|
||||||
@ -4,10 +4,9 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Data.Odbc;
|
using System.Data.Odbc;
|
||||||
using TeamHobby.HobbyProjectGenerator.UserManagement;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.UserManagement
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{
|
{
|
||||||
public class SystemAccountManager
|
public class SystemAccountManager
|
||||||
{
|
{
|
||||||
@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.UserManagement
|
namespace TeamHobby.HobbyProjectGenerator.ServiceLayer
|
||||||
{ // Class for getting user credentials
|
{ // Class for getting user credentials
|
||||||
public class GetCredentials
|
public class GetCredentials
|
||||||
{
|
{
|
||||||
@ -3,8 +3,8 @@ using System.Data.Odbc;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using TeamHobby.HobbyProjectGenerator.Archive;
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
|
|
||||||
|
|||||||
@ -22,10 +22,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\main\TeamHobby.HobbyProjectGenerator.Main.csproj" />
|
<ProjectReference Include="..\..\main\TeamHobby.HobbyProjectGenerator.Main.csproj" />
|
||||||
<ProjectReference Include="..\..\TeamHobby.HobbyProjectGenerator.Archive\TeamHobby.HobbyProjectGenerator.Archive.csproj" />
|
|
||||||
<ProjectReference Include="..\..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
|
||||||
<ProjectReference Include="..\..\TeamHobby.HobbyProjectGenerator.Logging\TeamHobby.HobbyProjectGenerator.Logging.csproj" />
|
|
||||||
<ProjectReference Include="..\..\TeamHobby.HobbyProjectGenerator.UserManagement\TeamHobby.HobbyProjectGenerator.UserManagement.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -2,8 +2,8 @@ using System;
|
|||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using TeamHobby.HobbyProjectGenerator.UserManagement;
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace TeamHobby.UserManagement.xTests
|
namespace TeamHobby.UserManagement.xTests
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
namespace TeamHobby.HobbyProjectGenerator.View
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
namespace TeamHobby.HobbyProjectGenerator.ViewModel
|
||||||
|
{
|
||||||
|
public class Class1
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -5,20 +5,20 @@ VisualStudioVersion = 17.0.31919.166
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.Main", "..\main\TeamHobby.HobbyProjectGenerator.Main.csproj", "{30C7EBF3-3957-46E5-86C1-C13356841ECA}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.Main", "..\main\TeamHobby.HobbyProjectGenerator.Main.csproj", "{30C7EBF3-3957-46E5-86C1-C13356841ECA}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.Archive", "..\TeamHobby.HobbyProjectGenerator.Archive\TeamHobby.HobbyProjectGenerator.Archive.csproj", "{B88ED0D9-72E2-4245-BD8F-856FF42E500C}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.DataAccess", "..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj", "{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.UserManagement", "..\TeamHobby.HobbyProjectGenerator.UserManagement\TeamHobby.HobbyProjectGenerator.UserManagement.csproj", "{2E7193B8-86B6-48DA-9671-CD84615A5F5D}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D29D9225-3748-4067-AF07-E677A525EF39}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D29D9225-3748-4067-AF07-E677A525EF39}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
TeamHobby.HobbyProjectGenerator.csproj = TeamHobby.HobbyProjectGenerator.csproj
|
TeamHobby.HobbyProjectGenerator.csproj = TeamHobby.HobbyProjectGenerator.csproj
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.Logging", "..\TeamHobby.HobbyProjectGenerator.Logging\TeamHobby.HobbyProjectGenerator.Logging.csproj", "{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.Tests", "TeamHobby.HobbyProjectGenerator.Tests\TeamHobby.HobbyProjectGenerator.Tests.csproj", "{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamHobby.HobbyProjectGenerator.Tests", "TeamHobby.HobbyProjectGenerator.Tests\TeamHobby.HobbyProjectGenerator.Tests.csproj", "{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.ServiceLayer", "TeamHobby.HobbyProjectGenerator.ServiceLayer\TeamHobby.HobbyProjectGenerator.ServiceLayer.csproj", "{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeamHobby.HobbyProjectGenerator.DataAccessLayer", "..\TeamHobby.HobbyProjectGenerator.DataAccessLayer\TeamHobby.HobbyProjectGenerator.DataAccessLayer.csproj", "{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamHobby.HobbyProjectGenerator.ViewModel", "TeamHobby.HobbyProjectGenerator.ViewModel\TeamHobby.HobbyProjectGenerator.ViewModel.csproj", "{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TeamHobby.HobbyProjectGenerator.View", "TeamHobby.HobbyProjectGenerator.View\TeamHobby.HobbyProjectGenerator.View.csproj", "{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -36,38 +36,6 @@ Global
|
|||||||
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|Any CPU.Build.0 = Release|Any CPU
|
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|x86.ActiveCfg = Release|Any CPU
|
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|x86.Build.0 = Release|Any CPU
|
{30C7EBF3-3957-46E5-86C1-C13356841ECA}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{B88ED0D9-72E2-4245-BD8F-856FF42E500C}.Release|x86.Build.0 = Release|x86
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{AA48A66C-FA36-4AF9-A782-CEC22838EB8F}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{2E7193B8-86B6-48DA-9671-CD84615A5F5D}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{CA539CBE-A043-4ED8-9E1F-3E949F0A482D}.Release|x86.Build.0 = Release|x86
|
|
||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
@ -76,6 +44,38 @@ Global
|
|||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|x86.ActiveCfg = Release|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|x86.Build.0 = Release|Any CPU
|
{2E9DC0A0-D9A1-40A5-9684-ECC8EDCD8DAD}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{EF90CC6C-0C44-4E39-AAB6-96F9F34F0784}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{6DBAC411-AC0E-4129-AE57-C8D1DA1DF9B2}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{092F7372-3CBA-49A2-A7A8-EC3FF97E3082}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{2E401E9D-731B-425D-B0BD-FF1E72D5D23C}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data.Odbc;
|
using System.Data.Odbc;
|
||||||
using TeamHobby.HobbyProjectGenerator.Archive;
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.UserManagement;
|
|
||||||
|
|
||||||
namespace TeamHobby.HobbyProjectGenerator.Main
|
namespace TeamHobby.HobbyProjectGenerator.Main
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using TeamHobby.HobbyProjectGenerator.DataAccess;
|
using TeamHobby.HobbyProjectGenerator.DataAccessLayer;
|
||||||
using TeamHobby.HobbyProjectGenerator.UserManagement;
|
using TeamHobby.HobbyProjectGenerator.ServiceLayer;
|
||||||
|
|
||||||
namespace main
|
namespace main
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,10 +14,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.Archive\TeamHobby.HobbyProjectGenerator.Archive.csproj" />
|
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccessLayer\TeamHobby.HobbyProjectGenerator.DataAccessLayer.csproj" />
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.DataAccess\TeamHobby.HobbyProjectGenerator.DataAccess.csproj" />
|
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator\TeamHobby.HobbyProjectGenerator.ServiceLayer\TeamHobby.HobbyProjectGenerator.ServiceLayer.csproj" />
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.Logging\TeamHobby.HobbyProjectGenerator.Logging.csproj" />
|
|
||||||
<ProjectReference Include="..\TeamHobby.HobbyProjectGenerator.UserManagement\TeamHobby.HobbyProjectGenerator.UserManagement.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user