empty
This commit is contained in:
parent
de6698bab8
commit
37ceac59b8
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.Foundation.CodePlaces.Options.FavoritesListContainer">
|
||||
<Options Language="Neutral">
|
||||
<Groups />
|
||||
</Options>
|
||||
</Root>
|
||||
|
|
@ -1,223 +0,0 @@
|
|||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
.vs/
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# Build scripts folder
|
||||
[Aa]pp[Bb]uild/
|
||||
[Oo]ut/
|
||||
|
||||
# Visual Studio Code files
|
||||
.vscode/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
#Launch settings
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
|
||||
|
||||
#######################
|
||||
## nopCommerce specific
|
||||
###########
|
||||
glob:*.user
|
||||
*.patch
|
||||
*.hg
|
||||
Presentation/Nop.Web/.config/*
|
||||
Presentation/Nop.Web/App_Data/Gmail/AuthStore/*
|
||||
!Presentation/Nop.Web/App_Data/Gmail/AuthStore/Index.htm
|
||||
Presentation/Nop.Web/App_Data/browscap.xml
|
||||
Presentation/Nop.Web/App_Data/additional.crawlers.xml
|
||||
Presentation/Nop.Web/App_Data/installedPlugins.json
|
||||
Presentation/Nop.Web/App_Data/plugins.json
|
||||
Presentation/Nop.Web/App_Data/dataSettings.json
|
||||
Presentation/Nop.Web/App_Data/appsettings.json
|
||||
Presentation/Nop.Web/App_Data/TempUploads/*
|
||||
!Presentation/Nop.Web/App_Data/TempUploads/Index.htm
|
||||
Presentation/Nop.Web/App_Data/DataProtectionKeys/*
|
||||
!Presentation/Nop.Web/App_Data/DataProtectionKeys/Index.htm
|
||||
Presentation/Nop.Web/node_modules/*
|
||||
Presentation/Nop.Web/Plugins/*
|
||||
Presentation/Nop.Web/[Bb]in/*
|
||||
Presentation/Nop.Web/[Oo]bj/*
|
||||
Presentation/Nop.Web.FrameWork/[Bb]in/*
|
||||
Presentation/Nop.Web.FrameWork/[Oo]bj/*
|
||||
!Presentation/Nop.Web/Plugins/Uploaded
|
||||
Presentation/Nop.Web/Plugins/Uploaded/*
|
||||
!Presentation/Nop.Web/Plugins/Uploaded/placeholder.txt
|
||||
Presentation/Nop.Web/wwwroot/.well-known/*
|
||||
!Presentation/Nop.Web/wwwroot/.well-known/Index.htm
|
||||
Presentation/Nop.Web/wwwroot/bundles/*
|
||||
!Presentation/Nop.Web/wwwroot/bundles/Index.htm
|
||||
Presentation/Nop.Web/wwwroot/db_backups/*.bak
|
||||
!Presentation/Nop.Web/wwwroot/db_backups/Index.htm
|
||||
Presentation/Nop.Web/wwwroot/images/thumbs/*
|
||||
!Presentation/Nop.Web/wwwroot/images/thumbs/placeholder.txt
|
||||
Presentation/Nop.Web/wwwroot/images/uploaded/*
|
||||
!Presentation/Nop.Web/wwwroot/images/uploaded/placeholder.txt
|
||||
Presentation/Nop.Web/wwwroot/files/exportimport/*
|
||||
!Presentation/Nop.Web/wwwroot/files/exportimport/Index.htm
|
||||
Presentation/Nop.Web/wwwroot/lib_npm/cldr-data/main/*
|
||||
!Presentation/Nop.Web/wwwroot/lib_npm/cldr-data/main/en/
|
||||
!Presentation/Nop.Web/wwwroot/lib_npm/cldr-data/main/main.zip
|
||||
Presentation/Nop.Web/wwwroot/sitemaps/*
|
||||
!Presentation/Nop.Web/wwwroot/sitemaps/Index.htm
|
||||
packages/*
|
||||
Tests/Nop.Tests/Connections.resx
|
||||
/.vs
|
||||
/FruitBankHybrid.Web/bin
|
||||
/FruitBankHybrid.Web.Client/bin
|
||||
/FruitBankHybrid/bin
|
||||
/FruitBankHybrid/obj
|
||||
/FruitBankHybrid.Shared/bin
|
||||
/FruitBankHybrid.Shared/obj
|
||||
/FruitBankHybrid.Web.Client/obj
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
obj
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="9.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Core">
|
||||
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.8\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AyCode.Core.Consts;
|
||||
|
||||
namespace FruitBank.Common.Server
|
||||
{
|
||||
public class FruitBankConst : AcConst
|
||||
{
|
||||
public static string ProjectIdString = "aad53443-2ee2-4650-8a99-97e907265e4e";
|
||||
public static string MeasuringRoleSystemName = "Measuring";
|
||||
|
||||
static FruitBankConst()
|
||||
{
|
||||
ProjectId = Guid.Parse(ProjectIdString);
|
||||
ProjectSalt = GenerateProjectSalt(ProjectId.ToString("N"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Server.Services.Loggers;
|
||||
|
||||
public class ConsoleLogWriter : AcConsoleLogWriter
|
||||
{
|
||||
public ConsoleLogWriter() : this(null)
|
||||
{ }
|
||||
|
||||
public ConsoleLogWriter(string? categoryName = null) : base(categoryName)
|
||||
{ }
|
||||
|
||||
public ConsoleLogWriter(AppType appType, LogLevel logLevel, string? callerClassName = null) : base(appType, logLevel, callerClassName)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using FruitBank.Common.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Server.Services.Loggers;
|
||||
|
||||
public class LoggerToLoggerApiController : Logger<LoggerToLoggerApiController>
|
||||
{
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
using AyCode.Core.Loggers;
|
||||
using AyCode.Services.Server.SignalRs;
|
||||
using AyCode.Services.SignalRs;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace FruitBank.Common.Server.Services.SignalRs;
|
||||
|
||||
public class AcWebSignalRHubWithSessionBase<TSignalRTags, TLogger>(IConfiguration configuration, TLogger logger)
|
||||
: AcWebSignalRHubBase<TSignalRTags, TLogger>(configuration, logger) where TSignalRTags : AcSignalRTags where TLogger : AcLoggerBase//Hub<ISignalRHubItemServer>, IAcSignalRHubServer
|
||||
{
|
||||
public override async Task OnConnectedAsync()
|
||||
{
|
||||
await base.OnConnectedAsync();
|
||||
|
||||
////insert or update them into database.
|
||||
//var CId = _context.UserIdToCId.Find(userId);
|
||||
//CId.ConnectionId = connectionid;
|
||||
//_context.Update(CId);
|
||||
//await _context.SaveChangesAsync();
|
||||
//await base.OnConnectedAsync();
|
||||
////await Groups.AddToGroupAsync(Context.ConnectionId, "SignalR Users");
|
||||
}
|
||||
|
||||
public override async Task OnDisconnectedAsync(Exception? exception)
|
||||
{
|
||||
await base.OnDisconnectedAsync(exception);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
using AyCode.Core.Loggers;
|
||||
using AyCode.Models.Server.DynamicMethods;
|
||||
using AyCode.Services.SignalRs;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using FruitBank.Common.Loggers;
|
||||
using FruitBank.Common.SignalRs;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace FruitBank.Common.Server.Services.SignalRs;
|
||||
|
||||
//public class DevAdminSignalRHub : AcWebSignalRHubWithSessionBase<SignalRTags, Logger<DevAdminSignalRHub>>
|
||||
//{
|
||||
// public DevAdminSignalRHub(IConfiguration configuration, IEnumerable<IAcLogWriterBase> logWriters)
|
||||
// : base(configuration, new Logger<DevAdminSignalRHub>(logWriters.ToArray()))
|
||||
// {
|
||||
// Logger.Info("DevAdminSignalRHub");
|
||||
// }
|
||||
|
||||
// public Task ReceiveMessage(int messageTag, byte[]? message, int? requestId)
|
||||
// {
|
||||
|
||||
// Clients.All.SendAsync("TestMessage", "Hello from server");
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
public class DevAdminSignalRHub : AcWebSignalRHubWithSessionBase<SignalRTags, Logger<DevAdminSignalRHub>>
|
||||
{
|
||||
public DevAdminSignalRHub(IConfiguration configuration, IFruitBankDataControllerServer fruitBankDataController/*, SessionService sessionService*/, IEnumerable<IAcLogWriterBase> logWriters)
|
||||
: base(configuration, new Logger<DevAdminSignalRHub>(logWriters.ToArray()))
|
||||
{
|
||||
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(fruitBankDataController));
|
||||
}
|
||||
|
||||
//public override Task OnReceiveMessage(int messageTag, byte[]? message, int? requestId)
|
||||
//{
|
||||
// return ProcessOnReceiveMessage(messageTag, message, requestId, async tagName =>
|
||||
// {
|
||||
// switch (messageTag)
|
||||
// {
|
||||
// case SignalRTags.GetAddress:
|
||||
// //var id = Guid.Parse((string)message!.MessagePackTo<SignalPostJsonDataMessage<IdMessage>>().PostData.Ids[0]);
|
||||
// var id = message!.MessagePackTo<SignalPostJsonDataMessage<IdMessage>>().PostData.Ids[0].JsonTo<Guid[]>()![0];
|
||||
|
||||
// var address = await _adminDal.GetAddressByIdAsync(id);
|
||||
// await ResponseToCaller(messageTag, new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, address), requestId);
|
||||
|
||||
// return;
|
||||
|
||||
// case SignalRTags.GetAddressesByContextId:
|
||||
// //id = Guid.Parse((string)message!.MessagePackTo<SignalPostJsonDataMessage<IdMessage>>().PostData.Ids[0]);
|
||||
// id = message!.MessagePackTo<SignalPostJsonDataMessage<IdMessage>>().PostData.Ids[0].JsonTo<Guid[]>()![0];
|
||||
|
||||
// address = await _adminDal.GetAddressByIdAsync(id);
|
||||
// await ResponseToCaller(messageTag, new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, new List<Address> { address! }), requestId);
|
||||
|
||||
// return;
|
||||
|
||||
// case SignalRTags.UpdateAddress:
|
||||
// address = message!.MessagePackTo<SignalPostJsonDataMessage<Address>>().PostData;
|
||||
|
||||
// await _adminDal.UpdateAddressAsync(address);
|
||||
// await ResponseToCaller(messageTag, new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, address), requestId);
|
||||
|
||||
// return;
|
||||
|
||||
// case SignalRTags.UpdateProfile:
|
||||
// var profile = message!.MessagePackTo<SignalPostJsonDataMessage<Profile>>().PostData;
|
||||
|
||||
// await _adminDal.UpdateProfileAsync(profile);
|
||||
// await ResponseToCaller(messageTag, new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, profile), requestId);
|
||||
|
||||
// return;
|
||||
|
||||
// //case SignalRTags.GetTransfersAsync:
|
||||
// // await ResponseToCaller(messageTag, new SignalResponseJsonMessage(SignalResponseStatus.Success, await _transferDataApiController.GetTransfers()), requestId);
|
||||
|
||||
// // return;
|
||||
|
||||
// //case SignalRTags.GetPropertiesByOwnerIdAsync:
|
||||
// // var ownerId = message!.MessagePackTo<SignalRequestByIdMessage>().Id;
|
||||
|
||||
// // await ResponseToCaller(messageTag, new SignalResponseJsonMessage(SignalResponseStatus.Success, await _serviceProviderApiController.GetServiceProvidersByOwnerId(ownerId)), requestId);
|
||||
|
||||
// // return;
|
||||
|
||||
// //case SignalRTags.UpdateTransferAsync:
|
||||
// // var transfer = message!.MessagePackTo<SignalPostJsonDataMessage<Transfer>>().PostData;
|
||||
|
||||
// // await _transferDataApiController.UpdateTransfer(transfer);
|
||||
// // await ResponseToCaller(messageTag, new SignalResponseJsonMessage(SignalResponseStatus.Success, transfer), requestId);
|
||||
|
||||
// // return;
|
||||
|
||||
// //case SignalRTags.GetCompaniesAsync:
|
||||
// // await ResponseToCaller(messageTag, new SignalResponseJsonMessage(SignalResponseStatus.Success, await _serviceProviderApiController.GetServiceProviders()), requestId);
|
||||
|
||||
// // return;
|
||||
// //case SignalRTags.UpdateCompanyAsync:
|
||||
|
||||
// // var updateCompany = message!.MessagePackTo<SignalPostJsonDataMessage<Company>>().PostData;
|
||||
|
||||
// // await _serviceProviderApiController.UpdateServiceProvider(updateCompany);
|
||||
// // await ResponseToCaller(messageTag, new SignalResponseJsonMessage(SignalResponseStatus.Success, updateCompany), requestId);
|
||||
|
||||
// // return;
|
||||
|
||||
// default:
|
||||
// Logger.Error($"Server OnReceiveMessage; messageTag not found! {tagName}");
|
||||
// break;
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
using AyCode.Services.Server.SignalRs;
|
||||
using FruitBank.Common.Server.Services.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Server.Services.SignalRs;
|
||||
|
||||
|
||||
public class LoggerSignalRHub(LoggerToLoggerApiController logger) : AcLoggerSignalRHub<LoggerToLoggerApiController>(logger)
|
||||
{ }
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
using FruitBank.Common.Interfaces;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.PartnerDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PartnerDbTableName)]
|
||||
public class Partner : MgEntityBase, IPartner
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string State { get; set; }
|
||||
public string County { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Street { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId))]
|
||||
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
||||
|
||||
|
||||
|
||||
[SkipValuesOnUpdate]
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
using FruitBank.Common.Interfaces;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.ShippingDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDbTableName)]
|
||||
public class Shipping : MgEntityBase, IShipping
|
||||
{
|
||||
public int PartnerId { get; set; }
|
||||
public DateTime ShippingDate { get; set; }
|
||||
public string LicencePlate { get; set; }
|
||||
public bool IsAllMeasured { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId))]
|
||||
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
||||
|
||||
|
||||
[SkipValuesOnUpdate]
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
using FruitBank.Common.Interfaces;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.ShippingDocumentDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDocumentDbTableName)]
|
||||
public class ShippingDocument : MgEntityBase, IShippingDocument
|
||||
{
|
||||
public int PartnerId { get; set; }
|
||||
public int ShippingId { get; set; }
|
||||
public DateTime ShippingDate { get; set; }
|
||||
public string Country { get; set; }
|
||||
public bool IsAllMeasured { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id))]
|
||||
public Shipping? Shipping{ get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(PartnerId), OtherKey = nameof(Partner.Id))]
|
||||
public Partner? Partner { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingItem.ShippingDocumentId))]
|
||||
public List<ShippingItem>? ShippingItems { get; set; }
|
||||
|
||||
|
||||
[SkipValuesOnUpdate]
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
using AyCode.Core.Interfaces;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
using Nop.Core.Domain.Customers;
|
||||
using Nop.Core.Domain.Orders;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.ShippingItemDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingItemDbTableName)]
|
||||
public class ShippingItem : MgEntityBase, IShippingItem
|
||||
{
|
||||
public int? ProductId { get; set; }
|
||||
//[Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(Shipping.Id))]
|
||||
//public IEnumerable<Shipping> Shippings { get; set; }
|
||||
|
||||
public int ShippingDocumentId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double NetWeight { get; set; }
|
||||
public double GrossWeight { get; set; }
|
||||
public double? MeasuredNetWeight { get; set; }
|
||||
public double? MeasuredGrossWeight { get; set; }
|
||||
public bool IsMeasured { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(ShippingDocument.Id))]
|
||||
public ShippingDocument? ShippingDocument { get; set; }
|
||||
|
||||
|
||||
[SkipValuesOnUpdate]
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Dtos\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
using AyCode.Core.Consts;
|
||||
using AyCode.Core.Loggers;
|
||||
|
||||
namespace FruitBank.Common;
|
||||
|
||||
public static class FruitBankConstClient
|
||||
{
|
||||
public static string DefaultLocale = "en-US";
|
||||
|
||||
public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
|
||||
//public static string BaseUrl = "http://10.0.2.2:59579"; //FrutiBank (android) nop
|
||||
//public static string BaseUrl = "https://localhost:7144"; //HybridApp
|
||||
|
||||
|
||||
public static string DefaultHubName = "fbHub";
|
||||
public static string LoggerHubName = "loggerHub";
|
||||
|
||||
public const string PartnerDbTableName = "fbPartner";
|
||||
public const string ShippingDbTableName = "fbShipping";
|
||||
public const string ShippingItemDbTableName = "fbShippingItem";
|
||||
public const string ShippingDocumentDbTableName = "fbShippingDocument";
|
||||
|
||||
|
||||
//public static Guid[] DevAdminIds = new Guid[2] { Guid.Parse("dcf451d2-cc4c-4ac2-8c1f-da00041be1fd"), Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7") };
|
||||
//public static Guid[] SysAdmins = new Guid[3]
|
||||
//{
|
||||
// Guid.Parse("dcf451d2-cc4c-4ac2-8c1f-da00041be1fd"),
|
||||
// Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7"),
|
||||
// Guid.Parse("540271f6-c604-4c16-8160-d5a7cafedf00")
|
||||
//};
|
||||
//public static Dictionary<string, Guid> SysAccounts = new Dictionary<string, Guid>
|
||||
//{
|
||||
// { "SystemEmailSender", Guid.Parse("5e13e051-4fd6-4a30-a371-75cc785cfb84")},
|
||||
//};
|
||||
|
||||
public static string WelcomeEmailTemplateName = "WelcomeEmailTemplate";
|
||||
public static string NewTransferEmailTemplateName = "NewTransferEmailTemplate";
|
||||
public static string TransferModifiedEmailTemplateName = "TramsferModifiedEmailTemplate";
|
||||
public static string ForgotPasswordEmailTemplateName = "ForgotPasswordEmailTemplate";
|
||||
public static string GeneralEmailTemplateName = "GeneralEmailTemplate";
|
||||
|
||||
public static List<string> WelcomeEmailParameters = new List<string>()
|
||||
{
|
||||
"UserName",
|
||||
"SettingBaseUrl",
|
||||
"UserId",
|
||||
"Token"
|
||||
};
|
||||
|
||||
public static List<string> ForgotPasswordEmailParameters = new List<string>()
|
||||
{
|
||||
//string userName, string settingBaseUrl, string userId, string token
|
||||
"UserName",
|
||||
"SettingBaseUrl",
|
||||
"UserId",
|
||||
"Token"
|
||||
};
|
||||
|
||||
public static List<string> NewTransferEmailParameters = new List<string>()
|
||||
{
|
||||
//string userName, string fromAddress, string toAddress, string appointment,
|
||||
//string fullname,string passengerCount, string luggageCount, string settingBaseUrl, string transferId
|
||||
"UserName",
|
||||
"FromAddress",
|
||||
"ToAddress",
|
||||
"Appointment",
|
||||
"FullName",
|
||||
"PassengerCount",
|
||||
"LuggageCount",
|
||||
"SettingBaseUrl",
|
||||
"TransferId"
|
||||
};
|
||||
|
||||
public static List<string> GeneralEmailParameters = new List<string>()
|
||||
{
|
||||
//string userName, string settingBaseUrl, string userId, string token
|
||||
"UserName",
|
||||
"MessageBody",
|
||||
"SettingBaseUrl",
|
||||
"UserId"
|
||||
};
|
||||
|
||||
#if RELEASE
|
||||
public static string SystemEmailAddress = "test@touriam.com";
|
||||
public static LogLevel DefaultLogLevelClient = LogLevel.Error;
|
||||
#else
|
||||
public static string SystemEmailAddress = "test@touriam.com";
|
||||
public static LogLevel DefaultLogLevelClient = LogLevel.Detail;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
using Mango.Nop.Core.Models;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IFruitBankDataControllerClient : IFruitBankDataControllerCommon
|
||||
{
|
||||
Task<MgLoginModelResponse?> LoginMeasuringUser(string customerEmail, string customerPassword);
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Models;
|
||||
using Mango.Nop.Core.Dtos;
|
||||
using Mango.Nop.Core.Models;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IFruitBankDataControllerCommon
|
||||
{
|
||||
public Task<List<MeasuringModel>?> GetMeasuringModels();
|
||||
public Task<MeasuringModel?> GetMeasuringModelByShippingId(int shippingId);
|
||||
|
||||
#region Partner
|
||||
public Task<List<Partner>?> GetPartners();
|
||||
public Task<Partner?> GetPartnerById(int id);
|
||||
public Task<Partner?> UpdatePartner(Partner partner);
|
||||
#endregion Partner
|
||||
|
||||
#region Shipping
|
||||
public Task<List<Shipping>?> GetShippings();
|
||||
Task<List<Shipping>?> GetNotMeasuredShippings();
|
||||
public Task<Shipping?> GetShippingById(int id);
|
||||
public Task<Shipping?> UpdateShipping(Shipping shipping);
|
||||
#endregion Shipping
|
||||
|
||||
#region ShippingItem
|
||||
public Task<List<ShippingItem>?> GetShippingItems();
|
||||
public Task<ShippingItem?> GetShippingItemById(int id);
|
||||
public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem);
|
||||
#endregion ShippingItem
|
||||
|
||||
#region ShippingDocument
|
||||
public Task<List<ShippingDocument>?> GetShippingDocuments();
|
||||
public Task<ShippingDocument?> GetShippingDocumentById(int id);
|
||||
public Task<ShippingDocument?> UpdateShippingDocument(ShippingDocument shippingDocument);
|
||||
#endregion ShippingDocument
|
||||
|
||||
#region Customer
|
||||
public Task<List<CustomerDto>?> GetMeasuringUsers();
|
||||
#endregion Customer
|
||||
|
||||
#region Product
|
||||
public Task<List<ProductDto>?> GetProductDtos();
|
||||
#endregion Product
|
||||
|
||||
Task<MgLoginModelResponse?> LoginMeasuringUser(MgLoginModelRequest loginModelRequest);
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
using Mango.Nop.Core.Models;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IFruitBankDataControllerServer : IFruitBankDataControllerCommon
|
||||
{
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IPartner : IEntityInt, ITimeStampInfo
|
||||
{
|
||||
string Name { get; set; }
|
||||
string PostalCode { get; set; }
|
||||
string Country { get; set; }
|
||||
string State { get; set; }
|
||||
string County { get; set; }
|
||||
string City { get; set; }
|
||||
string Street { get; set; }
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using FruitBank.Common.Entities;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IShipping : IEntityInt, ITimeStampInfo
|
||||
{
|
||||
int PartnerId { get; set; }
|
||||
DateTime ShippingDate { get; set; }
|
||||
string LicencePlate { get; set; }
|
||||
bool IsAllMeasured { get; set; }
|
||||
|
||||
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using FruitBank.Common.Entities;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IShippingDocument: IEntityInt, ITimeStampInfo
|
||||
{
|
||||
public int PartnerId { get; set; }
|
||||
public int ShippingId { get; set; }
|
||||
public DateTime ShippingDate { get; set; }
|
||||
public string Country { get; set; }
|
||||
public bool IsAllMeasured { get; set; }
|
||||
|
||||
public Partner? Partner { get; set; }
|
||||
public List<ShippingItem>? ShippingItems { get; set; }
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IShippingItem : IEntityInt, ITimeStampInfo
|
||||
{
|
||||
int ShippingDocumentId { get; set; }
|
||||
int? ProductId { get; set; }
|
||||
|
||||
string Name { get; set; }
|
||||
double NetWeight { get; set; }
|
||||
double GrossWeight { get; set; }
|
||||
double? MeasuredNetWeight { get; set; }
|
||||
double? MeasuredGrossWeight { get; set; }
|
||||
|
||||
bool IsMeasured { get; set; }
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
using AyCode.Core.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Loggers;
|
||||
|
||||
public interface ILogger<TCategory> : ILogger
|
||||
{
|
||||
|
||||
}
|
||||
public interface ILogger : IAcLoggerBase
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Loggers;
|
||||
|
||||
public class Logger<TCategory> : Logger, ILogger<TCategory>
|
||||
{
|
||||
public Logger() : base(typeof(TCategory).Name)
|
||||
{ }
|
||||
|
||||
public Logger(params IAcLogWriterBase[] logWriters) : base(typeof(TCategory).Name, logWriters)
|
||||
{ }
|
||||
|
||||
public Logger(AppType appType, LogLevel logLevel, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, typeof(TCategory).Name, logWriters)
|
||||
{ }
|
||||
}
|
||||
|
||||
public class Logger : AcLoggerBase, ILogger
|
||||
{
|
||||
public Logger() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
public Logger(string? categoryName) : base(categoryName)
|
||||
{ }
|
||||
|
||||
public Logger(string? categoryName, params IAcLogWriterBase[] logWriters) : base(categoryName, logWriters)
|
||||
{ }
|
||||
|
||||
public Logger(AppType appType, LogLevel logLevel, string? categoryName, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, categoryName, logWriters)
|
||||
{ }
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
using AyCode.Services.Loggers;
|
||||
|
||||
namespace FruitBank.Common.Loggers
|
||||
{
|
||||
public class SignaRClientLogItemWriter : AcSignaRClientLogItemWriter
|
||||
{
|
||||
public SignaRClientLogItemWriter() : this(AppType.Web, LogLevel.Detail, null)
|
||||
{
|
||||
}
|
||||
public SignaRClientLogItemWriter(AppType appType, LogLevel logLevel, string? categoryName = null) : base($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.LoggerHubName}", appType, logLevel, categoryName)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
using AyCode.Core.Interfaces;
|
||||
using FruitBank.Common.Entities;
|
||||
|
||||
namespace FruitBank.Common.Models
|
||||
{
|
||||
public class MeasuringModel : IAcSerializableToJson
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public Shipping Shipping { get; set; }
|
||||
public List<Partner> Partners { get; set; }
|
||||
public List<ShippingItem> ShippingItems { get; set; }
|
||||
public List<ShippingDocument> ShippingDocuments { get; set; }
|
||||
|
||||
|
||||
public MeasuringModel()
|
||||
{
|
||||
}
|
||||
|
||||
public MeasuringModel(string name) : this()
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public MeasuringModel(Shipping shipping, List<Partner> partners, List<ShippingItem> shippingItems, List<ShippingDocument> shippingDocuments) : this()
|
||||
{
|
||||
Shipping = shipping;
|
||||
Partners = partners ?? [];
|
||||
ShippingItems = shippingItems ?? [];
|
||||
ShippingDocuments = shippingDocuments ?? [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
using AyCode.Services.SignalRs;
|
||||
|
||||
namespace FruitBank.Common.SignalRs;
|
||||
|
||||
public class SignalRTags : AcSignalRTags
|
||||
{
|
||||
public const int GetSiteViewModelByUserId = int.MaxValue;
|
||||
|
||||
public const int GetMeasuringModels = 10;
|
||||
public const int GetMeasuringModelByShippingId = 11;
|
||||
|
||||
public const int GetPartners = 20;
|
||||
public const int GetPartnerById = 21;
|
||||
public const int AddPartner = 25;
|
||||
public const int UpdatePartner = 26;
|
||||
|
||||
public const int GetShippings = 40;
|
||||
public const int GetNotMeasuredShippings = 41;
|
||||
public const int GetShippingById = 42;
|
||||
public const int AddShipping = 45;
|
||||
public const int UpdateShipping = 46;
|
||||
|
||||
public const int GetShippingItems = 50;
|
||||
public const int GetShippingItemById = 51;
|
||||
public const int AddShippingItem = 55;
|
||||
public const int UpdateShippingItem = 56;
|
||||
|
||||
public const int GetShippingDocuments = 60;
|
||||
public const int GetShippingDocumentById = 61;
|
||||
public const int AddShippingDocument = 65;
|
||||
public const int UpdateShippingDocument = 66;
|
||||
|
||||
public const int GetMeasuringUsers = 70;
|
||||
public const int GetCustomerDtoById = 71;
|
||||
|
||||
public const int GetProductDtos = 80;
|
||||
public const int GetProductDtoById = 81;
|
||||
|
||||
public const int AuthenticateUser = 160;
|
||||
public const int RefreshToken = 200;
|
||||
|
||||
public const int GetAllLogItemsByFilterText = 1000;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace FruitBankHybrid.Shared.Common
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,264 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
using AyCode.Utils.Extensions;
|
||||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Loggers;
|
||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public sealed class FruitBankClientTests
|
||||
{
|
||||
private const string Fixture = "_test.temp";
|
||||
|
||||
private FruitBankSignalRClient _signalRClient = null!;
|
||||
|
||||
private static string GetFixtureName(string name) => $"{GetOriginalName(name)}{Fixture}";
|
||||
private static string GetOriginalName(string name) => name.Replace(Fixture, string.Empty);
|
||||
|
||||
[TestInitialize]
|
||||
public void TestInit()
|
||||
{
|
||||
_signalRClient = new FruitBankSignalRClient(new List<IAcLogWriterClientBase>
|
||||
{
|
||||
//new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)),
|
||||
new SignaRClientLogItemWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests))
|
||||
});
|
||||
}
|
||||
|
||||
#region Partner
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetPartnersTest()
|
||||
{
|
||||
var partners = await _signalRClient.GetPartners();
|
||||
|
||||
Assert.IsNotNull(partners);
|
||||
Assert.IsTrue(partners.Count != 0);
|
||||
}
|
||||
|
||||
//[DataTestMethod]
|
||||
//[DataRow(1)]
|
||||
public async Task<Partner> GetPartnerByIdTest(int partnerId)
|
||||
{
|
||||
var partner = await _signalRClient.GetPartnerById(partnerId);
|
||||
|
||||
Assert.IsNotNull(partner);
|
||||
Assert.IsTrue(partner.Id == partnerId);
|
||||
|
||||
return partner;
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow(2)]
|
||||
public async Task UpdatePartnerTest(int partnerId)
|
||||
{
|
||||
var partner = await GetPartnerByIdTest(partnerId);
|
||||
|
||||
var newName = GetFixtureName(partner.Name);
|
||||
|
||||
partner.Name = newName;
|
||||
await _signalRClient.UpdatePartner(partner);
|
||||
|
||||
partner = await GetPartnerByIdTest(partnerId);
|
||||
Assert.IsTrue(partner.Name == newName);
|
||||
|
||||
partner.Name = GetOriginalName(partner.Name);
|
||||
await _signalRClient.UpdatePartner(partner);
|
||||
}
|
||||
#endregion Partner
|
||||
|
||||
#region Shipping
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetShippingsTest()
|
||||
{
|
||||
var shippings = await _signalRClient.GetShippings();
|
||||
|
||||
Assert.IsNotNull(shippings);
|
||||
Assert.IsTrue(shippings.Count != 0);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetNotMeasuredShippingsTest()
|
||||
{
|
||||
var shippings = await _signalRClient.GetNotMeasuredShippings();
|
||||
|
||||
Assert.IsNotNull(shippings);
|
||||
Assert.IsTrue(shippings.All(s => !s.IsAllMeasured));
|
||||
}
|
||||
|
||||
//[TestMethod]
|
||||
//[DataRow(1)]
|
||||
public async Task<Shipping> GetShippingByIdTest(int shippingId)
|
||||
{
|
||||
var shipping = await _signalRClient.GetShippingById(shippingId);
|
||||
|
||||
Assert.IsNotNull(shipping);
|
||||
Assert.IsNotNull(shipping.ShippingDocuments);
|
||||
|
||||
Assert.IsTrue(shipping.Id == shippingId);
|
||||
Assert.IsTrue(shipping.ShippingDocuments.All(s => s.ShippingId == shippingId));
|
||||
Assert.IsTrue(shipping.ShippingDocuments.All(sd => sd.ShippingItems != null && sd.ShippingItems.Any(si => si.ShippingDocumentId == sd.Id)));
|
||||
|
||||
return shipping;
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow(1)]
|
||||
public async Task UpdateShippingTest(int shippingId)
|
||||
{
|
||||
var shipping = await GetShippingByIdTest(shippingId);
|
||||
var newLicencePlate = GetFixtureName(shipping.LicencePlate);
|
||||
|
||||
shipping.LicencePlate = newLicencePlate;
|
||||
await _signalRClient.UpdateShipping(shipping);
|
||||
|
||||
shipping = await GetShippingByIdTest(shippingId);
|
||||
Assert.IsTrue(shipping.LicencePlate == newLicencePlate);
|
||||
|
||||
shipping.LicencePlate = GetOriginalName(shipping.LicencePlate);
|
||||
await _signalRClient.UpdateShipping(shipping);
|
||||
}
|
||||
|
||||
#endregion Shipping
|
||||
|
||||
#region ShippingItem
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetShippingItemsTest()
|
||||
{
|
||||
var shippingItems = await _signalRClient.GetShippingItems();
|
||||
|
||||
Assert.IsNotNull(shippingItems);
|
||||
Assert.IsTrue(shippingItems.Count != 0);
|
||||
}
|
||||
|
||||
//[TestMethod]
|
||||
//[DataRow(1)]
|
||||
public async Task<ShippingItem> GetShippingItemByIdTest(int shippingItemeId)
|
||||
{
|
||||
var shippingItem = await _signalRClient.GetShippingItemById(shippingItemeId);
|
||||
|
||||
Assert.IsNotNull(shippingItem);
|
||||
Assert.IsTrue(shippingItem.Id == shippingItemeId);
|
||||
|
||||
return shippingItem;
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow(1)]
|
||||
public async Task UpdateShippingItemTest(int shippingItemId)
|
||||
{
|
||||
var shippingItem = await GetShippingItemByIdTest(shippingItemId);
|
||||
var newName = GetFixtureName(shippingItem.Name);
|
||||
|
||||
shippingItem.Name = newName;
|
||||
await _signalRClient.UpdateShippingItem(shippingItem);
|
||||
|
||||
shippingItem = await GetShippingItemByIdTest(shippingItemId);
|
||||
Assert.IsTrue(shippingItem.Name == newName);
|
||||
|
||||
shippingItem.Name = GetOriginalName(shippingItem.Name);
|
||||
await _signalRClient.UpdateShippingItem(shippingItem);
|
||||
}
|
||||
|
||||
#endregion ShippingItem
|
||||
|
||||
#region ShippingDocument
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetShippingDocumentsTest()
|
||||
{
|
||||
var shippingDocuments = await _signalRClient.GetShippingDocuments();
|
||||
|
||||
Assert.IsNotNull(shippingDocuments);
|
||||
Assert.IsTrue(shippingDocuments.Count != 0);
|
||||
}
|
||||
|
||||
//[TestMethod]
|
||||
//[DataRow(2)]
|
||||
public async Task<ShippingDocument> GetShippingDocumentByIdTest(int shippingDocumentId)
|
||||
{
|
||||
var shippingDocument = await _signalRClient.GetShippingDocumentById(shippingDocumentId);
|
||||
|
||||
Assert.IsNotNull(shippingDocument);
|
||||
Assert.IsTrue(shippingDocument.Id == shippingDocumentId);
|
||||
|
||||
return shippingDocument;
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow(2)]
|
||||
public async Task UpdateShippingDocumentTest(int shippingDocumentId)
|
||||
{
|
||||
var shippingDocument = await GetShippingDocumentByIdTest(shippingDocumentId);
|
||||
var newCountry = GetFixtureName(shippingDocument.Country);
|
||||
|
||||
shippingDocument.Country = newCountry;
|
||||
await _signalRClient.UpdateShippingDocument(shippingDocument);
|
||||
|
||||
shippingDocument = await GetShippingDocumentByIdTest(shippingDocumentId);
|
||||
Assert.IsTrue(shippingDocument.Country == newCountry);
|
||||
|
||||
shippingDocument.Country = GetOriginalName(shippingDocument.Country);
|
||||
await _signalRClient.UpdateShippingDocument(shippingDocument);
|
||||
}
|
||||
|
||||
#endregion ShippingDocument
|
||||
|
||||
#region Customer
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetMeasuringUsersTest()
|
||||
{
|
||||
var users = await _signalRClient.GetMeasuringUsers();
|
||||
|
||||
Assert.IsNotNull(users);
|
||||
Assert.IsTrue(users.Count != 0);
|
||||
Assert.IsTrue(users.All(x => !x.Email.IsNullOrEmpty() && !x.Deleted));
|
||||
}
|
||||
|
||||
#endregion Customer
|
||||
|
||||
#region Product
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetProductDtosTest()
|
||||
{
|
||||
var productDto = await _signalRClient.GetProductDtos();
|
||||
|
||||
Assert.IsNotNull(productDto);
|
||||
Assert.IsTrue(productDto.Count != 0);
|
||||
Assert.IsTrue(productDto.All(x => !x.Name.IsNullOrEmpty() && !x.Deleted));
|
||||
}
|
||||
|
||||
#endregion Product
|
||||
|
||||
[TestMethod]
|
||||
[DataRow("aasd@dsserver.com", "Asdasd123456")]
|
||||
public async Task LoginMeasuringUserTest_TrueIfHasCustomerDto(string email, string password)
|
||||
{
|
||||
var loginModelResponse = await _signalRClient.LoginMeasuringUser(email, password);
|
||||
|
||||
Assert.IsNotNull(loginModelResponse);
|
||||
Assert.IsNotNull(loginModelResponse.CustomerDto, loginModelResponse.ErrorMessage);
|
||||
|
||||
Assert.IsTrue(loginModelResponse.CustomerDto.Email == email, loginModelResponse.ErrorMessage);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DataRow("adam.g@aycode.com", "123")]
|
||||
public async Task LoginMeasuringUserTest_TrueIfHasNotCustomerDto(string email, string password)
|
||||
{
|
||||
var loginModelResponse = await _signalRClient.LoginMeasuringUser(email, password);
|
||||
|
||||
Assert.IsNotNull(loginModelResponse);
|
||||
Assert.IsNull(loginModelResponse.CustomerDto);
|
||||
|
||||
Assert.IsFalse(loginModelResponse.ErrorMessage.IsNullOrWhiteSpace());
|
||||
Console.WriteLine($"Succes: {loginModelResponse.ErrorMessage}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
<Project Sdk="MSTest.Sdk/3.6.4">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<!--
|
||||
Displays error on console in addition to the log file. Note that this feature comes with a performance impact.
|
||||
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
|
||||
-->
|
||||
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared.Common\FruitBankHybrid.Shared.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Data">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Nop.Services">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Services.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1 +0,0 @@
|
|||
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.Resources.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
@inherits LayoutComponentBase
|
||||
|
||||
<div class="page">
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<div class="top-row px-4">
|
||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
||||
</div>
|
||||
|
||||
<article class="content px-4">
|
||||
@Body
|
||||
</article>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui" data-nosnippet>
|
||||
An unhandled error has occurred.
|
||||
<a href="." class="reload">Reload</a>
|
||||
<span class="dismiss">🗙</span>
|
||||
</div>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
.page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
background-color: #f7f7f7;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
justify-content: flex-end;
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
white-space: nowrap;
|
||||
margin-left: 1.5rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.top-row ::deep a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px) {
|
||||
.top-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top-row ::deep a, .top-row ::deep .btn-link {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.page {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.top-row.auth ::deep a:first-child {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.top-row, article {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">FruitBank</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
|
||||
|
||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||
<nav class="flex-column">
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="weather">
|
||||
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="chat">
|
||||
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Chat
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
.navbar-toggler {
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
width: 3.5rem;
|
||||
height: 2.5rem;
|
||||
color: white;
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
right: 1rem;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.navbar-toggler:checked {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.top-row {
|
||||
height: 3.5rem;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.bi {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-right: 0.75rem;
|
||||
top: -1px;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.bi-house-door-fill-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.bi-plus-square-fill-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.bi-list-nested-nav-menu {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-item:last-of-type {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.nav-item ::deep .nav-link {
|
||||
color: #d7d7d7;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 3rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-item ::deep a.active {
|
||||
background-color: rgba(255,255,255,0.37);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item ::deep .nav-link:hover {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navbar-toggler:checked ~ .nav-scrollable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 641px) {
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-scrollable {
|
||||
/* Never collapse the sidebar for wide screens */
|
||||
display: block;
|
||||
|
||||
/* Allow sidebar to scroll for tall menus */
|
||||
height: calc(100vh - 3.5rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
@page "/chat"
|
||||
@using DevExpress.Blazor
|
||||
@using DevExpress.Blazor.Internal
|
||||
@using FruitBankHybrid.Shared.Services
|
||||
@* @inject ISignalRService SignalR *@
|
||||
|
||||
<h3>Measuring</h3>
|
||||
|
||||
@* <DxDropDownButton></DxDropDownButton> *@
|
||||
@* <div>
|
||||
<DxDropDownButton RenderStyle="ButtonRenderStyle.Secondary"
|
||||
Text="Select Employee"
|
||||
CssClass="me-1"
|
||||
IconCssClass="menu-icon-user-profile menu-icon"
|
||||
DropDownVisible="DropDownVisible">
|
||||
<DropDownContentTemplate>
|
||||
<div>
|
||||
<DxListBox Data="@Users"
|
||||
@bind-Value="@SelectedUser"
|
||||
CssClass="listbox">
|
||||
<ItemDisplayTemplate>
|
||||
<div class="listbox-item-template">
|
||||
<span class="listbox-item-template-name">@context.DataItem.Username</span>
|
||||
</div>
|
||||
</ItemDisplayTemplate>
|
||||
</DxListBox>
|
||||
</div>
|
||||
</DropDownContentTemplate>
|
||||
</DxDropDownButton>
|
||||
<p class="demo-text cw-400 mt-2">
|
||||
Selected item: <b>@SelectedUser?.Username</b>
|
||||
</p>
|
||||
</div>
|
||||
*@
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
@foreach (var user in Users)
|
||||
{
|
||||
<li>@user.Username - @user.Email</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input @bind="_userName" placeholder="Your name" />
|
||||
<input @bind="_message" placeholder="Partner ID..." />
|
||||
<button @onclick="GetPartner">Get partner</button>
|
||||
|
||||
<ul>
|
||||
@foreach (var m in _messages)
|
||||
{
|
||||
<li><b>@m.User:</b> @m.Text</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
using AyCode.Core.Helpers;
|
||||
using AyCode.Core.Loggers;
|
||||
using AyCode.Models.Users;
|
||||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Loggers;
|
||||
using FruitBank.Common.Models;
|
||||
using FruitBankHybrid.Shared.Services.Loggers;
|
||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.JSInterop;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Mango.Nop.Core.Dtos;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
using ILogger = FruitBank.Common.Loggers.ILogger;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Pages
|
||||
{
|
||||
public partial class Chat : ComponentBase
|
||||
{
|
||||
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
||||
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
||||
|
||||
private ILogger _logger;
|
||||
|
||||
private string _userName = "Partner name";
|
||||
private string _message;
|
||||
private readonly List<(string User, string Text)> _messages = [];
|
||||
|
||||
private List<CustomerDto> Users { get; set; } = [];
|
||||
private bool DropDownVisible { get; set; }
|
||||
private CustomerDto? SelectedUser { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_logger = new LoggerClient<Chat>(LogWriters.ToArray());
|
||||
_logger.Info("OnInitializedAsync");
|
||||
|
||||
Users.AddRange(await FruitBankSignalRClient.GetMeasuringUsers() ?? []);
|
||||
|
||||
//SelectedUser = Users.FirstOrDefault();
|
||||
//DropDownVisible = false;
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
private async Task GetPartner()
|
||||
{
|
||||
var measuringModel = new MeasuringModel();
|
||||
|
||||
if (int.TryParse(_message, out var partnerId))
|
||||
{
|
||||
_message = string.Empty;
|
||||
|
||||
measuringModel.Name = (await FruitBankSignalRClient.GetPartnerById(partnerId))?.Name!;
|
||||
//measuringModel.Name = (await FruitBankSignalRClient.GetMeasuringModelByShippingId(partnerId))?.Name!;
|
||||
}
|
||||
|
||||
_messages.Add((_userName, measuringModel?.Name ?? "ERROR"));
|
||||
//StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@page "/"
|
||||
@using FruitBankHybrid.Shared.Services
|
||||
@inject IFormFactor FormFactor
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app running on <em>@factor</em> using <em>@platform</em>.
|
||||
|
||||
@code {
|
||||
private string factor => FormFactor.GetFormFactor();
|
||||
private string platform => FormFactor.GetPlatform();
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
@page "/weather"
|
||||
|
||||
<PageTitle>Weather</PageTitle>
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate a loading indicator
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@using Microsoft.AspNetCore.Components.Routing
|
||||
<Router AppAssembly="typeof(Layout.MainLayout).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||
</Found>
|
||||
</Router>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace FruitBankHybrid.Shared.Services
|
||||
{
|
||||
public interface IFormFactor
|
||||
{
|
||||
public string GetFormFactor();
|
||||
public string GetPlatform();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Services
|
||||
{
|
||||
public interface ISignalRService
|
||||
{
|
||||
event Action<string, string>? MessageReceived;
|
||||
Task InitializeAsync();
|
||||
Task SendMessageAsync(string user, string message);
|
||||
ValueTask DisposeAsync();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
using FruitBank.Common;
|
||||
using FruitBank.Common.Loggers;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Services.Loggers;
|
||||
|
||||
public class LoggerClient : Logger, ILogger
|
||||
{
|
||||
public LoggerClient() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
public LoggerClient(string? categoryName) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, categoryName)
|
||||
{ }
|
||||
|
||||
public LoggerClient(string? categoryName, params IAcLogWriterBase[] logWriters) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, categoryName, logWriters)
|
||||
{ }
|
||||
|
||||
public LoggerClient(AppType appType, LogLevel logLevel, string? categoryName, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, categoryName, logWriters)
|
||||
{ }
|
||||
}
|
||||
|
||||
public class LoggerClient<TCategory> : LoggerClient, ILogger<TCategory>
|
||||
{
|
||||
public LoggerClient() : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, typeof(TCategory).Name)
|
||||
{ }
|
||||
|
||||
public LoggerClient(params IAcLogWriterClientBase[] logWriters) : base(AppType.Web, FruitBankConstClient.DefaultLogLevelClient, typeof(TCategory).Name, logWriters)
|
||||
{ }
|
||||
|
||||
public LoggerClient(AppType appType, LogLevel logLevel, params IAcLogWriterClientBase[] logWriters) : base(appType, logLevel, typeof(TCategory).Name, logWriters)
|
||||
{ }
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
using FruitBank.Common;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Services
|
||||
{
|
||||
|
||||
public class SignalRService : IAsyncDisposable, ISignalRService
|
||||
{
|
||||
private HubConnection _hubConnection;
|
||||
private readonly NavigationManager _navigationManager;
|
||||
|
||||
public event Action<string, string>? MessageReceived;
|
||||
|
||||
public SignalRService(NavigationManager navigationManager)
|
||||
{
|
||||
_navigationManager = navigationManager;
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
// Build the connection (assuming same domain as Blazor app, otherwise use full URL)
|
||||
_hubConnection = new HubConnectionBuilder()
|
||||
//.WithUrl(_navigationManager.ToAbsoluteUri($"https://localhost:59579/{FruitBankConstClient.DefaultHubName}"))
|
||||
.WithUrl(_navigationManager.ToAbsoluteUri($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}"))
|
||||
.WithAutomaticReconnect()
|
||||
.Build();
|
||||
|
||||
// Register incoming handler
|
||||
_hubConnection.On<string, string>("ReceiveMessage", (user, message) =>
|
||||
{
|
||||
MessageReceived?.Invoke(user, message);
|
||||
});
|
||||
|
||||
await _hubConnection.StartAsync();
|
||||
}
|
||||
|
||||
public async Task SendMessageAsync(string user, string message)
|
||||
{
|
||||
if (_hubConnection.State == HubConnectionState.Connected)
|
||||
await _hubConnection.InvokeAsync("SendMessage", user, message);
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_hubConnection is not null)
|
||||
{
|
||||
await _hubConnection.DisposeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
using AyCode.Core.Helpers;
|
||||
using AyCode.Core.Loggers;
|
||||
using AyCode.Services.Server.SignalRs;
|
||||
using AyCode.Services.SignalRs;
|
||||
using FruitBank.Common;
|
||||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using FruitBank.Common.Models;
|
||||
using FruitBank.Common.SignalRs;
|
||||
using FruitBankHybrid.Shared.Services.Loggers;
|
||||
using Mango.Nop.Core.Dtos;
|
||||
using Mango.Nop.Core.Models;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Services.SignalRs
|
||||
{
|
||||
public class FruitBankSignalRClient : AcSignalRClientBase, IFruitBankDataControllerClient
|
||||
{
|
||||
public FruitBankSignalRClient( /*IServiceProvider serviceProvider, */ IEnumerable<IAcLogWriterClientBase> logWriters) : base($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}", new LoggerClient(nameof(FruitBankSignalRClient), logWriters.ToArray()))
|
||||
{
|
||||
ConstHelper.NameByValue<SignalRTags>(0);
|
||||
}
|
||||
|
||||
public Task<MeasuringModel?> GetMeasuringModelByShippingId(int shippingId)
|
||||
=> GetByIdAsync<MeasuringModel>(SignalRTags.GetMeasuringModelByShippingId, shippingId);
|
||||
|
||||
//public Task GetWelcomeMessageAsync(string message, Action? callback = null)
|
||||
//{
|
||||
// Logger.Detail($"GetWelcomeMessageAsync client called; message: {message}");
|
||||
|
||||
// return GetAllAsync<string>(SignalRTags.GetAllTransferDestinations, callback);
|
||||
//}
|
||||
|
||||
public Task<List<MeasuringModel>?> GetMeasuringModels()
|
||||
=> GetAllAsync<List<MeasuringModel>>(SignalRTags.GetMeasuringModels);
|
||||
|
||||
public Task<List<Partner>?> GetPartners()
|
||||
=> GetAllAsync<List<Partner>>(SignalRTags.GetPartners);
|
||||
|
||||
#region Partner
|
||||
|
||||
public Task<Partner?> GetPartnerById(int id)
|
||||
=> GetByIdAsync<Partner?>(SignalRTags.GetPartnerById, id);
|
||||
|
||||
public Task<Partner?> UpdatePartner(Partner partner)
|
||||
=> PostDataAsync(SignalRTags.UpdatePartner, partner);
|
||||
|
||||
#endregion Partner
|
||||
|
||||
#region Shipping
|
||||
|
||||
public Task<List<Shipping>?> GetShippings()
|
||||
=> GetAllAsync<List<Shipping>>(SignalRTags.GetShippings);
|
||||
|
||||
public Task<List<Shipping>?> GetNotMeasuredShippings()
|
||||
=> GetAllAsync<List<Shipping>>(SignalRTags.GetNotMeasuredShippings);
|
||||
|
||||
public Task<Shipping?> GetShippingById(int id)
|
||||
=> GetByIdAsync<Shipping?>(SignalRTags.GetShippingById, id);
|
||||
|
||||
public Task<Shipping?> UpdateShipping(Shipping shipping)
|
||||
=> PostDataAsync(SignalRTags.UpdateShipping, shipping);
|
||||
|
||||
#endregion Shipping
|
||||
|
||||
#region ShippingItem
|
||||
|
||||
public Task<List<ShippingItem>?> GetShippingItems()
|
||||
=> GetAllAsync<List<ShippingItem>>(SignalRTags.GetShippingItems);
|
||||
|
||||
public Task<ShippingItem?> GetShippingItemById(int id)
|
||||
=> GetByIdAsync<ShippingItem?>(SignalRTags.GetShippingItemById, id);
|
||||
|
||||
public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem)
|
||||
=> PostDataAsync(SignalRTags.UpdateShippingItem, shippingItem);
|
||||
#endregion ShippingItem
|
||||
|
||||
#region ShippingDocument
|
||||
|
||||
public Task<List<ShippingDocument>?> GetShippingDocuments()
|
||||
=> GetAllAsync<List<ShippingDocument>>(SignalRTags.GetShippingDocuments);
|
||||
|
||||
public Task<ShippingDocument?> GetShippingDocumentById(int id)
|
||||
=> GetByIdAsync<ShippingDocument?>(SignalRTags.GetShippingDocumentById, id);
|
||||
|
||||
public Task<ShippingDocument?> UpdateShippingDocument(ShippingDocument shippingDocument)
|
||||
=> PostDataAsync(SignalRTags.UpdateShippingDocument, shippingDocument);
|
||||
#endregion ShippingDocument
|
||||
|
||||
#region Customer
|
||||
|
||||
public Task<List<CustomerDto>?> GetMeasuringUsers()
|
||||
=> GetAllAsync<List<CustomerDto>>(SignalRTags.GetMeasuringUsers);
|
||||
|
||||
#endregion Customer
|
||||
|
||||
#region Product
|
||||
|
||||
public Task<List<ProductDto>?> GetProductDtos()
|
||||
=> GetAllAsync<List<ProductDto>>(SignalRTags.GetProductDtos);
|
||||
#endregion Product
|
||||
|
||||
#region Authenticate
|
||||
public Task<MgLoginModelResponse?> LoginMeasuringUser(string customerEmail, string customerPassword)
|
||||
=> LoginMeasuringUser(new MgLoginModelRequest(customerEmail, customerPassword));
|
||||
|
||||
public Task<MgLoginModelResponse?> LoginMeasuringUser(MgLoginModelRequest loginModelRequest)
|
||||
=> PostDataAsync<MgLoginModelRequest, MgLoginModelResponse>(SignalRTags.AuthenticateUser, loginModelRequest);
|
||||
#endregion Authenticate
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using DevExpress.Blazor
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,58 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
|
||||
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.Resources.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using AyCode.Core.Loggers;
|
||||
using FruitBank.Common.Loggers;
|
||||
using FruitBankHybrid.Shared.Services;
|
||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||
using FruitBankHybrid.Web.Client.Services;
|
||||
using FruitBankHybrid.Web.Client.Services.Loggers;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
builder.Services.AddDevExpressBlazor();
|
||||
|
||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
||||
|
||||
builder.Services.AddScoped<FruitBankSignalRClient>();
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
||||
#endif
|
||||
|
||||
builder.Services.AddSingleton<IAcLogWriterClientBase, SignaRClientLogItemWriter>();
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using FruitBankHybrid.Shared.Services;
|
||||
|
||||
namespace FruitBankHybrid.Web.Client.Services;
|
||||
|
||||
public class FormFactor : IFormFactor
|
||||
{
|
||||
public string GetFormFactor()
|
||||
{
|
||||
return "WebAssembly";
|
||||
}
|
||||
|
||||
public string GetPlatform()
|
||||
{
|
||||
return Environment.OSVersion.ToString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using AyCode.Core.Enums;
|
||||
using AyCode.Core.Loggers;
|
||||
using AyCode.Services.Loggers;
|
||||
using FruitBank.Common;
|
||||
using Microsoft.JSInterop;
|
||||
using LogLevel = AyCode.Core.Loggers.LogLevel;
|
||||
|
||||
namespace FruitBankHybrid.Web.Client.Services.Loggers;
|
||||
|
||||
public class BrowserConsoleLogWriter(IJSRuntime jsRuntime) : AcBrowserConsoleLogWriter(jsRuntime, AppType.Web, FruitBankConstClient.DefaultLogLevelClient)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using FruitBankHybrid.Shared
|
||||
@using FruitBankHybrid.Web.Client
|
||||
@using DevExpress.Blazor
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
@using DevExpress.Blazor
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<base href="/" />
|
||||
<link rel="stylesheet" href="_content/FruitBankHybrid.Shared/bootstrap/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="_content/FruitBankHybrid.Shared/app.css" />
|
||||
<link rel="stylesheet" href="FruitBankHybrid.Web.styles.css" />
|
||||
<link rel="icon" type="image/png" href="_content/FruitBankHybrid.Shared/favicon.png" />
|
||||
|
||||
@DxResourceManager.RegisterTheme(Themes.Fluent)
|
||||
@DxResourceManager.RegisterScripts()
|
||||
|
||||
<link href=@AppendVersion("css/site.css") rel="stylesheet" />
|
||||
<link href=@AppendVersion("FruitBankHybrid.Shared.styles.css") rel="stylesheet" />
|
||||
|
||||
<HeadOutlet @rendermode="InteractiveWebAssembly" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<Routes @rendermode="InteractiveWebAssembly" />
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@code {
|
||||
private string AppendVersion(string path) => $"{path}?v={typeof(DevExpress.Blazor.ResourcesConfigurator).Assembly.GetName().Version}";
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
@page "/Error"
|
||||
@using System.Diagnostics
|
||||
|
||||
<PageTitle>Error</PageTitle>
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
||||
@code{
|
||||
[CascadingParameter]
|
||||
private HttpContext? HttpContext { get; set; }
|
||||
|
||||
private string? RequestId { get; set; }
|
||||
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
protected override void OnInitialized() =>
|
||||
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using FruitBankHybrid.Shared
|
||||
@using FruitBankHybrid.Web
|
||||
@using FruitBankHybrid.Web.Client
|
||||
@using FruitBankHybrid.Web.Components
|
||||
@using DevExpress.Blazor
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common.Server\FruitBank.Common.Server.csproj" />
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared.Common\FruitBankHybrid.Shared.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Web.Client\FruitBankHybrid.Web.Client.csproj" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Core.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.Resources.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v25.1">
|
||||
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Services\SignalRs\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ActiveDebugProfile>https</ActiveDebugProfile>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
using AyCode.Core.Loggers;
|
||||
using FruitBank.Common;
|
||||
using FruitBank.Common.Server.Services.Loggers;
|
||||
using FruitBank.Common.Server.Services.SignalRs;
|
||||
using FruitBankHybrid.Shared.Services;
|
||||
using FruitBankHybrid.Web.Components;
|
||||
using FruitBankHybrid.Web.Services;
|
||||
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
|
||||
builder.Services.AddDevExpressBlazor();
|
||||
|
||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||
|
||||
builder.Services.AddSingleton<LoggerToLoggerApiController>();
|
||||
builder.Services.AddSingleton<IAcLogWriterBase, ConsoleLogWriter>();
|
||||
//builder.Services.AddSingleton<SessionService>();
|
||||
|
||||
//builder.Services.AddScoped<IFruitBankDataControllerServer, FruitBankDataController>();
|
||||
builder.Services.AddSignalR(options => options.MaximumReceiveMessageSize = 256 * 1024);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseWebAssemblyDebugging();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.MapHub<LoggerSignalRHub>($"/{FruitBankConstClient.LoggerHubName}");
|
||||
app.MapHub<DevAdminSignalRHub>($"/{FruitBankConstClient.DefaultHubName}");
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.UseAntiforgery();
|
||||
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveWebAssemblyRenderMode()
|
||||
.AddAdditionalAssemblies(
|
||||
typeof(FruitBankHybrid.Shared._Imports).Assembly,
|
||||
typeof(FruitBankHybrid.Web.Client._Imports).Assembly);
|
||||
|
||||
app.Run();
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:38341",
|
||||
"sslPort": 44381
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5291",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:7144;http://localhost:5291",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using FruitBankHybrid.Shared.Services;
|
||||
|
||||
namespace FruitBankHybrid.Web.Services;
|
||||
|
||||
public class FormFactor : IFormFactor
|
||||
{
|
||||
public string GetFormFactor()
|
||||
{
|
||||
return "Web";
|
||||
}
|
||||
|
||||
public string GetPlatform()
|
||||
{
|
||||
return Environment.OSVersion.ToString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"AyCode": {
|
||||
"ProjectId": "aad53443-2ee2-4650-8a99-97e907265e4e",
|
||||
"Urls": {
|
||||
"BaseUrl": "https://localhost:7144",
|
||||
"ApiBaseUrl": "https://localhost:7144"
|
||||
},
|
||||
"Logger": {
|
||||
"AppType": "Server",
|
||||
"LogLevel": "Detail",
|
||||
"LogWriters": [
|
||||
{
|
||||
"LogLevel": "Detail",
|
||||
"LogWriterType": "FruitBank.Common.Server.Services.Loggers.ConsoleLogWriter, FruitBank.Common.Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.13.35825.156
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid", "FruitBankHybrid\FruitBankHybrid.csproj", "{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid.Shared", "FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj", "{A44D38E7-7A95-46A7-A5EE-8927892D1275}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid.Web", "FruitBankHybrid.Web\FruitBankHybrid.Web.csproj", "{B3E52FA7-643A-4DE2-B9A4-561402A80235}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid.Web.Client", "FruitBankHybrid.Web.Client\FruitBankHybrid.Web.Client.csproj", "{FD5B9DB9-A9CC-4A8F-ADC5-81EF43DDDD1F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid.Shared.Common", "FruitBankHybrid.Shared.Common\FruitBankHybrid.Shared.Common.csproj", "{6D98A5F8-2A26-4559-B301-5E1E4C728689}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBank.Common", "FruitBank.Common\FruitBank.Common.csproj", "{610EB36E-6823-4334-95E4-435A5E0A94C8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBank.Common.Server", "FruitBank.Common.Server\FruitBank.Common.Server.csproj", "{AD3AB968-A79F-485C-8B3E-B6917A5E4C71}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid.Shared.Tests", "FruitBankHybrid.Shared.Tests\FruitBankHybrid.Shared.Tests.csproj", "{BE107917-831F-45E6-87F3-96D1DF418309}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9CF098A9-CAED-4645-ABCE-AF46B1EA4607}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A44D38E7-7A95-46A7-A5EE-8927892D1275}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A44D38E7-7A95-46A7-A5EE-8927892D1275}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A44D38E7-7A95-46A7-A5EE-8927892D1275}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A44D38E7-7A95-46A7-A5EE-8927892D1275}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B3E52FA7-643A-4DE2-B9A4-561402A80235}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B3E52FA7-643A-4DE2-B9A4-561402A80235}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B3E52FA7-643A-4DE2-B9A4-561402A80235}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B3E52FA7-643A-4DE2-B9A4-561402A80235}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FD5B9DB9-A9CC-4A8F-ADC5-81EF43DDDD1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD5B9DB9-A9CC-4A8F-ADC5-81EF43DDDD1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD5B9DB9-A9CC-4A8F-ADC5-81EF43DDDD1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FD5B9DB9-A9CC-4A8F-ADC5-81EF43DDDD1F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6D98A5F8-2A26-4559-B301-5E1E4C728689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D98A5F8-2A26-4559-B301-5E1E4C728689}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D98A5F8-2A26-4559-B301-5E1E4C728689}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D98A5F8-2A26-4559-B301-5E1E4C728689}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{610EB36E-6823-4334-95E4-435A5E0A94C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{610EB36E-6823-4334-95E4-435A5E0A94C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{610EB36E-6823-4334-95E4-435A5E0A94C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{610EB36E-6823-4334-95E4-435A5E0A94C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AD3AB968-A79F-485C-8B3E-B6917A5E4C71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AD3AB968-A79F-485C-8B3E-B6917A5E4C71}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AD3AB968-A79F-485C-8B3E-B6917A5E4C71}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AD3AB968-A79F-485C-8B3E-B6917A5E4C71}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BE107917-831F-45E6-87F3-96D1DF418309}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BE107917-831F-45E6-87F3-96D1DF418309}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BE107917-831F-45E6-87F3-96D1DF418309}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BE107917-831F-45E6-87F3-96D1DF418309}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8A66BC05-F8CF-40E6-8079-FC6E593B0814}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:FruitBankHybrid"
|
||||
x:Class="FruitBankHybrid.App">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
<Color x:Key="PageBackgroundColor">#512bdf</Color>
|
||||
<Color x:Key="PrimaryTextColor">White</Color>
|
||||
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="BackgroundColor" Value="#2b0b98" />
|
||||
<Setter Property="Padding" Value="14,10" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
namespace FruitBankHybrid
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override Window CreateWindow(IActivationState? activationState)
|
||||
{
|
||||
return new Window(new MainPage()) { Title = "FruitBankHybrid" };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
@using FruitBankHybrid
|
||||
@using FruitBankHybrid.Components
|
||||
@using FruitBankHybrid.Shared
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
|
||||
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
|
||||
|
||||
<!-- Note for MacCatalyst:
|
||||
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
|
||||
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
|
||||
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
|
||||
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
|
||||
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
|
||||
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>FruitBankHybrid</RootNamespace>
|
||||
<UseMaui>true</UseMaui>
|
||||
<SingleProject>true</SingleProject>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<EnableDefaultCssItems>false</EnableDefaultCssItems>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<!-- Display name -->
|
||||
<ApplicationTitle>FruitBankHybrid</ApplicationTitle>
|
||||
|
||||
<!-- App Identifier -->
|
||||
<ApplicationId>com.companyname.fruitbankhybrid</ApplicationId>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
|
||||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
||||
<WindowsPackageType>None</WindowsPackageType>
|
||||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
|
||||
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- App Icon -->
|
||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
||||
|
||||
<!-- Splash Screen -->
|
||||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
|
||||
|
||||
<!-- Images -->
|
||||
<MauiImage Include="Resources\Images\*" />
|
||||
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<MauiFont Include="Resources\Fonts\*" />
|
||||
|
||||
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
|
||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.100" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.100" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
|
||||
<ActiveDebugFramework>net9.0-windows10.0.19041.0</ActiveDebugFramework>
|
||||
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
|
||||
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
|
||||
<DefaultDevice>pixel_7_-_api_35</DefaultDevice>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android|AnyCPU'">
|
||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetPlatformIdentifier)'=='iOS'">
|
||||
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Update="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Update="MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Update="Platforms\Windows\App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Update="Platforms\Windows\Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:FruitBankHybrid"
|
||||
xmlns:shared="clr-namespace:FruitBankHybrid.Shared;assembly=FruitBankHybrid.Shared"
|
||||
x:Class="FruitBankHybrid.MainPage"
|
||||
BackgroundColor="{DynamicResource PageBackgroundColor}">
|
||||
|
||||
<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
|
||||
<BlazorWebView.RootComponents>
|
||||
<RootComponent Selector="#app" ComponentType="{x:Type shared:Routes}" />
|
||||
</BlazorWebView.RootComponents>
|
||||
</BlazorWebView>
|
||||
|
||||
</ContentPage>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
namespace FruitBankHybrid
|
||||
{
|
||||
public partial class MainPage : ContentPage
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using FruitBankHybrid.Shared.Services;
|
||||
using FruitBankHybrid.Services;
|
||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||
using FruitBank.Common.Loggers;
|
||||
using AyCode.Core.Loggers;
|
||||
using FruitBankHybrid.Services.Loggers;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
public static class MauiProgram
|
||||
{
|
||||
public static MauiApp CreateMauiApp()
|
||||
{
|
||||
var builder = MauiApp.CreateBuilder();
|
||||
builder
|
||||
.UseMauiApp<App>()
|
||||
.ConfigureFonts(fonts =>
|
||||
{
|
||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||
});
|
||||
|
||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
||||
builder.Services.AddScoped<FruitBankSignalRClient>();
|
||||
#if DEBUG
|
||||
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
||||
#endif
|
||||
|
||||
builder.Services.AddSingleton<IAcLogWriterClientBase, SignaRClientLogItemWriter>();
|
||||
|
||||
//builder.Services.AddSingleton<SessionService>();
|
||||
|
||||
builder.Services.AddMauiBlazorWebView();
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||
builder.Logging.AddDebug();
|
||||
#endif
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
</manifest>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
||||
public class MainActivity : MauiAppCompatActivity
|
||||
{
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Android.App;
|
||||
using Android.Runtime;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
[Application]
|
||||
public class MainApplication : MauiApplication
|
||||
{
|
||||
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
|
||||
: base(handle, ownership)
|
||||
{
|
||||
}
|
||||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#512BD4</color>
|
||||
<color name="colorPrimaryDark">#2B0B98</color>
|
||||
<color name="colorAccent">#2B0B98</color>
|
||||
</resources>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Foundation;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : MauiUIApplicationDelegate
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
|
||||
<dict>
|
||||
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- The Mac App Store requires you specify if the app uses encryption. -->
|
||||
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
|
||||
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
|
||||
<!-- Please indicate <true/> or <false/> here. -->
|
||||
|
||||
<!-- Specify the category for your app here. -->
|
||||
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
|
||||
<!-- <key>LSApplicationCategoryType</key> -->
|
||||
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
public class Program
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Hosting;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
class Program : MauiApplication
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
|
||||
<profile name="common" />
|
||||
<ui-application appid="maui-application-id-placeholder" exec="FruitBankHybrid.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
|
||||
<label>maui-application-title-placeholder</label>
|
||||
<icon>maui-appicon-placeholder</icon>
|
||||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
|
||||
</ui-application>
|
||||
<shortcut-list />
|
||||
<privileges>
|
||||
<privilege>http://tizen.org/privilege/internet</privilege>
|
||||
</privileges>
|
||||
<dependencies />
|
||||
<provides-appdefined-privileges />
|
||||
</manifest>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<maui:MauiWinUIApplication
|
||||
x:Class="FruitBankHybrid.WinUI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:maui="using:Microsoft.Maui"
|
||||
xmlns:local="using:FruitBankHybrid.WinUI">
|
||||
|
||||
</maui:MauiWinUIApplication>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
using Microsoft.UI.Xaml;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace FruitBankHybrid.WinUI;
|
||||
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
public partial class App : MauiWinUIApplication
|
||||
{
|
||||
/// <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().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
IgnorableNamespaces="uap rescap">
|
||||
|
||||
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="E9B56D96-D519-4E1B-AE48-77DC7AE73AED" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>$placeholder$</DisplayName>
|
||||
<PublisherDisplayName>User Name</PublisherDisplayName>
|
||||
<Logo>$placeholder$.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
|
||||
<uap:VisualElements
|
||||
DisplayName="$placeholder$"
|
||||
Description="$placeholder$"
|
||||
Square150x150Logo="$placeholder$.png"
|
||||
Square44x44Logo="$placeholder$.png"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
|
||||
<uap:SplashScreen Image="$placeholder$.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
</Capabilities>
|
||||
|
||||
</Package>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="FruitBankHybrid.WinUI.app"/>
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<!-- The combination of below two tags have the following effect:
|
||||
1) Per-Monitor for >= Windows 10 Anniversary Update
|
||||
2) System < Windows 10 Anniversary Update
|
||||
-->
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using Foundation;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : MauiUIApplicationDelegate
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace FruitBankHybrid;
|
||||
|
||||
public class Program
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"Windows Machine": {
|
||||
"commandName": "Project",
|
||||
"nativeDebugging": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="456" height="456" fill="#512BD4" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 228 B |
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="m 105.50037,281.60863 c -2.70293,0 -5.00091,-0.90042 -6.893127,-2.70209 -1.892214,-1.84778 -2.837901,-4.04181 -2.837901,-6.58209 0,-2.58722 0.945687,-4.80389 2.837901,-6.65167 1.892217,-1.84778 4.190197,-2.77167 6.893127,-2.77167 2.74819,0 5.06798,0.92389 6.96019,2.77167 1.93749,1.84778 2.90581,4.06445 2.90581,6.65167 0,2.54028 -0.96832,4.73431 -2.90581,6.58209 -1.89221,1.80167 -4.212,2.70209 -6.96019,2.70209 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
|
||||
<path d="M 213.56111,280.08446 H 195.99044 L 149.69953,207.0544 c -1.17121,-1.84778 -2.14037,-3.76515 -2.90581,-5.75126 h -0.40578 c 0.36051,2.12528 0.54076,6.67515 0.54076,13.6496 v 65.13172 h -15.54349 v -99.36009 h 18.71925 l 44.7374,71.29798 c 1.89222,2.95695 3.1087,4.98917 3.64945,6.09751 h 0.26996 c -0.45021,-2.6325 -0.67573,-7.09015 -0.67573,-13.37293 v -64.02256 h 15.47557 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
|
||||
<path d="m 289.25134,280.08446 h -54.40052 v -99.36009 h 52.23835 v 13.99669 h -36.15411 v 28.13085 h 33.31621 v 13.9271 h -33.31621 v 29.37835 h 38.31628 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
|
||||
<path d="M 366.56466,194.72106 H 338.7222 v 85.3634 h -16.08423 v -85.3634 h -27.77455 v -13.99669 h 71.70124 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue