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.Classes;
|
||||||
using ASC.ApiSystem.Models;
|
using ASC.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
using ASC.Core.Tenants;
|
using ASC.Core.Tenants;
|
||||||
@ -359,5 +360,17 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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 System;
|
||||||
|
|
||||||
using ASC.ApiSystem.Models;
|
using ASC.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
|
|
||||||
@ -186,5 +187,14 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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.Classes;
|
||||||
using ASC.ApiSystem.Models;
|
using ASC.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Common.Utils;
|
using ASC.Common.Utils;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
@ -660,5 +661,25 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#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.Classes;
|
||||||
using ASC.ApiSystem.Models;
|
using ASC.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Common.Utils;
|
using ASC.Common.Utils;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
@ -76,7 +77,7 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
public RegistrationController(
|
public RegistrationController(
|
||||||
CommonMethods commonMethods,
|
CommonMethods commonMethods,
|
||||||
CommonConstants commonConstants,
|
CommonConstants commonConstants,
|
||||||
HostedSolution hostedSolution,
|
IOptionsSnapshot<HostedSolution> hostedSolution,
|
||||||
TimeZonesProvider timeZonesProvider,
|
TimeZonesProvider timeZonesProvider,
|
||||||
TimeZoneConverter timeZoneConverter,
|
TimeZoneConverter timeZoneConverter,
|
||||||
ApiSystemHelper apiSystemHelper,
|
ApiSystemHelper apiSystemHelper,
|
||||||
@ -92,7 +93,7 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
{
|
{
|
||||||
CommonMethods = commonMethods;
|
CommonMethods = commonMethods;
|
||||||
CommonConstants = commonConstants;
|
CommonConstants = commonConstants;
|
||||||
HostedSolution = hostedSolution;
|
HostedSolution = hostedSolution.Value;
|
||||||
TimeZonesProvider = timeZonesProvider;
|
TimeZonesProvider = timeZonesProvider;
|
||||||
TimeZoneConverter = timeZoneConverter;
|
TimeZoneConverter = timeZoneConverter;
|
||||||
ApiSystemHelper = apiSystemHelper;
|
ApiSystemHelper = apiSystemHelper;
|
||||||
@ -776,5 +777,25 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
using ASC.Core.Tenants;
|
using ASC.Core.Tenants;
|
||||||
@ -192,5 +193,15 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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.Classes;
|
||||||
using ASC.ApiSystem.Models;
|
using ASC.ApiSystem.Models;
|
||||||
|
using ASC.Common;
|
||||||
using ASC.Common.Logging;
|
using ASC.Common.Logging;
|
||||||
using ASC.Core;
|
using ASC.Core;
|
||||||
using ASC.Core.Billing;
|
using ASC.Core.Billing;
|
||||||
@ -214,5 +215,16 @@ namespace ASC.ApiSystem.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TariffControllerExtention
|
||||||
|
{
|
||||||
|
public static DIHelper AddTariffController(this DIHelper services)
|
||||||
|
{
|
||||||
|
return services
|
||||||
|
.AddCommonMethods()
|
||||||
|
.AddHostedSolutionService()
|
||||||
|
.AddCoreSettingsService();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -70,10 +70,13 @@ namespace ASC.ApiSystem
|
|||||||
|
|
||||||
diHelper.AddNLogManager("ASC.Apisystem");
|
diHelper.AddNLogManager("ASC.Apisystem");
|
||||||
|
|
||||||
diHelper
|
diHelper
|
||||||
.AddCommonConstants()
|
.AddPortalController()
|
||||||
.AddTimeZonesProvider()
|
.AddCoreSettingsController()
|
||||||
.AddCommonMethods();
|
.AddCalDavController()
|
||||||
|
.AddRegistrationController()
|
||||||
|
.AddSettingsController()
|
||||||
|
.AddTariffController();
|
||||||
|
|
||||||
services.AddAutofac(Configuration, HostEnvironment.ContentRootPath);
|
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