mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Correct package version installed
Dependency injection works Project renaming WIP replacement of services with CQRS
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
<None Include="project.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApplicationModule.cs" />
|
||||
<Compile Include="Common\Interfaces\ICryptographyClient.cs" />
|
||||
<Compile Include="Common\Interfaces\IDatabaseProxy.cs" />
|
||||
<Compile Include="Common\Interfaces\IFileProxy.cs" />
|
||||
@@ -52,16 +53,18 @@
|
||||
<Compile Include="Common\Interfaces\ISelectableModel.cs" />
|
||||
<Compile Include="Common\Interfaces\ISettingsProxy.cs" />
|
||||
<Compile Include="Common\Mappings\IMapFrom.cs" />
|
||||
<Content Include="Common\Mappings\MappingProfile.cs" />
|
||||
<Compile Include="Common\Mappings\MappingProfile.cs" />
|
||||
<Compile Include="Common\Mappings\MappingProfiles.cs" />
|
||||
<Compile Include="Database\Commands\CloseDatabase\CloseDatabaseCommand.cs" />
|
||||
<Compile Include="Database\Commands\CreateDatabase\CreateDatabaseCommand.cs" />
|
||||
<Compile Include="Database\Commands\SaveDatabase\SaveDatabaseCommand.cs" />
|
||||
<Compile Include="Database\Models\DatabaseVm.cs" />
|
||||
<Compile Include="Database\Models\MainVm.cs" />
|
||||
<Compile Include="Database\Queries\GetDatabase\GetDatabaseQuery.cs" />
|
||||
<Compile Include="Database\Queries\IsDatabaseOpen\IsDatabaseOpenQuery.cs" />
|
||||
<Compile Include="Database\Queries\OpenDatabase\OpenDatabaseQuery.cs" />
|
||||
<Compile Include="Database\Queries\OpenDatabase\OpenDatabaseQueryValidator.cs" />
|
||||
<Compile Include="DependencyInjection.cs" />
|
||||
<Compile Include="Entry\Models\EntryVm.cs" />
|
||||
<Compile Include="Group\Models\GroupVm.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -88,9 +91,9 @@
|
||||
<Folder Include="Settings\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\ModernKeePass.Domain.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\Domain.csproj">
|
||||
<Project>{9a0759f1-9069-4841-99e3-3bec44e17356}</Project>
|
||||
<Name>ModernKeePass.Domain</Name>
|
||||
<Name>Domain</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
32
ModernKeePass.Application/ApplicationModule.cs
Normal file
32
ModernKeePass.Application/ApplicationModule.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Reflection;
|
||||
using Autofac;
|
||||
using AutoMapper;
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Mappings;
|
||||
using Module = Autofac.Module;
|
||||
|
||||
namespace ModernKeePass.Application
|
||||
{
|
||||
public class ApplicationModule: Module
|
||||
{
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
// Register Automapper profiles
|
||||
builder.RegisterType<MappingProfiles>().As<Profile>();
|
||||
|
||||
// Register Mediatr
|
||||
builder
|
||||
.RegisterType<Mediator>()
|
||||
.As<IMediator>()
|
||||
.InstancePerLifetimeScope();
|
||||
|
||||
// request & notification handlers
|
||||
builder.Register<SingleInstanceFactory>(context =>
|
||||
{
|
||||
var c = context.Resolve<IComponentContext>();
|
||||
return t => c.Resolve(t);
|
||||
});
|
||||
builder.RegisterAssemblyTypes(typeof(ApplicationModule).GetTypeInfo().Assembly).AsImplementedInterfaces();
|
||||
}
|
||||
}
|
||||
}
|
@@ -7,6 +7,7 @@ namespace ModernKeePass.Application.Common.Interfaces
|
||||
public interface IDatabaseProxy
|
||||
{
|
||||
bool IsOpen { get; }
|
||||
string Name { get; }
|
||||
GroupEntity RecycleBin { get; set; }
|
||||
BaseEntity Cipher { get; set; }
|
||||
BaseEntity KeyDerivation { get; set; }
|
||||
|
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public interface ISettingsProxy
|
||||
{
|
||||
T GetSetting<T>(string property, T defaultValue = default);
|
||||
T GetSetting<T>(string property, T defaultValue = default(T));
|
||||
void PutSetting<T>(string property, T value);
|
||||
}
|
||||
}
|
@@ -9,20 +9,20 @@ namespace ModernKeePass.Application.Common.Mappings
|
||||
{
|
||||
public MappingProfile()
|
||||
{
|
||||
ApplyMappingsFromAssembly(Assembly.GetExecutingAssembly());
|
||||
ApplyMappingsFromAssembly(typeof(MappingProfile).GetTypeInfo().Assembly);
|
||||
}
|
||||
|
||||
private void ApplyMappingsFromAssembly(Assembly assembly)
|
||||
{
|
||||
var types = assembly.GetExportedTypes()
|
||||
.Where(t => t.GetInterfaces().Any(i =>
|
||||
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IMapFrom<>)))
|
||||
var types = assembly.ExportedTypes
|
||||
.Where(t => t.GetTypeInfo().ImplementedInterfaces.Any(i =>
|
||||
i.GetTypeInfo().IsGenericType && i.GetGenericTypeDefinition() == typeof(IMapFrom<>)))
|
||||
.ToList();
|
||||
|
||||
foreach (var type in types)
|
||||
{
|
||||
var instance = Activator.CreateInstance(type);
|
||||
var methodInfo = type.GetMethod("Mapping");
|
||||
var methodInfo = type.GetTypeInfo().GetDeclaredMethod("Mapping");
|
||||
methodInfo?.Invoke(instance, new object[] { this });
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using MediatR;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Application.Database.Queries.IsDatabaseOpen;
|
||||
@@ -9,7 +8,7 @@ namespace ModernKeePass.Application.Database.Commands.CloseDatabase
|
||||
{
|
||||
public class CloseDatabaseCommand: IRequest
|
||||
{
|
||||
public class CloseDatabaseCommandHandler : IRequestHandler<CloseDatabaseCommand>
|
||||
public class CloseDatabaseCommandHandler : IAsyncRequestHandler<CloseDatabaseCommand>
|
||||
{
|
||||
private readonly IDatabaseProxy _database;
|
||||
private readonly IMediator _mediator;
|
||||
@@ -19,10 +18,9 @@ namespace ModernKeePass.Application.Database.Commands.CloseDatabase
|
||||
_database = database;
|
||||
_mediator = mediator;
|
||||
}
|
||||
|
||||
public async Task Handle(CloseDatabaseCommand message, CancellationToken cancellationToken)
|
||||
public async Task Handle(CloseDatabaseCommand message)
|
||||
{
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery(), cancellationToken);
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery());
|
||||
if (isDatabaseOpen) _database.CloseDatabase();
|
||||
else throw new DatabaseClosedException();
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using MediatR;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
@@ -16,7 +15,7 @@ namespace ModernKeePass.Application.Database.Commands.CreateDatabase
|
||||
public FileInfo FileInfo { get; set; }
|
||||
public Credentials Credentials { get; set; }
|
||||
|
||||
public class CreateDatabaseCommandHandler : IRequestHandler<CreateDatabaseCommand, DatabaseVm>
|
||||
public class CreateDatabaseCommandHandler : IAsyncRequestHandler<CreateDatabaseCommand, DatabaseVm>
|
||||
{
|
||||
private readonly IDatabaseProxy _database;
|
||||
private readonly IMediator _mediator;
|
||||
@@ -29,9 +28,9 @@ namespace ModernKeePass.Application.Database.Commands.CreateDatabase
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
public async Task<DatabaseVm> Handle(CreateDatabaseCommand message, CancellationToken cancellationToken)
|
||||
public async Task<DatabaseVm> Handle(CreateDatabaseCommand message)
|
||||
{
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery(), cancellationToken);
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery());
|
||||
if (isDatabaseOpen) throw new DatabaseOpenException();
|
||||
|
||||
var database = await _database.Create(message.FileInfo, message.Credentials);
|
||||
@@ -43,6 +42,7 @@ namespace ModernKeePass.Application.Database.Commands.CreateDatabase
|
||||
};
|
||||
return databaseVm;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -3,13 +3,16 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Application.Database.Queries.IsDatabaseOpen;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
|
||||
namespace ModernKeePass.Application.Database.Commands.SaveDatabase
|
||||
{
|
||||
public class SaveDatabaseCommand : IRequest
|
||||
{
|
||||
public class SaveDatabaseCommandHandler : IRequestHandler<SaveDatabaseCommand>
|
||||
public FileInfo FileInfo { get; set; }
|
||||
|
||||
public class SaveDatabaseCommandHandler : IAsyncRequestHandler<SaveDatabaseCommand>
|
||||
{
|
||||
private readonly IDatabaseProxy _database;
|
||||
private readonly IMediator _mediator;
|
||||
@@ -20,10 +23,14 @@ namespace ModernKeePass.Application.Database.Commands.SaveDatabase
|
||||
_mediator = mediator;
|
||||
}
|
||||
|
||||
public async Task Handle(SaveDatabaseCommand message, CancellationToken cancellationToken)
|
||||
public async Task Handle(SaveDatabaseCommand message)
|
||||
{
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery(), cancellationToken);
|
||||
if (isDatabaseOpen) await _database.SaveDatabase();
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery());
|
||||
if (isDatabaseOpen)
|
||||
{
|
||||
if (message.FileInfo != null) await _database.SaveDatabase(message.FileInfo);
|
||||
else await _database.SaveDatabase();
|
||||
}
|
||||
else throw new DatabaseClosedException();
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,29 @@
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Application.Database.Models;
|
||||
|
||||
namespace ModernKeePass.Application.Database.Queries.GetDatabase
|
||||
{
|
||||
public class GetDatabaseQuery: IRequest<DatabaseVm>
|
||||
{
|
||||
public class GetDatabaseQueryHandler : IRequestHandler<GetDatabaseQuery, DatabaseVm>
|
||||
{
|
||||
private readonly IDatabaseProxy _databaseProxy;
|
||||
|
||||
public GetDatabaseQueryHandler(IDatabaseProxy databaseProxy)
|
||||
{
|
||||
_databaseProxy = databaseProxy;
|
||||
}
|
||||
|
||||
public DatabaseVm Handle(GetDatabaseQuery request)
|
||||
{
|
||||
var database = new DatabaseVm
|
||||
{
|
||||
IsOpen = _databaseProxy.IsOpen,
|
||||
Name = _databaseProxy.Name
|
||||
};
|
||||
return database;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,4 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediatR;
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
|
||||
namespace ModernKeePass.Application.Database.Queries.IsDatabaseOpen
|
||||
@@ -15,10 +13,12 @@ namespace ModernKeePass.Application.Database.Queries.IsDatabaseOpen
|
||||
{
|
||||
_databaseProxy = databaseProxy;
|
||||
}
|
||||
public Task<bool> Handle(IsDatabaseOpenQuery request, CancellationToken cancellationToken)
|
||||
|
||||
public bool Handle(IsDatabaseOpenQuery message)
|
||||
{
|
||||
return Task.FromResult(_databaseProxy.IsOpen);
|
||||
return _databaseProxy.IsOpen;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -16,7 +16,7 @@ namespace ModernKeePass.Application.Database.Queries.OpenDatabase
|
||||
public FileInfo FileInfo { get; set; }
|
||||
public Credentials Credentials { get; set; }
|
||||
|
||||
public class OpenDatabaseQueryHandler : IRequestHandler<OpenDatabaseQuery, DatabaseVm>
|
||||
public class OpenDatabaseQueryHandler : IAsyncRequestHandler<OpenDatabaseQuery, DatabaseVm>
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
private readonly IMediator _mediator;
|
||||
@@ -29,9 +29,9 @@ namespace ModernKeePass.Application.Database.Queries.OpenDatabase
|
||||
_databaseProxy = databaseProxy;
|
||||
}
|
||||
|
||||
public async Task<DatabaseVm> Handle(OpenDatabaseQuery request, CancellationToken cancellationToken)
|
||||
public async Task<DatabaseVm> Handle(OpenDatabaseQuery request)
|
||||
{
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery(), cancellationToken);
|
||||
var isDatabaseOpen = await _mediator.Send(new IsDatabaseOpenQuery());
|
||||
if (isDatabaseOpen) throw new DatabaseOpenException();
|
||||
|
||||
var database = await _databaseProxy.Open(request.FileInfo, request.Credentials);
|
||||
|
21
ModernKeePass.Application/DependencyInjection.cs
Normal file
21
ModernKeePass.Application/DependencyInjection.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Reflection;
|
||||
using AutoMapper;
|
||||
using FluentValidation;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace ModernKeePass.Application
|
||||
{
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddApplication(this IServiceCollection services)
|
||||
{
|
||||
var assembly = typeof(DependencyInjection).GetTypeInfo().Assembly;
|
||||
services.AddAutoMapper(assembly);
|
||||
services.AddMediatR(assembly);
|
||||
//services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,11 +2,15 @@
|
||||
"supports": {},
|
||||
"dependencies": {
|
||||
"Autofac": "4.9.4",
|
||||
"AutoMapper": "6.2.2",
|
||||
"Autofac.Extensions.DependencyInjection": "4.4.0",
|
||||
"AutoMapper": "6.1.1",
|
||||
"AutoMapper.Extensions.Microsoft.DependencyInjection": "2.0.1",
|
||||
"FluentValidation": "8.6.2",
|
||||
"MediatR": "4.0.0",
|
||||
"MediatR": "3.0.1",
|
||||
"MediatR.Extensions.Microsoft.DependencyInjection": "2.0.0",
|
||||
"Microsoft.Extensions.DependencyInjection": "1.1.1",
|
||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
|
||||
"NETStandard.Library": "1.6.1",
|
||||
"NETStandard.Library": "2.0.3",
|
||||
"Splat": "3.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"supports": {},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
|
||||
"NETStandard.Library": "1.6.1",
|
||||
"NETStandard.Library": "2.0.3",
|
||||
"Splat": "3.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
|
@@ -1,25 +1,27 @@
|
||||
using Autofac;
|
||||
using System.Reflection;
|
||||
using AutoMapper;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Infrastructure.KeePass;
|
||||
using ModernKeePass.Infrastructure.UWP;
|
||||
|
||||
namespace ModernKeePass.Infrastructure
|
||||
{
|
||||
public class DependencyInjection: Module
|
||||
public static class DependencyInjection
|
||||
{
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
builder.RegisterType<KeePassDatabaseClient>().As<IDatabaseProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassPasswordClient>().As<IPasswordProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassCryptographyClient>().As<ICryptographyClient>();
|
||||
builder.RegisterType<UwpSettingsClient>().As<ISettingsProxy>();
|
||||
builder.RegisterType<UwpResourceClient>().As<IResourceProxy>();
|
||||
builder.RegisterType<UwpRecentFilesClient>().As<IRecentProxy>();
|
||||
builder.RegisterType<StorageFileClient>().As<IFileProxy>();
|
||||
var assembly = typeof(DependencyInjection).GetTypeInfo().Assembly;
|
||||
services.AddAutoMapper(assembly);
|
||||
|
||||
// Register Automapper profiles
|
||||
builder.RegisterType<EntryMappingProfile>().As<Profile>();
|
||||
services.AddSingleton(typeof(IDatabaseProxy), typeof(KeePassDatabaseClient));
|
||||
services.AddTransient(typeof(ICryptographyClient), typeof(KeePassCryptographyClient));
|
||||
services.AddTransient(typeof(IPasswordProxy), typeof(KeePassPasswordClient));
|
||||
services.AddTransient(typeof(IResourceProxy), typeof(UwpResourceClient));
|
||||
services.AddTransient(typeof(ISettingsProxy), typeof(UwpSettingsClient));
|
||||
services.AddTransient(typeof(IRecentProxy), typeof(UwpRecentFilesClient));
|
||||
services.AddTransient(typeof(IFileProxy), typeof(StorageFileClient));
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
@@ -41,6 +41,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DependencyInjection.cs" />
|
||||
<Compile Include="InfrastructureModule.cs" />
|
||||
<Compile Include="File\CsvImportFormat.cs" />
|
||||
<Compile Include="KeePass\EntryMappingProfile.cs" />
|
||||
<Compile Include="KeePass\IconMapper.cs" />
|
||||
@@ -54,19 +55,20 @@
|
||||
<Compile Include="UWP\UwpSettingsClient.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ModernKeePass.Application\ModernKeePass.Application.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Application\Application.csproj">
|
||||
<Project>{42353562-5e43-459c-8e3e-2f21e575261d}</Project>
|
||||
<Name>ModernKeePass.Application</Name>
|
||||
<Name>Application</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\ModernKeePass.Domain.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\Domain.csproj">
|
||||
<Project>{9a0759f1-9069-4841-99e3-3bec44e17356}</Project>
|
||||
<Name>ModernKeePass.Domain</Name>
|
||||
<Name>Domain</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Windows, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Libs\Windows.winmd</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
25
ModernKeePass.Infrastructure/InfrastructureModule.cs
Normal file
25
ModernKeePass.Infrastructure/InfrastructureModule.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Autofac;
|
||||
using AutoMapper;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Infrastructure.KeePass;
|
||||
using ModernKeePass.Infrastructure.UWP;
|
||||
|
||||
namespace ModernKeePass.Infrastructure
|
||||
{
|
||||
public class InfrastructureModule: Module
|
||||
{
|
||||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder.RegisterType<KeePassDatabaseClient>().As<IDatabaseProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassPasswordClient>().As<IPasswordProxy>().SingleInstance();
|
||||
builder.RegisterType<KeePassCryptographyClient>().As<ICryptographyClient>();
|
||||
builder.RegisterType<UwpSettingsClient>().As<ISettingsProxy>();
|
||||
builder.RegisterType<UwpResourceClient>().As<IResourceProxy>();
|
||||
builder.RegisterType<UwpRecentFilesClient>().As<IRecentProxy>();
|
||||
builder.RegisterType<StorageFileClient>().As<IFileProxy>();
|
||||
|
||||
// Register Automapper profiles
|
||||
builder.RegisterType<EntryMappingProfile>().As<Profile>();
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,6 +17,7 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
|
||||
private void FromDtoToModel()
|
||||
{
|
||||
Uri url;
|
||||
CreateMap<PwEntry, EntryEntity>()
|
||||
.ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Uuid.ToHexString()))
|
||||
.ForMember(dest => dest.Name, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.TitleField)))
|
||||
@@ -24,7 +25,7 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
.ForMember(dest => dest.Password, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.PasswordField)))
|
||||
.ForMember(dest => dest.Url, opt =>
|
||||
{
|
||||
opt.PreCondition(src => Uri.TryCreate(GetEntryValue(src, PwDefs.UrlField), UriKind.Absolute, out _));
|
||||
opt.PreCondition(src => Uri.TryCreate(GetEntryValue(src, PwDefs.UrlField), UriKind.Absolute, out url));
|
||||
opt.MapFrom(src => new Uri(GetEntryValue(src, PwDefs.UrlField)));
|
||||
})
|
||||
.ForMember(dest => dest.Notes, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.NotesField)))
|
||||
|
@@ -26,6 +26,7 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
private CompositeKey _compositeKey;
|
||||
|
||||
public bool IsOpen => (_pwDatabase?.IsOpen).GetValueOrDefault();
|
||||
public string Name => _pwDatabase?.Name;
|
||||
|
||||
public GroupEntity RecycleBin { get; set; }
|
||||
|
||||
@@ -40,7 +41,7 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
Name = cipher.DisplayName
|
||||
};
|
||||
}
|
||||
set => _pwDatabase.DataCipherUuid = BuildIdFromString(value.Id);
|
||||
set { _pwDatabase.DataCipherUuid = BuildIdFromString(value.Id); }
|
||||
}
|
||||
|
||||
public BaseEntity KeyDerivation
|
||||
@@ -53,15 +54,18 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
Id = keyDerivation.Uuid.ToHexString(),
|
||||
Name = keyDerivation.Name
|
||||
};
|
||||
}
|
||||
set => _pwDatabase.KdfParameters = KdfPool.Engines
|
||||
.FirstOrDefault(e => e.Uuid.Equals(BuildIdFromString(value.Name)))?.GetDefaultParameters();
|
||||
}
|
||||
set
|
||||
{
|
||||
_pwDatabase.KdfParameters = KdfPool.Engines
|
||||
.FirstOrDefault(e => e.Uuid.Equals(BuildIdFromString(value.Name)))?.GetDefaultParameters();
|
||||
}
|
||||
}
|
||||
|
||||
public string Compression
|
||||
{
|
||||
get => _pwDatabase.Compression.ToString("G");
|
||||
set => _pwDatabase.Compression = (PwCompressionAlgorithm)Enum.Parse(typeof(PwCompressionAlgorithm), value);
|
||||
get { return _pwDatabase.Compression.ToString("G"); }
|
||||
set { _pwDatabase.Compression = (PwCompressionAlgorithm) Enum.Parse(typeof(PwCompressionAlgorithm), value); }
|
||||
}
|
||||
|
||||
public KeePassDatabaseClient(ISettingsProxy settings, IFileProxy fileService, IMapper mapper)
|
||||
|
@@ -3,6 +3,7 @@ using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePassLib.Cryptography;
|
||||
using ModernKeePassLib.Cryptography.PasswordGenerator;
|
||||
using ModernKeePassLib.Keys;
|
||||
using ModernKeePassLib.Security;
|
||||
|
||||
namespace ModernKeePass.Infrastructure.KeePass
|
||||
{
|
||||
@@ -28,7 +29,8 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
|
||||
pwProfile.CharSet.Add(options.CustomChars);
|
||||
|
||||
PwGenerator.Generate(out var password, pwProfile, null, new CustomPwGeneratorPool());
|
||||
ProtectedString password;
|
||||
PwGenerator.Generate(out password, pwProfile, null, new CustomPwGeneratorPool());
|
||||
|
||||
return password.ReadString();
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ namespace ModernKeePass.Infrastructure.UWP
|
||||
{
|
||||
private readonly IPropertySet _values = ApplicationData.Current.LocalSettings.Values;
|
||||
|
||||
public T GetSetting<T>(string property, T defaultValue = default)
|
||||
public T GetSetting<T>(string property, T defaultValue = default(T))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"supports": {},
|
||||
"dependencies": {
|
||||
"AutoMapper": "6.1.1",
|
||||
"AutoMapper.Extensions.Microsoft.DependencyInjection": "2.0.1",
|
||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
|
||||
"ModernKeePassLib": "2.44.1",
|
||||
"NETStandard.Library": "1.6.1"
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.2": {}
|
||||
|
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.App", "ModernKeePass\ModernKeePass.App.csproj", "{A0CFC681-769B-405A-8482-0CDEE595A91F}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Win81App", "ModernKeePass\Win81App.csproj", "{A0CFC681-769B-405A-8482-0CDEE595A91F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.AppTest", "ModernKeePassApp.Test\ModernKeePass.AppTest.csproj", "{7E80F5E7-724A-4668-9333-B10F5D75C6D0}"
|
||||
EndProject
|
||||
@@ -20,11 +20,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0B30588B-07B
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "presentation", "presentation", "{C7DB9A6F-77A8-4FE5-83CB-9C11F7100647}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.Application", "ModernKeePass.Application\ModernKeePass.Application.csproj", "{42353562-5E43-459C-8E3E-2F21E575261D}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "ModernKeePass.Application\Application.csproj", "{42353562-5E43-459C-8E3E-2F21E575261D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.Domain", "ModernKeePass.Domain\ModernKeePass.Domain.csproj", "{9A0759F1-9069-4841-99E3-3BEC44E17356}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "ModernKeePass.Domain\Domain.csproj", "{9A0759F1-9069-4841-99E3-3BEC44E17356}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.Infrastructure", "ModernKeePass.Infrastructure\ModernKeePass.Infrastructure.csproj", "{09577E4C-4899-45B9-BF80-1803D617CCAE}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "ModernKeePass.Infrastructure\Infrastructure.csproj", "{09577E4C-4899-45B9-BF80-1803D617CCAE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@@ -5,13 +5,22 @@ using System.Threading.Tasks;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.AccessCache;
|
||||
using Windows.Storage.Pickers;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.HockeyApp;
|
||||
using ModernKeePass.Application;
|
||||
using ModernKeePass.Application.Database.Commands.CloseDatabase;
|
||||
using ModernKeePass.Application.Database.Commands.SaveDatabase;
|
||||
using ModernKeePass.Application.Database.Queries.GetDatabase;
|
||||
using ModernKeePass.Common;
|
||||
using ModernKeePass.Exceptions;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
using ModernKeePass.Infrastructure;
|
||||
using ModernKeePass.Services;
|
||||
using ModernKeePass.Views;
|
||||
|
||||
@@ -24,6 +33,10 @@ namespace ModernKeePass
|
||||
/// </summary>
|
||||
sealed partial class App
|
||||
{
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
private IMediator _mediator;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
@@ -39,6 +52,13 @@ namespace ModernKeePass
|
||||
Suspending += OnSuspending;
|
||||
Resuming += OnResuming;
|
||||
UnhandledException += OnUnhandledException;
|
||||
|
||||
// Setup DI
|
||||
IServiceCollection serviceCollection = new ServiceCollection();
|
||||
serviceCollection.AddApplication();
|
||||
serviceCollection.AddInfrastructure();
|
||||
Services = serviceCollection.BuildServiceProvider();
|
||||
_mediator = Services.GetService<IMediator>();
|
||||
}
|
||||
|
||||
#region Event Handlers
|
||||
@@ -52,8 +72,7 @@ namespace ModernKeePass
|
||||
exception.InnerException != null
|
||||
? exception.InnerException
|
||||
: exception;
|
||||
|
||||
var database = DatabaseService.Instance;
|
||||
|
||||
var resource = new ResourcesService();
|
||||
if (realException is SaveException)
|
||||
{
|
||||
@@ -64,6 +83,7 @@ namespace ModernKeePass
|
||||
resource.GetResourceValue("MessageDialogSaveErrorButtonDiscard"),
|
||||
async command =>
|
||||
{
|
||||
var database = await _mediator.Send(new GetDatabaseQuery());
|
||||
var savePicker = new FileSavePicker
|
||||
{
|
||||
SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
|
||||
@@ -73,7 +93,16 @@ namespace ModernKeePass
|
||||
new List<string> {".kdbx"});
|
||||
|
||||
var file = await savePicker.PickSaveFileAsync();
|
||||
if (file != null) database.Save(file);
|
||||
if (file != null)
|
||||
{
|
||||
var token = StorageApplicationPermissions.FutureAccessList.Add(file);
|
||||
var fileInfo = new FileInfo
|
||||
{
|
||||
Name = file.DisplayName,
|
||||
Path = token
|
||||
};
|
||||
await _mediator.Send(new SaveDatabaseCommand { FileInfo = fileInfo });
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
}
|
||||
@@ -136,14 +165,13 @@ namespace ModernKeePass
|
||||
Window.Current.Activate();
|
||||
}
|
||||
|
||||
private void OnResuming(object sender, object e)
|
||||
private async void OnResuming(object sender, object e)
|
||||
{
|
||||
var currentFrame = Window.Current.Content as Frame;
|
||||
var database = DatabaseService.Instance;
|
||||
|
||||
try
|
||||
{
|
||||
database.ReOpen();
|
||||
var database = await _mediator.Send(new GetDatabaseQuery());
|
||||
#if DEBUG
|
||||
ToastNotificationHelper.ShowGenericToast(database.Name, "Database reopened (changes were saved)");
|
||||
#endif
|
||||
@@ -177,11 +205,14 @@ namespace ModernKeePass
|
||||
private async void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
{
|
||||
var deferral = e.SuspendingOperation.GetDeferral();
|
||||
var database = DatabaseService.Instance;
|
||||
try
|
||||
{
|
||||
if (SettingsService.Instance.GetSetting("SaveSuspend", true)) database.Save();
|
||||
database.Close(false);
|
||||
var database = await _mediator.Send(new GetDatabaseQuery());
|
||||
if (SettingsService.Instance.GetSetting("SaveSuspend", true))
|
||||
{
|
||||
await _mediator.Send(new SaveDatabaseCommand());
|
||||
}
|
||||
await _mediator.Send(new CloseDatabaseCommand());
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ModernKeePass.Exceptions
|
||||
{
|
||||
public class NavigationException: Exception
|
||||
{
|
||||
public NavigationException(Type pageType) : base($"Failed to load Page {pageType.FullName}")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace ModernKeePass.Exceptions
|
||||
{
|
||||
public class SaveException : Exception
|
||||
{
|
||||
public new Exception InnerException { get; }
|
||||
|
||||
public SaveException(Exception exception)
|
||||
{
|
||||
InnerException = exception;
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace ModernKeePass.Interfaces
|
||||
bool HasChanged { get; set; }
|
||||
|
||||
Task Open(StorageFile databaseFile, CompositeKey key, bool createNew = false);
|
||||
void ReOpen();
|
||||
Task ReOpen();
|
||||
void Save();
|
||||
Task Save(StorageFile file);
|
||||
void CreateRecycleBin(string title);
|
||||
|
@@ -3,7 +3,7 @@ using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
using Microsoft.HockeyApp;
|
||||
using ModernKeePass.Exceptions;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
using ModernKeePass.Interfaces;
|
||||
using ModernKeePass.ViewModels;
|
||||
using ModernKeePassLib;
|
||||
@@ -122,9 +122,9 @@ namespace ModernKeePass.Services
|
||||
}
|
||||
}
|
||||
|
||||
public void ReOpen()
|
||||
public async Task ReOpen()
|
||||
{
|
||||
Open(_databaseFile, _compositeKey);
|
||||
await Open(_databaseFile, _compositeKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@@ -242,7 +242,7 @@ namespace ModernKeePass.ViewModels
|
||||
if (UpperCasePatternSelected) pwProfile.CharSet.Add(PwCharSet.UpperCase);
|
||||
if (LowerCasePatternSelected) pwProfile.CharSet.Add(PwCharSet.LowerCase);
|
||||
if (DigitsPatternSelected) pwProfile.CharSet.Add(PwCharSet.Digits);
|
||||
if (SpecialPatternSelected) pwProfile.CharSet.Add(PwCharSet.SpecialChars);
|
||||
if (SpecialPatternSelected) pwProfile.CharSet.Add(PwCharSet.Special);
|
||||
if (MinusPatternSelected) pwProfile.CharSet.Add('-');
|
||||
if (UnderscorePatternSelected) pwProfile.CharSet.Add('_');
|
||||
if (SpacePatternSelected) pwProfile.CharSet.Add(' ');
|
||||
|
@@ -85,7 +85,7 @@ namespace ModernKeePass.Views.UserControls
|
||||
|
||||
if (UpdateKey)
|
||||
{
|
||||
Model.UpdateKey();
|
||||
await Model.UpdateKey();
|
||||
ValidationChecked?.Invoke(this, new PasswordEventArgs(Model.RootGroup));
|
||||
}
|
||||
else
|
||||
@@ -157,7 +157,7 @@ namespace ModernKeePass.Views.UserControls
|
||||
var file = await savePicker.PickSaveFileAsync();
|
||||
if (file == null) return;
|
||||
|
||||
Model.CreateKeyFile(file);
|
||||
await Model.CreateKeyFile(file);
|
||||
}
|
||||
|
||||
private async Task OpenDatabase(IResourceService resource)
|
||||
|
@@ -19,6 +19,8 @@
|
||||
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
|
||||
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -116,7 +118,6 @@
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Converters\IntToSymbolConverter.cs" />
|
||||
<Compile Include="Exceptions\NavigationException.cs" />
|
||||
<Compile Include="ImportFormats\CsvImportFormat.cs" />
|
||||
<Compile Include="ImportFormats\NullImportFormat.cs" />
|
||||
<Compile Include="Interfaces\IFormat.cs" />
|
||||
@@ -147,7 +148,6 @@
|
||||
<Compile Include="Converters\DiscreteIntToSolidColorBrushConverter.cs" />
|
||||
<Compile Include="Converters\EmptyStringToVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\NullToBooleanConverter.cs" />
|
||||
<Compile Include="Exceptions\SaveException.cs" />
|
||||
<Compile Include="Extensions\DispatcherTaskExtensions.cs" />
|
||||
<Compile Include="Interfaces\IDatabaseService.cs" />
|
||||
<Compile Include="Interfaces\IHasSelectableObject.cs" />
|
||||
@@ -393,10 +393,41 @@
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac">
|
||||
<HintPath>..\..\..\..\..\.nuget\packages\Autofac\4.9.4\lib\netstandard1.1\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AutoMapper, Version=6.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.6.1.1\lib\netstandard1.1\AutoMapper.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="AutoMapper.Extensions.Microsoft.DependencyInjection, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.Extensions.Microsoft.DependencyInjection.2.0.1\lib\netstandard1.1\AutoMapper.Extensions.Microsoft.DependencyInjection.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.5\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentValidation, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7de548da2fbae0f0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentValidation.8.6.2\lib\netstandard1.1\FluentValidation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MediatR, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MediatR.3.0.1\lib\netstandard1.1\MediatR.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MediatR.Extensions.Microsoft.DependencyInjection, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MediatR.Extensions.Microsoft.DependencyInjection.2.0.0\lib\netstandard1.1\MediatR.Extensions.Microsoft.DependencyInjection.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.1.1.1\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.1\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.HockeyApp.Core45, Version=4.1.6.1005, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HockeySDK.Core.4.1.6\lib\portable-net45+win8+wp8+wpa81+win81+uap10.0\Microsoft.HockeyApp.Core45.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -433,6 +464,14 @@
|
||||
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Primitives.4.3.0\lib\netstandard1.0\System.ComponentModel.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.TypeConverter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.TypeConverter.4.3.0\lib\netstandard1.0\System.ComponentModel.TypeConverter.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\netstandard1.1\System.Drawing.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
@@ -538,30 +577,23 @@
|
||||
<Content Include="Assets\Wide310x150Logo.scale-80.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ModernKeePass.Application\ModernKeePass.Application.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Application\Application.csproj">
|
||||
<Project>{42353562-5e43-459c-8e3e-2f21e575261d}</Project>
|
||||
<Name>ModernKeePass.Application</Name>
|
||||
<Name>Application</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\ModernKeePass.Domain.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Domain\Domain.csproj">
|
||||
<Project>{9a0759f1-9069-4841-99e3-3bec44e17356}</Project>
|
||||
<Name>ModernKeePass.Domain</Name>
|
||||
<Name>Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ModernKeePass.Infrastructure\ModernKeePass.Infrastructure.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass.Infrastructure\Infrastructure.csproj">
|
||||
<Project>{09577e4c-4899-45b9-bf80-1803d617ccae}</Project>
|
||||
<Name>ModernKeePass.Infrastructure</Name>
|
||||
<Name>Infrastructure</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '12.0' ">
|
||||
<VisualStudioVersion>12.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
@@ -1,8 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="6.1.1" targetFramework="win81" />
|
||||
<package id="AutoMapper.Extensions.Microsoft.DependencyInjection" version="2.0.1" targetFramework="win81" />
|
||||
<package id="FluentValidation" version="8.6.2" targetFramework="win81" />
|
||||
<package id="HockeySDK.Core" version="4.1.6" targetFramework="win81" />
|
||||
<package id="HockeySDK.WINRT" version="4.1.6" targetFramework="win81" />
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="win81" />
|
||||
<package id="MediatR" version="3.0.1" targetFramework="win81" />
|
||||
<package id="MediatR.Extensions.Microsoft.DependencyInjection" version="2.0.0" targetFramework="win81" />
|
||||
<package id="Microsoft.CSharp" version="4.3.0" targetFramework="win81" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="1.1.1" targetFramework="win81" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.1.1" targetFramework="win81" />
|
||||
<package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="win81" />
|
||||
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.1" targetFramework="win81" />
|
||||
<package id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.1.7" targetFramework="win81" />
|
||||
@@ -15,14 +22,21 @@
|
||||
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="win81" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="win81" />
|
||||
<package id="System.ComponentModel" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.ComponentModel.Primitives" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.ComponentModel.TypeConverter" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Globalization" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Linq" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Linq.Queryable" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Memory" version="4.5.1" targetFramework="win81" />
|
||||
<package id="System.Net.Requests" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="win81" />
|
||||
@@ -37,6 +51,7 @@
|
||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Runtime.WindowsRuntime" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Text.Encoding" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Threading" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="win81" />
|
||||
<package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="win81" />
|
||||
|
@@ -153,9 +153,9 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ModernKeePass\ModernKeePass.App.csproj">
|
||||
<ProjectReference Include="..\ModernKeePass\Win81App.csproj">
|
||||
<Project>{A0CFC681-769B-405A-8482-0CDEE595A91F}</Project>
|
||||
<Name>ModernKeePass.App</Name>
|
||||
<Name>Win81App</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user