ApiSystem: service, config, di
This commit is contained in:
parent
627dd8a97d
commit
d08a564946
2
build/run/ApiSystemService.bat
Normal file
2
build/run/ApiSystemService.bat
Normal file
@ -0,0 +1,2 @@
|
||||
echo "RUN ASC.Notify"
|
||||
call dotnet run --project ..\..\common\services\ASC.ApiSystem\ASC.ApiSystem.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=apisystem
|
@ -33,6 +33,7 @@ using System.Web;
|
||||
|
||||
using ASC.ApiSystem.Classes;
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Tenants;
|
||||
@ -360,4 +361,16 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class CalDavControllerExtention
|
||||
{
|
||||
public static DIHelper AddCalDavController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCommonMethods()
|
||||
.AddEmailValidationKeyProviderService()
|
||||
.AddCommonConstants()
|
||||
.AddCoreSettingsService();
|
||||
}
|
||||
}
|
||||
}
|
@ -27,6 +27,7 @@
|
||||
using System;
|
||||
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Core;
|
||||
|
||||
@ -187,4 +188,13 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class ControllerExtention
|
||||
{
|
||||
public static DIHelper AddCoreSettingsController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCoreSettingsService();
|
||||
}
|
||||
}
|
||||
}
|
@ -32,6 +32,7 @@ using System.Security;
|
||||
|
||||
using ASC.ApiSystem.Classes;
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Common.Utils;
|
||||
using ASC.Core;
|
||||
@ -661,4 +662,24 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class PortalControllerExtention
|
||||
{
|
||||
public static DIHelper AddPortalController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCommonMethods()
|
||||
.AddTimeZonesProvider()
|
||||
.AddCommonConstants()
|
||||
.AddUserManagerService()
|
||||
.AddUserFormatter()
|
||||
.AddCoreSettingsService()
|
||||
.AddHostedSolutionService()
|
||||
.AddApiSystemHelper()
|
||||
.AddSettingsManagerService()
|
||||
.AddTenantManagerService()
|
||||
.AddSecurityContextService()
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
@ -30,6 +30,7 @@ using System.Linq;
|
||||
|
||||
using ASC.ApiSystem.Classes;
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Common.Utils;
|
||||
using ASC.Core;
|
||||
@ -76,7 +77,7 @@ namespace ASC.ApiSystem.Controllers
|
||||
public RegistrationController(
|
||||
CommonMethods commonMethods,
|
||||
CommonConstants commonConstants,
|
||||
HostedSolution hostedSolution,
|
||||
IOptionsSnapshot<HostedSolution> hostedSolution,
|
||||
TimeZonesProvider timeZonesProvider,
|
||||
TimeZoneConverter timeZoneConverter,
|
||||
ApiSystemHelper apiSystemHelper,
|
||||
@ -92,7 +93,7 @@ namespace ASC.ApiSystem.Controllers
|
||||
{
|
||||
CommonMethods = commonMethods;
|
||||
CommonConstants = commonConstants;
|
||||
HostedSolution = hostedSolution;
|
||||
HostedSolution = hostedSolution.Value;
|
||||
TimeZonesProvider = timeZonesProvider;
|
||||
TimeZoneConverter = timeZoneConverter;
|
||||
ApiSystemHelper = apiSystemHelper;
|
||||
@ -777,4 +778,24 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class RegistrationControllerExtention
|
||||
{
|
||||
public static DIHelper AddRegistrationController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCommonMethods()
|
||||
.AddTimeZonesProvider()
|
||||
.AddCommonConstants()
|
||||
.AddUserManagerService()
|
||||
.AddUserFormatter()
|
||||
.AddCoreSettingsService()
|
||||
.AddHostedSolutionService()
|
||||
.AddApiSystemHelper()
|
||||
.AddSettingsManagerService()
|
||||
.AddTenantManagerService()
|
||||
.AddSecurityContextService()
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Tenants;
|
||||
@ -193,4 +194,14 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class SettingsControllerExtention
|
||||
{
|
||||
public static DIHelper AddSettingsController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCommonMethods()
|
||||
.AddCoreSettingsService();
|
||||
}
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ using System.Linq;
|
||||
|
||||
using ASC.ApiSystem.Classes;
|
||||
using ASC.ApiSystem.Models;
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Billing;
|
||||
@ -215,4 +216,15 @@ namespace ASC.ApiSystem.Controllers
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static class TariffControllerExtention
|
||||
{
|
||||
public static DIHelper AddTariffController(this DIHelper services)
|
||||
{
|
||||
return services
|
||||
.AddCommonMethods()
|
||||
.AddHostedSolutionService()
|
||||
.AddCoreSettingsService();
|
||||
}
|
||||
}
|
||||
}
|
@ -71,9 +71,12 @@ namespace ASC.ApiSystem
|
||||
diHelper.AddNLogManager("ASC.Apisystem");
|
||||
|
||||
diHelper
|
||||
.AddCommonConstants()
|
||||
.AddTimeZonesProvider()
|
||||
.AddCommonMethods();
|
||||
.AddPortalController()
|
||||
.AddCoreSettingsController()
|
||||
.AddCalDavController()
|
||||
.AddRegistrationController()
|
||||
.AddSettingsController()
|
||||
.AddTariffController();
|
||||
|
||||
services.AddAutofac(Configuration, HostEnvironment.ContentRootPath);
|
||||
}
|
||||
|
@ -148,4 +148,10 @@ server {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
location /apisystem {
|
||||
rewrite apisystem/(.*) /$1 break;
|
||||
proxy_pass http://localhost:5010;
|
||||
proxy_set_header X-REWRITER-URL $X_REWRITER_URL;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user