Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
Merge Infrastructure assemblies (#309)
Browse files Browse the repository at this point in the history
* Merge SystemInfrastructure into general Infrastructure

* Add project metadata to Miunie.Infrastructure

* Merge Logger into Miunie.Infrastructure

* Remove unused Logger project

* Merge Json into Miunie.Infrastructure

* Merge LiteDbStorage into Miunie.Infrastructure

* Unify project reference style

* Add missing Windows reference
  • Loading branch information
petrspelos authored Jul 22, 2020
1 parent b8b2296 commit e30add2
Show file tree
Hide file tree
Showing 20 changed files with 91 additions and 304 deletions.
4 changes: 2 additions & 2 deletions src/Miunie.Avalonia/InversionOfControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
using Miunie.Core;
using Miunie.Core.Infrastructure;
using Miunie.Core.Logging;
using Miunie.Infrastructure.Logging;
using Miunie.Infrastructure.OS;
using Miunie.InversionOfControl;
using Miunie.Logger;
using Miunie.SystemInfrastructure;
using System.Net.Http;

namespace Miunie.Avalonia
Expand Down
3 changes: 1 addition & 2 deletions src/Miunie.Avalonia/Miunie.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
<ItemGroup>
<ProjectReference Include="../Miunie.Core/Miunie.Core.csproj" />
<ProjectReference Include="../Miunie.InversionOfControl/Miunie.InversionOfControl.csproj" />
<ProjectReference Include="../Miunie.Logger/Miunie.Logger.csproj" />
<ProjectReference Include="../Miunie.SystemInfrastructure/Miunie.SystemInfrastructure.csproj" />
<ProjectReference Include="../Miunie.Infrastructure/Miunie.Infrastructure.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Miunie.ConsoleApp/InversionOfControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using Miunie.ConsoleApp.Configuration;
using Miunie.Core.Infrastructure;
using Miunie.Core.Logging;
using Miunie.Infrastructure.OS;
using Miunie.InversionOfControl;
using Miunie.SystemInfrastructure;

namespace Miunie.ConsoleApp
{
Expand Down
3 changes: 1 addition & 2 deletions src/Miunie.ConsoleApp/Miunie.ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
<ItemGroup>
<ProjectReference Include="../Miunie.Core/Miunie.Core.csproj" />
<ProjectReference Include="../Miunie.InversionOfControl/Miunie.InversionOfControl.csproj" />
<ProjectReference Include="../Miunie.Logger/Miunie.Logger.csproj" />
<ProjectReference Include="../Miunie.SystemInfrastructure/Miunie.SystemInfrastructure.csproj" />
<ProjectReference Include="../Miunie.Infrastructure/Miunie.Infrastructure.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Miunie.Core.Json;
using Newtonsoft.Json;

namespace Miunie.Json
namespace Miunie.Infrastructure.Json
{
public class JsonConverter : IJsonConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using System.Linq;
using System.Linq.Expressions;

namespace Miunie.LiteDbStorage
namespace Miunie.Infrastructure.LiteDbStorage
{
public class PersistentStorage : IPersistentStorage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Miunie.Core.Logging;
using System;

namespace Miunie.Logger
namespace Miunie.Infrastructure.Logging
{
public class ConsoleLogger : ILogWriter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System;
using System.Collections.Generic;

namespace Miunie.Logger
namespace Miunie.Infrastructure.Logging
{
public class InMemoryLogger : ILogWriter, ILogReader
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Copyright>GPL-3.0</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/control-net/Miunie</PackageProjectUrl>
<RepositoryUrl>https://github.com/control-net/Miunie</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Miunie.Core\Miunie.Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\Miunie.Core\Miunie.Core.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Copyright>GPL-3.0</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/control-net/Miunie</PackageProjectUrl>
<RepositoryUrl>https://github.com/control-net/Miunie</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="LiteDB" Version="4.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Miunie.Core.Infrastructure;
using System;

namespace Miunie.SystemInfrastructure
namespace Miunie.Infrastructure.OS
{
public class SystemDateTime : IDateTime
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System.IO;
using System.Reflection;

namespace Miunie.SystemInfrastructure
namespace Miunie.Infrastructure.OS
{
public class SystemFileSystem : IFileSystem
{
Expand Down
6 changes: 4 additions & 2 deletions src/Miunie.InversionOfControl/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using Miunie.Discord.Adapters;
using Miunie.Discord.Convertors;
using Miunie.Discord.Logging;
using Miunie.Infrastructure.Json;
using Miunie.Infrastructure.LiteDbStorage;
using System;
using System.Linq;
using System.Reflection;
Expand All @@ -43,8 +45,8 @@ public static IServiceCollection AddMiunieTypes(this IServiceCollection collecti
.AddSingleton<IDiscordImpersonation, Impersonation>()
.AddSingleton<DiscordLogger>()
.AddSingleton<IBotConfiguration, BotConfiguration>()
.AddSingleton<IPersistentStorage, LiteDbStorage.PersistentStorage>()
.AddSingleton<IJsonConverter, Json.JsonConverter>()
.AddSingleton<IPersistentStorage, PersistentStorage>()
.AddSingleton<IJsonConverter, JsonConverter>()
.AddSingleton<Random>()
.AddSingleton<IMiunieUserProvider, MiunieUserProvider>()
.AddScoped<IUserReputationProvider, UserReputationProvider>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<ItemGroup>
<ProjectReference Include="../Miunie.Core/Miunie.Core.csproj" />
<ProjectReference Include="../Miunie.Discord/Miunie.Discord.csproj" />
<ProjectReference Include="../Miunie.Json/Miunie.Json.csproj" />
<ProjectReference Include="../Miunie.LiteDbStorage/Miunie.LiteDbStorage.csproj" />
<ProjectReference Include="../Miunie.Infrastructure/Miunie.Infrastructure.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
27 changes: 0 additions & 27 deletions src/Miunie.LiteDbStorage/Miunie.LiteDbStorage.csproj

This file was deleted.

23 changes: 0 additions & 23 deletions src/Miunie.Logger/Miunie.Logger.csproj

This file was deleted.

27 changes: 0 additions & 27 deletions src/Miunie.SystemInfrastructure/Miunie.SystemInfrastructure.csproj

This file was deleted.

4 changes: 2 additions & 2 deletions src/Miunie.WindowsApp/InversionOfControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
using Microsoft.Extensions.DependencyInjection;
using Miunie.Core.Infrastructure;
using Miunie.Core.Logging;
using Miunie.Infrastructure.Logging;
using Miunie.Infrastructure.OS;
using Miunie.InversionOfControl;
using Miunie.Logger;
using Miunie.SystemInfrastructure;
using Miunie.WindowsApp.Infrastructure;

namespace Miunie.WindowsApp
Expand Down
10 changes: 3 additions & 7 deletions src/Miunie.WindowsApp/Miunie.WindowsApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,9 @@
<Project>{9431ea7a-3676-4229-b8eb-650005c9734a}</Project>
<Name>Miunie.InversionOfControl</Name>
</ProjectReference>
<ProjectReference Include="..\Miunie.Logger\Miunie.Logger.csproj">
<Project>{0F4F2247-6D6C-400A-A95C-FDA46D5595D2}</Project>
<Name>Miunie.Logger</Name>
</ProjectReference>
<ProjectReference Include="..\Miunie.SystemInfrastructure\Miunie.SystemInfrastructure.csproj">
<Project>{74CB95A4-146F-4582-91C1-6BC9E1FD42E1}</Project>
<Name>Miunie.SystemInfrastructure</Name>
<ProjectReference Include="..\Miunie.Infrastructure\Miunie.Infrastructure.csproj">
<Project>{f116c0fa-e325-45c4-9071-3080559a8822}</Project>
<Name>Miunie.Infrastructure</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Loading

0 comments on commit e30add2

Please sign in to comment.