temp
This commit is contained in:
parent
e266fbf289
commit
05e3376bb3
|
|
@ -0,0 +1,18 @@
|
||||||
|
//using AyCode.Core.Consts;
|
||||||
|
using Mango.Nop.Core;
|
||||||
|
|
||||||
|
namespace Nop.Plugin.Misc.FruitBankPlugin
|
||||||
|
{
|
||||||
|
//public class FruitBankConst : NopCommonConst
|
||||||
|
//{
|
||||||
|
// public static string ProjectIdString = "f9f9383f-c459-4b9f-b0b5-201bd4a9c21b";
|
||||||
|
// public const string RequiresMeasurementAttr = "PriceByMeasurement.RequiresMeasurement";
|
||||||
|
|
||||||
|
// static FruitBankConst()
|
||||||
|
// {
|
||||||
|
// ProjectId = Guid.Parse(ProjectIdString);
|
||||||
|
// ProjectSalt = GenerateProjectSalt(ProjectId.ToString("N"));
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Nop.Plugin.Misc.FruitBankPlugin
|
|
||||||
{
|
|
||||||
public static class FruitBankConsts
|
|
||||||
{
|
|
||||||
public const string RequiresMeasurementAttr = "PriceByMeasurement.RequiresMeasurement";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Microsoft.AspNetCore.Builder;
|
//using AyCode.Core.Loggers;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Mvc.Razor;
|
using Microsoft.AspNetCore.Mvc.Razor;
|
||||||
using Microsoft.AspNetCore.SignalR;
|
using Microsoft.AspNetCore.SignalR;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
@ -34,9 +35,15 @@ public class PluginNopStartup : INopStartup
|
||||||
// .AllowCredentials()
|
// .AllowCredentials()
|
||||||
// ));
|
// ));
|
||||||
|
|
||||||
services.AddSignalR();
|
services.AddSignalR(options => options.MaximumReceiveMessageSize = 256 * 1024);
|
||||||
|
|
||||||
//register services and interfaces
|
//register services and interfaces
|
||||||
|
|
||||||
|
//services.AddSingleton<LoggerToLoggerApiController>();
|
||||||
|
//services.AddSingleton<IAcLogWriterBase, ConsoleLogWriter>();
|
||||||
|
////services.AddSingleton<SessionService>();
|
||||||
|
//services.AddScoped<FruitBankDataController>();
|
||||||
|
|
||||||
//services.AddScoped<CustomModelFactory, ICustomerModelFactory>();
|
//services.AddScoped<CustomModelFactory, ICustomerModelFactory>();
|
||||||
services.AddScoped<IPriceCalculationService, CustomPriceCalculationService>();
|
services.AddScoped<IPriceCalculationService, CustomPriceCalculationService>();
|
||||||
services.AddScoped<PriceCalculationService, CustomPriceCalculationService>();
|
services.AddScoped<PriceCalculationService, CustomPriceCalculationService>();
|
||||||
|
|
@ -54,17 +61,27 @@ public class PluginNopStartup : INopStartup
|
||||||
/// <param name="application">Builder for configuring an application's request pipeline</param>
|
/// <param name="application">Builder for configuring an application's request pipeline</param>
|
||||||
public void Configure(IApplicationBuilder application)
|
public void Configure(IApplicationBuilder application)
|
||||||
{
|
{
|
||||||
|
//var fruitBankHubEndPoint = $"/{FruitBankConstClient.DefaultHubName}";
|
||||||
|
//application.UseWhen(context => context.Request.Path.StartsWithSegments(fruitBankHubEndPoint), app =>
|
||||||
|
//{
|
||||||
|
// //app.UseCors("AllowBlazorClient");
|
||||||
|
// //app.UseRouting();
|
||||||
|
// app.UseEndpoints(endpoints =>
|
||||||
|
// {
|
||||||
|
// //endpoints.MapHub<FruitBankHub>("/fbhub");
|
||||||
|
// endpoints.MapHub<DevAdminSignalRHub>(fruitBankHubEndPoint);
|
||||||
|
|
||||||
application.UseWhen(context => context.Request.Path.StartsWithSegments("/fbhub"), app =>
|
// });
|
||||||
{
|
//});
|
||||||
//app.UseCors("AllowBlazorClient");
|
|
||||||
//app.UseRouting();
|
|
||||||
app.UseEndpoints(endpoints =>
|
|
||||||
{
|
|
||||||
endpoints.MapHub<FruitBankHub>("/fbhub");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
//var loggrHubEndPoint = $"/{FruitBankConstClient.LoggerHubName}";
|
||||||
|
//application.UseWhen(context => context.Request.Path.StartsWithSegments(loggrHubEndPoint), app =>
|
||||||
|
//{
|
||||||
|
// app.UseEndpoints(endpoints =>
|
||||||
|
// {
|
||||||
|
// endpoints.MapHub<LoggerSignalRHub>(loggrHubEndPoint);
|
||||||
|
// });
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(SolutionDir)\Presentation\Nop.Web\Nop.Web.csproj" />
|
<ProjectReference Include="$(SolutionDir)\Presentation\Nop.Web\Nop.Web.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Libraries\Mango.Nop.Core\Mango.Nop.Core.csproj" />
|
||||||
<ClearPluginAssemblies Include="$(SolutionDir)\Build\ClearPluginAssemblies.proj" />
|
<ClearPluginAssemblies Include="$(SolutionDir)\Build\ClearPluginAssemblies.proj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
@ -55,6 +56,12 @@
|
||||||
<Folder Include="Validators\" />
|
<Folder Include="Validators\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="9.0.8" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.Json" Version="9.0.8" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.8" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="Areas\Admin\Views\Configure\Configure.cshtml">
|
<None Update="Areas\Admin\Views\Configure\Configure.cshtml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue