Browse Source

Use generate-proxy for all modules

pull/9905/head
liangshiwei 4 years ago
parent
commit
4484a91b86
  1. 5
      common.props
  2. 6
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestProxyHttpClientFactory.cs
  3. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs
  4. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs
  5. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs
  6. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs
  7. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/AbpCliServiceProxyOptions.cs
  8. 3
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs
  9. 173
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs
  10. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs
  11. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/IServiceProxyGenerator.cs
  12. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs
  13. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs
  14. 8
      framework/src/Volo.Abp.Cli/Properties/launchSettings.json
  15. 46
      framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs
  16. 5
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs
  17. 7
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyApiDescriptionFinder.cs
  18. 7
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs
  19. 5
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs
  20. 4
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs
  21. 12
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/DefaultProxyHttpClientFactory.cs
  22. 2
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpActionParameterHelper.cs
  23. 8
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpClientProxyConfig.cs
  24. 9
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs
  25. 2
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs
  26. 2
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs
  27. 6
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IProxyHttpClientFactory.cs
  28. 3
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs
  29. 3
      framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs
  30. 30
      modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs
  31. 13
      modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.cs
  32. 229
      modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json
  33. 10
      modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs
  34. 45
      modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs
  35. 13
      modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.cs
  36. 242
      modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/bloggingAdmin-generate-proxy.json
  37. 8
      modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs
  38. 24
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs
  39. 13
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.cs
  40. 30
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs
  41. 13
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.cs
  42. 36
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs
  43. 13
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.cs
  44. 49
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs
  45. 13
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.cs
  46. 21
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs
  47. 13
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.cs
  48. 851
      modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/blogging-generate-proxy.json
  49. 8
      modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs
  50. 4
      modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json
  51. 4
      modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json
  52. 2
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json
  53. 39
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs
  54. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.cs
  55. 26
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs
  56. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.cs
  57. 39
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs
  58. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.cs
  59. 29
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs
  60. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.cs
  61. 29
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs
  62. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.cs
  63. 24
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs
  64. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.cs
  65. 50
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs
  66. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.cs
  67. 39
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs
  68. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.cs
  69. 46
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs
  70. 13
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.cs
  71. 3028
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json
  72. 8
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs
  73. 2
      modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs
  74. 19
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs
  75. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.cs
  76. 24
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs
  77. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs
  78. 34
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs
  79. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs
  80. 20
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs
  81. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.cs
  82. 21
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs
  83. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs
  84. 19
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs
  85. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs
  86. 30
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs
  87. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs
  88. 29
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs
  89. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs
  90. 20
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs
  91. 13
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs
  92. 3028
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json
  93. 8
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs
  94. 2
      modules/docs/app/VoloDocs.Migrator/appsettings.json
  95. 2
      modules/docs/app/VoloDocs.Web/appsettings.json
  96. 44
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs
  97. 13
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.cs
  98. 49
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs
  99. 13
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.cs
  100. 1451
      modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/docs-generate-proxy.json

5
common.props

@ -28,4 +28,9 @@
</None>
</ItemGroup>
<ItemGroup Condition="$(AssemblyName.EndsWith('HttpApi.Client'))">
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
</Project>

6
framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs → framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestProxyHttpClientFactory.cs

@ -1,15 +1,17 @@
using System.Net.Http;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Client.Proxying;
namespace Volo.Abp.AspNetCore.TestBase.DynamicProxying
{
[Dependency(ReplaceServices = true)]
public class AspNetCoreTestDynamicProxyHttpClientFactory : IDynamicProxyHttpClientFactory, ITransientDependency
public class AspNetCoreTestProxyHttpClientFactory : IProxyHttpClientFactory, ITransientDependency
{
private readonly ITestServerAccessor _testServerAccessor;
public AspNetCoreTestDynamicProxyHttpClientFactory(
public AspNetCoreTestProxyHttpClientFactory(
ITestServerAccessor testServerAccessor)
{
_testServerAccessor = testServerAccessor;

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/AbpCliCoreModule.cs

@ -3,10 +3,10 @@ using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Cli.Commands;
using Volo.Abp.Cli.Http;
using Volo.Abp.Cli.LIbs;
using Volo.Abp.Cli.ServiceProxy;
using Volo.Abp.Cli.ServiceProxy.Angular;
using Volo.Abp.Cli.ServiceProxy.CSharp;
using Volo.Abp.Cli.ServiceProxy.JavaScript;
using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.Cli.ServiceProxying.Angular;
using Volo.Abp.Cli.ServiceProxying.CSharp;
using Volo.Abp.Cli.ServiceProxying.JavaScript;
using Volo.Abp.Domain;
using Volo.Abp.Http;
using Volo.Abp.IdentityModel;

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs

@ -1,6 +1,6 @@
using System.Text;
using Microsoft.Extensions.Options;
using Volo.Abp.Cli.ServiceProxy;
using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.Commands

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProxyCommandBase.cs

@ -6,7 +6,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.ServiceProxy;
using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.Commands

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/RemoveProxyCommand.cs

@ -1,6 +1,6 @@
using System.Text;
using Microsoft.Extensions.Options;
using Volo.Abp.Cli.ServiceProxy;
using Volo.Abp.Cli.ServiceProxying;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.Commands

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/AbpCliServiceProxyOptions.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/AbpCliServiceProxyOptions.cs

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace Volo.Abp.Cli.ServiceProxy
namespace Volo.Abp.Cli.ServiceProxying
{
public class AbpCliServiceProxyOptions
{

3
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/Angular/AngularServiceProxyGenerator.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs

@ -2,7 +2,6 @@
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Newtonsoft.Json.Linq;
using NuGet.Versioning;
using Volo.Abp.Cli.Commands;
@ -11,7 +10,7 @@ using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Json;
namespace Volo.Abp.Cli.ServiceProxy.Angular
namespace Volo.Abp.Cli.ServiceProxying.Angular
{
public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase<AngularServiceProxyGenerator> , ITransientDependency
{

173
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/CSharp/CSharpServiceProxyGenerator.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs

@ -2,19 +2,16 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Microsoft.Extensions.Logging;
using Volo.Abp.Cli.Commands;
using Volo.Abp.Cli.Http;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Json;
using Volo.Abp.Modularity;
namespace Volo.Abp.Cli.ServiceProxy.CSharp
namespace Volo.Abp.Cli.ServiceProxying.CSharp
{
public class CSharpServiceProxyGenerator : ServiceProxyGeneratorBase<CSharpServiceProxyGenerator>, ITransientDependency
{
@ -28,35 +25,39 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
private const string DefaultNamespace = "ClientProxies";
private const string Namespace = "<namespace>";
private const string AppServicePrefix = "Volo.Abp.Application.Services";
private readonly string _clientProxyTemplate = "// This file is automatically generated by ABP framework to use MVC Controllers from CSharp" +
private readonly string _clientProxyGeneratedTemplate = "// This file is automatically generated by ABP framework to use MVC Controllers from CSharp" +
$"{Environment.NewLine}<using placeholder>" +
$"{Environment.NewLine}" +
$"{Environment.NewLine}// ReSharper disable once CheckNamespace" +
$"{Environment.NewLine}namespace <namespace>" +
$"{Environment.NewLine}{{" +
$"{Environment.NewLine} [Dependency(ReplaceServices = true)]" +
$"{Environment.NewLine} [ExposeServices(typeof(<serviceInterface>))]" +
$"{Environment.NewLine} public partial class <className> : ClientProxyBase<<serviceInterface>>, <serviceInterface>" +
$"{Environment.NewLine} public partial class <className>" +
$"{Environment.NewLine} {{" +
$"{Environment.NewLine} <method placeholder>" +
$"{Environment.NewLine} }}" +
$"{Environment.NewLine}}}" +
$"{Environment.NewLine}";
private readonly string _clientProxyPartialTemplate = "// This file is part of <className>, you can customize it here" +
$"{Environment.NewLine}namespace <namespace>" +
$"{Environment.NewLine}{{" +
$"{Environment.NewLine} public partial class <className>" +
$"{Environment.NewLine} {{" +
$"{Environment.NewLine} }}" +
$"{Environment.NewLine}}}" +
$"{Environment.NewLine}";
private readonly string _clientProxyTemplate = "// This file is part of <className>, you can customize it here" +
$"{Environment.NewLine}using Volo.Abp.DependencyInjection;" +
$"{Environment.NewLine}using Volo.Abp.Http.Client.ClientProxying;" +
$"{Environment.NewLine}<using placeholder>" +
$"{Environment.NewLine}" +
$"{Environment.NewLine}// ReSharper disable once CheckNamespace" +
$"{Environment.NewLine}namespace <namespace>" +
$"{Environment.NewLine}{{" +
$"{Environment.NewLine} [Dependency(ReplaceServices = true)]" +
$"{Environment.NewLine} [ExposeServices(typeof(<serviceInterface>), typeof(<className>))]" +
$"{Environment.NewLine} public partial class <className> : ClientProxyBase<<serviceInterface>>, <serviceInterface>" +
$"{Environment.NewLine} {{" +
$"{Environment.NewLine} }}" +
$"{Environment.NewLine}}}" +
$"{Environment.NewLine}";
private readonly List<string> _usingNamespaceList = new()
{
"using System;",
"using System.Threading.Tasks;",
"using Volo.Abp.DependencyInjection;",
"using Volo.Abp.Application.Dtos;",
"using Volo.Abp.Http.Client;",
"using Volo.Abp.Http.Client.ClientProxying;",
"using Volo.Abp.Http.Modeling;"
};
@ -69,8 +70,8 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
public override async Task GenerateProxyAsync(GenerateProxyArgs args)
{
CheckWorkDirectory(args.WorkDirectory);
CheckFolder(args.Folder);
var projectFilePath = CheckWorkDirectory(args.WorkDirectory);
if (args.CommandName == RemoveProxyCommand.Name)
{
@ -78,15 +79,13 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
return;
}
var rootNamespace = GetRootNamespace(projectFilePath);
var applicationApiDescriptionModel = await GetApplicationApiDescriptionModelAsync(args);
foreach (var controller in applicationApiDescriptionModel.Modules.Values.SelectMany(x => x.Controllers))
{
if (ShouldGenerateProxy(controller.Value))
{
await GenerateClientProxyFileAsync(args, controller.Value, rootNamespace);
await GenerateClientProxyFileAsync(args, controller.Value);
}
}
@ -119,22 +118,62 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
private async Task GenerateClientProxyFileAsync(
GenerateProxyArgs args,
ControllerApiDescriptionModel controllerApiDescription,
string rootNamespace)
ControllerApiDescriptionModel controllerApiDescription)
{
var appServiceTypeFullName = controllerApiDescription.Interfaces.Last().Type;
var appServiceTypeName = appServiceTypeFullName.Split('.').Last();
var folder = args.Folder.IsNullOrWhiteSpace()? DefaultNamespace : args.Folder;
var usingNamespaceList = new List<string>(_usingNamespaceList);
var appServiceTypeFullName = controllerApiDescription.Interfaces.Last().Type;
var appServiceTypeName = appServiceTypeFullName.Split('.').Last();
var clientProxyName = $"{controllerApiDescription.ControllerName}ClientProxy";
var rootNamespace = $"{GetTypeNamespace(controllerApiDescription.Type)}.{folder.Replace('/', '.')}";
var clientProxyBuilder = new StringBuilder(_clientProxyTemplate);
var fileNamespace = $"{rootNamespace}.{folder.Replace('/', '.')}";
usingNamespaceList.Add($"using {GetTypeNamespace(appServiceTypeFullName)};");
clientProxyBuilder.Replace(ClassName, clientProxyName);
clientProxyBuilder.Replace(Namespace, rootNamespace);
clientProxyBuilder.Replace(ServiceInterface, appServiceTypeName);
clientProxyBuilder.Replace(UsingPlaceholder, $"using {GetTypeNamespace(appServiceTypeFullName)};");
var filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.cs");
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
if (!File.Exists(filePath))
{
using (var writer = new StreamWriter(filePath))
{
await writer.WriteAsync(clientProxyBuilder.ToString());
}
Logger.LogInformation($"Create {GetLoggerOutputPath(filePath, args.WorkDirectory)}");
}
await GenerateClientProxyGeneratedFileAsync(
args,
controllerApiDescription,
clientProxyName,
appServiceTypeName,
appServiceTypeFullName,
rootNamespace,
folder);
}
private async Task GenerateClientProxyGeneratedFileAsync(
GenerateProxyArgs args,
ControllerApiDescriptionModel controllerApiDescription,
string clientProxyName,
string appServiceTypeName,
string appServiceTypeFullName,
string rootNamespace,
string folder)
{
var clientProxyBuilder = new StringBuilder(_clientProxyGeneratedTemplate);
var usingNamespaceList = new List<string>(_usingNamespaceList)
{
$"using {GetTypeNamespace(appServiceTypeFullName)};"
};
clientProxyBuilder.Replace(ClassName, clientProxyName);
clientProxyBuilder.Replace(Namespace, fileNamespace);
clientProxyBuilder.Replace(Namespace, rootNamespace);
clientProxyBuilder.Replace(ServiceInterface, appServiceTypeName);
foreach (var action in controllerApiDescription.Actions.Values)
@ -155,39 +194,13 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
clientProxyBuilder.Replace($"{Environment.NewLine}{UsingPlaceholder}", string.Empty);
clientProxyBuilder.Replace($"{Environment.NewLine} {MethodPlaceholder}", string.Empty);
var filePath = Path.Combine(args.WorkDirectory, folder, clientProxyName + ".cs");
Directory.CreateDirectory(Path.GetDirectoryName(filePath));
var filePath = Path.Combine(args.WorkDirectory, folder, $"{clientProxyName}.Generated.cs");
using (var writer = new StreamWriter(filePath))
{
await writer.WriteAsync(clientProxyBuilder.ToString());
Logger.LogInformation($"Create {GetLoggerOutputPath(filePath, args.WorkDirectory)}");
}
await GenerateClientProxyPartialFileAsync(args, clientProxyName, fileNamespace, filePath);
}
private async Task GenerateClientProxyPartialFileAsync(
GenerateProxyArgs args,
string clientProxyName,
string fileNamespace,
string filePath)
{
var clientProxyBuilder = new StringBuilder(_clientProxyPartialTemplate);
clientProxyBuilder.Replace(ClassName, clientProxyName);
clientProxyBuilder.Replace(Namespace, fileNamespace);
filePath = filePath.Replace(".cs", ".partial.cs");
if (!File.Exists(filePath))
{
using (var writer = new StreamWriter(filePath))
{
await writer.WriteAsync(clientProxyBuilder.ToString());
}
Logger.LogInformation($"Create {GetLoggerOutputPath(filePath, args.WorkDirectory)}");
}
}
private void GenerateMethod(
@ -278,12 +291,12 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
return serviceInterface.Type.EndsWith(ServicePostfix);
}
private static bool ShouldGenerateMethod(string appServiceTypeName, ActionApiDescriptionModel action)
private bool ShouldGenerateMethod(string appServiceTypeName, ActionApiDescriptionModel action)
{
return action.ImplementFrom.StartsWith(AppServicePrefix) || action.ImplementFrom.StartsWith(appServiceTypeName);
}
private static string GetTypeNamespace(string typeFullName)
private string GetTypeNamespace(string typeFullName)
{
return typeFullName.Substring(0, typeFullName.LastIndexOf('.'));
}
@ -328,7 +341,7 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
return stringBuilder.ToString();
}
private static void AddUsingNamespace(List<string> usingNamespaceList, string typeName)
private void AddUsingNamespace(List<string> usingNamespaceList, string typeName)
{
var rootNamespace = $"using {GetTypeNamespace(typeName)};";
if (usingNamespaceList.Contains(rootNamespace))
@ -341,6 +354,13 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
private string NormalizeTypeName(string typeName)
{
var nullable = string.Empty;
if (typeName.EndsWith("?"))
{
typeName = typeName.TrimEnd('?');
nullable = "?";
}
typeName = typeName switch
{
"Void" => "void",
@ -355,10 +375,10 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
_ => typeName
};
return typeName;
return $"{typeName}{nullable}";
}
private static string CheckWorkDirectory(string directory)
private void CheckWorkDirectory(string directory)
{
if (!Directory.Exists(directory))
{
@ -371,39 +391,14 @@ namespace Volo.Abp.Cli.ServiceProxy.CSharp
throw new CliUsageException(
"No project file found in the directory. The working directory must have a HttpApi.Client project file.");
}
return projectFiles.First();
}
private static void CheckFolder(string folder)
private void CheckFolder(string folder)
{
if (!folder.IsNullOrWhiteSpace() && Path.HasExtension(folder))
{
throw new CliUsageException("Option folder should be a directory.");
}
}
private Type GetStartupModule(string assemblyPath)
{
return Assembly
.LoadFrom(assemblyPath)
.GetTypes()
.SingleOrDefault(AbpModule.IsAbpModule);
}
private string GetRootNamespace(string projectFilePath)
{
var document = new XmlDocument();
document.Load(projectFilePath);
var rootNamespace = document.SelectSingleNode("//RootNamespace")?.InnerText;
if(rootNamespace.IsNullOrWhiteSpace())
{
rootNamespace = Path.GetFileNameWithoutExtension(projectFilePath);
}
return rootNamespace;
}
}
}

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/GenerateProxyArgs.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/GenerateProxyArgs.cs

@ -1,7 +1,7 @@
using System.Collections.Generic;
using JetBrains.Annotations;
namespace Volo.Abp.Cli.ServiceProxy
namespace Volo.Abp.Cli.ServiceProxying
{
public class GenerateProxyArgs
{

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/IServiceProxyGenerator.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/IServiceProxyGenerator.cs

@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Volo.Abp.Cli.ServiceProxy
namespace Volo.Abp.Cli.ServiceProxying
{
public interface IServiceProxyGenerator
{

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/JavaScript/JavaScriptServiceProxyGenerator.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs

@ -9,7 +9,7 @@ using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.ProxyScripting.Generators.JQuery;
using Volo.Abp.Json;
namespace Volo.Abp.Cli.ServiceProxy.JavaScript
namespace Volo.Abp.Cli.ServiceProxying.JavaScript
{
public class JavaScriptServiceProxyGenerator : ServiceProxyGeneratorBase<JavaScriptServiceProxyGenerator>, ITransientDependency
{

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxy/ServiceProxyGeneratorBase.cs → framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/ServiceProxyGeneratorBase.cs

@ -8,7 +8,7 @@ using Volo.Abp.Cli.Http;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Json;
namespace Volo.Abp.Cli.ServiceProxy
namespace Volo.Abp.Cli.ServiceProxying
{
public abstract class ServiceProxyGeneratorBase<T> : IServiceProxyGenerator where T: IServiceProxyGenerator
{

8
framework/src/Volo.Abp.Cli/Properties/launchSettings.json

@ -0,0 +1,8 @@
{
"profiles": {
"Volo.Abp.Cli": {
"commandName": "Project",
"commandLineArgs": "generate-proxy -t csharp -m blogging -u https://localhost:40017 -wd C:\\Users\\liangshiwei\\Documents\\Code\\abp\\modules\\blogging\\src\\Volo.Blogging.HttpApi.Client"
}
}
}

46
framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionDynamicHttpClientProxyExtensions.cs → framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs

@ -7,14 +7,48 @@ using Volo.Abp;
using Volo.Abp.Castle.DynamicProxy;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Client.Proxying;
using Volo.Abp.Validation;
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionDynamicHttpClientProxyExtensions
public static class ServiceCollectionHttpClientProxyExtensions
{
private static readonly ProxyGenerator ProxyGeneratorInstance = new ProxyGenerator();
/// <summary>
/// Registers Static HTTP Client Proxies for all public interfaces
/// extend the <see cref="IRemoteService"/> interface in the
/// given <paramref name="assembly"/>.
/// </summary>
/// <param name="services">Service collection</param>
/// <param name="assembly">The assembly containing the service interfaces</param>
/// <param name="remoteServiceConfigurationName">
/// The name of the remote service configuration to be used by the Static HTTP Client proxies.
/// See <see cref="AbpRemoteServiceOptions"/>.
/// </param>
public static IServiceCollection AddStaticHttpClientProxies(
[NotNull] this IServiceCollection services,
[NotNull] Assembly assembly,
[NotNull] string remoteServiceConfigurationName = RemoteServiceConfigurationDictionary.DefaultName)
{
Check.NotNull(services, nameof(assembly));
var serviceTypes = assembly.GetTypes().Where(IsSuitableForClientProxying).ToArray();
foreach (var serviceType in serviceTypes)
{
AddHttpClientFactory(services, remoteServiceConfigurationName);
services.Configure<AbpHttpClientOptions>(options =>
{
options.HttpClientProxies[serviceType] = new HttpClientProxyConfig(serviceType, remoteServiceConfigurationName);
});
}
return services;
}
/// <summary>
/// Registers HTTP Client Proxies for all public interfaces
/// extend the <see cref="IRemoteService"/> interface in the
@ -37,7 +71,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
Check.NotNull(services, nameof(assembly));
var serviceTypes = assembly.GetTypes().Where(IsSuitableForDynamicClientProxying).ToArray();
var serviceTypes = assembly.GetTypes().Where(IsSuitableForClientProxying).ToArray();
foreach (var serviceType in serviceTypes)
{
@ -101,7 +135,7 @@ namespace Microsoft.Extensions.DependencyInjection
services.Configure<AbpHttpClientOptions>(options =>
{
options.HttpClientProxies[type] = new DynamicHttpClientProxyConfig(type, remoteServiceConfigurationName);
options.HttpClientProxies[type] = new HttpClientProxyConfig(type, remoteServiceConfigurationName);
});
var interceptorType = typeof(DynamicHttpProxyInterceptor<>).MakeGenericType(type);
@ -178,12 +212,12 @@ namespace Microsoft.Extensions.DependencyInjection
}
/// <summary>
/// Checks wether the type is suitable to use with the dynamic proxying.
/// Checks wether the type is suitable to use with the proxying.
/// Currently the type is checked statically against some fixed conditions.
/// </summary>
/// <param name="type">Type to check</param>
/// <returns>True, if the type is suitable for dynamic proxying. Otherwise false.</returns>
private static bool IsSuitableForDynamicClientProxying(Type type)
/// <returns>True, if the type is suitable for proxying. Otherwise false.</returns>
private static bool IsSuitableForClientProxying(Type type)
{
//TODO: Add option to change type filter

5
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientOptions.cs

@ -1,16 +1,17 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Client.Proxying;
namespace Volo.Abp.Http.Client
{
public class AbpHttpClientOptions
{
public Dictionary<Type, DynamicHttpClientProxyConfig> HttpClientProxies { get; set; }
public Dictionary<Type, HttpClientProxyConfig> HttpClientProxies { get; set; }
public AbpHttpClientOptions()
{
HttpClientProxies = new Dictionary<Type, DynamicHttpClientProxyConfig>();
HttpClientProxies = new Dictionary<Type, HttpClientProxyConfig>();
}
}
}

7
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyApiDescriptionFinder.cs

@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.FileProviders;
using Volo.Abp.DependencyInjection;
@ -26,7 +25,7 @@ namespace Volo.Abp.Http.Client.ClientProxying
JsonSerializer = jsonSerializer;
ActionApiDescriptionModels = new Dictionary<string, ActionApiDescriptionModel>();
Initial();
Initialize();
}
public Task<ActionApiDescriptionModel> FindActionAsync(string methodName)
@ -39,7 +38,7 @@ namespace Volo.Abp.Http.Client.ClientProxying
return Task.FromResult(ApplicationApiDescriptionModel);
}
private void Initial()
private void Initialize()
{
ApplicationApiDescriptionModel = GetApplicationApiDescriptionModel();
var controllers = ApplicationApiDescriptionModel.Modules.Select(x=>x.Value).SelectMany(x => x.Controllers.Values).ToList();
@ -51,7 +50,7 @@ namespace Volo.Abp.Http.Client.ClientProxying
foreach (var actionItem in controller.Actions.Values)
{
var actionKey = $"{appServiceType}.{actionItem.Name}.{string.Join("-", actionItem.ParametersOnMethod.Select(x => x.Type))}";
if (!ActionApiDescriptionModels.ContainsKey(actionKey))
{
ActionApiDescriptionModels.Add(actionKey, actionItem);

7
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs

@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.Proxying;
using Volo.Abp.Http.Modeling;
namespace Volo.Abp.Http.Client.ClientProxying
@ -26,7 +26,7 @@ namespace Volo.Abp.Http.Client.ClientProxying
protected virtual async Task<HttpProxyExecuterContext> BuildHttpProxyExecuterContext(string methodName, params object[] arguments)
{
var actionKey = GetActionKey(typeof(TService).FullName, methodName, arguments);
var actionKey = GetActionKey(methodName, arguments);
var action = await ClientProxyApiDescriptionFinder.FindActionAsync(actionKey);
return new HttpProxyExecuterContext(action, BuildArguments(action, arguments), typeof(TService));
@ -45,9 +45,8 @@ namespace Volo.Abp.Http.Client.ClientProxying
return dict;
}
private static string GetActionKey(string serviceTypeFullName, string methodName, params object[] arguments)
private static string GetActionKey(string methodName, params object[] arguments)
{
return $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Select(x => x.GetType().FullName))}";
}
}

5
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs

@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DynamicProxy;
using Volo.Abp.Http.Client.Proxying;
using Volo.Abp.Http.Modeling;
namespace Volo.Abp.Http.Client.DynamicProxying
@ -19,7 +20,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying
protected AbpHttpClientOptions ClientOptions { get; }
protected IHttpProxyExecuter HttpProxyExecuter { get; }
protected IDynamicProxyHttpClientFactory HttpClientFactory { get; }
protected IProxyHttpClientFactory HttpClientFactory { get; }
protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; }
protected IApiDescriptionFinder ApiDescriptionFinder { get; }
@ -35,7 +36,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying
public DynamicHttpProxyInterceptor(
IHttpProxyExecuter httpProxyExecuter,
IOptions<AbpHttpClientOptions> clientOptions,
IDynamicProxyHttpClientFactory httpClientFactory,
IProxyHttpClientFactory httpClientFactory,
IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider,
IApiDescriptionFinder apiDescriptionFinder)
{

4
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiVersionInfo.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs

@ -1,6 +1,6 @@
using System;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
public class ApiVersionInfo //TODO: Rename to not conflict with api versioning apis
{
@ -19,4 +19,4 @@ namespace Volo.Abp.Http.Client.DynamicProxying
return !BindingSource.IsIn("Path");
}
}
}
}

12
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DefaultDynamicProxyHttpClientFactory.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/DefaultProxyHttpClientFactory.cs

@ -1,25 +1,25 @@
using System.Net.Http;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
public class DefaultDynamicProxyHttpClientFactory : IDynamicProxyHttpClientFactory, ITransientDependency
public class DefaultProxyHttpClientFactory : IProxyHttpClientFactory, ITransientDependency
{
private readonly IHttpClientFactory _httpClientFactory;
public DefaultDynamicProxyHttpClientFactory(IHttpClientFactory httpClientFactory)
public DefaultProxyHttpClientFactory(IHttpClientFactory httpClientFactory)
{
_httpClientFactory = httpClientFactory;
}
public HttpClient Create()
public HttpClient Create()
{
return _httpClientFactory.CreateClient();
}
public HttpClient Create(string name)
public HttpClient Create(string name)
{
return _httpClientFactory.CreateClient(name);
}
}
}
}

2
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/HttpActionParameterHelper.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpActionParameterHelper.cs

@ -2,7 +2,7 @@
using Volo.Abp.Http.Modeling;
using Volo.Abp.Reflection;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
internal static class HttpActionParameterHelper
{

8
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpClientProxyConfig.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpClientProxyConfig.cs

@ -1,17 +1,17 @@
using System;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
public class DynamicHttpClientProxyConfig
public class HttpClientProxyConfig
{
public Type Type { get; }
public string RemoteServiceName { get; }
public DynamicHttpClientProxyConfig(Type type, string remoteServiceName)
public HttpClientProxyConfig(Type type, string remoteServiceName)
{
Type = type;
RemoteServiceName = remoteServiceName;
}
}
}
}

9
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/HttpProxyExecuter.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs

@ -11,7 +11,6 @@ using Microsoft.Extensions.Primitives;
using Volo.Abp.Content;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.Authentication;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Http.ProxyScripting.Generators;
using Volo.Abp.Json;
@ -19,7 +18,7 @@ using Volo.Abp.MultiTenancy;
using Volo.Abp.Threading;
using Volo.Abp.Tracing;
namespace Volo.Abp.Http.Client
namespace Volo.Abp.Http.Client.Proxying
{
public class HttpProxyExecuter : IHttpProxyExecuter, ITransientDependency
{
@ -27,7 +26,7 @@ namespace Volo.Abp.Http.Client
protected ICorrelationIdProvider CorrelationIdProvider { get; }
protected ICurrentTenant CurrentTenant { get; }
protected AbpCorrelationIdOptions AbpCorrelationIdOptions { get; }
protected IDynamicProxyHttpClientFactory HttpClientFactory { get; }
protected IProxyHttpClientFactory HttpClientFactory { get; }
protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; }
protected AbpHttpClientOptions ClientOptions { get; }
protected IJsonSerializer JsonSerializer { get; }
@ -38,7 +37,7 @@ namespace Volo.Abp.Http.Client
ICorrelationIdProvider correlationIdProvider,
ICurrentTenant currentTenant,
IOptions<AbpCorrelationIdOptions> abpCorrelationIdOptions,
IDynamicProxyHttpClientFactory httpClientFactory,
IProxyHttpClientFactory httpClientFactory,
IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider,
IOptions<AbpHttpClientOptions> clientOptions,
IRemoteServiceHttpClientAuthenticator clientAuthenticator,
@ -89,7 +88,7 @@ namespace Volo.Abp.Http.Client
public virtual async Task<HttpContent> MakeRequestAsync(HttpProxyExecuterContext context)
{
var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {context.ServiceType.FullName}.");
var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) ?? throw new AbpException($"Could not get HttpClientProxyConfig for {context.ServiceType.FullName}.");
var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName);
var client = HttpClientFactory.Create(clientConfig.RemoteServiceName);

2
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/HttpProxyExecuterContext.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs

@ -3,7 +3,7 @@ using System.Collections.Generic;
using JetBrains.Annotations;
using Volo.Abp.Http.Modeling;
namespace Volo.Abp.Http.Client
namespace Volo.Abp.Http.Client.Proxying
{
public class HttpProxyExecuterContext
{

2
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/IHttpProxyExecuter.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs

@ -1,7 +1,7 @@
using System.Net.Http;
using System.Threading.Tasks;
namespace Volo.Abp.Http.Client
namespace Volo.Abp.Http.Client.Proxying
{
public interface IHttpProxyExecuter
{

6
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/IDynamicProxyHttpClientFactory.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IProxyHttpClientFactory.cs

@ -1,11 +1,11 @@
using System.Net.Http;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
public interface IDynamicProxyHttpClientFactory
public interface IProxyHttpClientFactory
{
HttpClient Create();
HttpClient Create(string name);
}
}
}

3
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs

@ -6,11 +6,12 @@ using System.Net.Http.Headers;
using System.Text;
using JetBrains.Annotations;
using Volo.Abp.Content;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Http.ProxyScripting.Generators;
using Volo.Abp.Json;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
public static class RequestPayloadBuilder
{

3
framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/UrlBuilder.cs → framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs

@ -5,11 +5,12 @@ using System.Globalization;
using System.Linq;
using System.Text;
using JetBrains.Annotations;
using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Http.ProxyScripting.Generators;
using Volo.Abp.Localization;
namespace Volo.Abp.Http.Client.DynamicProxying
namespace Volo.Abp.Http.Client.Proxying
{
internal static class UrlBuilder
{

30
modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs

@ -0,0 +1,30 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Account;
using Volo.Abp.Identity;
// ReSharper disable once CheckNamespace
namespace Volo.Abp.Account.ClientProxies
{
public partial class AccountClientProxy
{
public virtual async Task<IdentityUserDto> RegisterAsync(RegisterDto input)
{
return await RequestAsync<IdentityUserDto>(nameof(RegisterAsync), input);
}
public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input)
{
await RequestAsync(nameof(SendPasswordResetCodeAsync), input);
}
public virtual async Task ResetPasswordAsync(ResetPasswordDto input)
{
await RequestAsync(nameof(ResetPasswordAsync), input);
}
}
}

13
modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Abp.Account;
// ReSharper disable once CheckNamespace
namespace Volo.Abp.Account.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAccountAppService), typeof(AccountClientProxy))]
public partial class AccountClientProxy : ClientProxyBase<IAccountAppService>, IAccountAppService
{
}
}

229
modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/account-generate-proxy.json

@ -0,0 +1,229 @@
{
"modules": {
"account": {
"rootPath": "account",
"remoteServiceName": "AbpAccount",
"controllers": {
"Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": {
"controllerName": "Account",
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController",
"interfaces": [],
"actions": {
"LoginByLogin": {
"uniqueName": "LoginByLogin",
"name": "Login",
"httpMethod": "POST",
"url": "api/account/login",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "login",
"typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web",
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "login",
"name": "login",
"jsonName": null,
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController"
},
"Logout": {
"uniqueName": "Logout",
"name": "Logout",
"httpMethod": "GET",
"url": "api/account/logout",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController"
},
"CheckPasswordByLogin": {
"uniqueName": "CheckPasswordByLogin",
"name": "CheckPassword",
"httpMethod": "POST",
"url": "api/account/check-password",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "login",
"typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web",
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "login",
"name": "login",
"jsonName": null,
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult",
"typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController"
}
}
},
"Volo.Abp.Account.AccountController": {
"controllerName": "Account",
"type": "Volo.Abp.Account.AccountController",
"interfaces": [
{
"type": "Volo.Abp.Account.IAccountAppService"
}
],
"actions": {
"RegisterAsyncByInput": {
"uniqueName": "RegisterAsyncByInput",
"name": "RegisterAsync",
"httpMethod": "POST",
"url": "api/account/register",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts",
"type": "Volo.Abp.Account.RegisterDto",
"typeSimple": "Volo.Abp.Account.RegisterDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Abp.Account.RegisterDto",
"typeSimple": "Volo.Abp.Account.RegisterDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Abp.Identity.IdentityUserDto",
"typeSimple": "Volo.Abp.Identity.IdentityUserDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.IAccountAppService"
},
"SendPasswordResetCodeAsyncByInput": {
"uniqueName": "SendPasswordResetCodeAsyncByInput",
"name": "SendPasswordResetCodeAsync",
"httpMethod": "POST",
"url": "api/account/send-password-reset-code",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts",
"type": "Volo.Abp.Account.SendPasswordResetCodeDto",
"typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Abp.Account.SendPasswordResetCodeDto",
"typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.IAccountAppService"
},
"ResetPasswordAsyncByInput": {
"uniqueName": "ResetPasswordAsyncByInput",
"name": "ResetPasswordAsync",
"httpMethod": "POST",
"url": "api/account/reset-password",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts",
"type": "Volo.Abp.Account.ResetPasswordDto",
"typeSimple": "Volo.Abp.Account.ResetPasswordDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Abp.Account.ResetPasswordDto",
"typeSimple": "Volo.Abp.Account.ResetPasswordDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Abp.Account.IAccountAppService"
}
}
}
}
}
},
"types": {}
}

10
modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo/Abp/Account/AbpAccountHttpApiClientModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Account
{
@ -11,8 +12,13 @@ namespace Volo.Abp.Account
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(typeof(AbpAccountApplicationContractsModule).Assembly,
context.Services.AddStaticHttpClientProxies(typeof(AbpAccountApplicationContractsModule).Assembly,
AccountRemoteServiceConsts.RemoteServiceName);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpAccountHttpApiClientModule>();
});
}
}
}
}

45
modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs

@ -0,0 +1,45 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Admin.Blogs;
using Volo.Blogging.Blogs.Dtos;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.Admin.ClientProxies
{
public partial class BlogManagementClientProxy
{
public virtual async Task<ListResultDto<BlogDto>> GetListAsync()
{
return await RequestAsync<ListResultDto<BlogDto>>(nameof(GetListAsync));
}
public virtual async Task<BlogDto> GetAsync(Guid id)
{
return await RequestAsync<BlogDto>(nameof(GetAsync), id);
}
public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input)
{
return await RequestAsync<BlogDto>(nameof(CreateAsync), input);
}
public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input)
{
return await RequestAsync<BlogDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
public virtual async Task ClearCacheAsync(Guid id)
{
await RequestAsync(nameof(ClearCacheAsync), id);
}
}
}

13
modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.Admin.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogManagementAppService), typeof(BlogManagementClientProxy))]
public partial class BlogManagementClientProxy : ClientProxyBase<IBlogManagementAppService>, IBlogManagementAppService
{
}
}

242
modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/bloggingAdmin-generate-proxy.json

@ -0,0 +1,242 @@
{
"modules": {
"bloggingAdmin": {
"rootPath": "bloggingAdmin",
"remoteServiceName": "BloggingAdmin",
"controllers": {
"Volo.Blogging.Admin.BlogManagementController": {
"controllerName": "BlogManagement",
"type": "Volo.Blogging.Admin.BlogManagementController",
"interfaces": [
{
"type": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
}
],
"actions": {
"GetListAsync": {
"uniqueName": "GetListAsync",
"name": "GetListAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs/admin",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Blogs.Dtos.BlogDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Blogs.Dtos.BlogDto>"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
},
"GetAsyncById": {
"uniqueName": "GetAsyncById",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs/admin/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Blogs.Dtos.BlogDto",
"typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
},
"CreateAsyncByInput": {
"uniqueName": "CreateAsyncByInput",
"name": "CreateAsync",
"httpMethod": "POST",
"url": "api/blogging/blogs/admin",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Blogging.Admin.Blogs.CreateBlogDto, Volo.Blogging.Admin.Application.Contracts",
"type": "Volo.Blogging.Admin.Blogs.CreateBlogDto",
"typeSimple": "Volo.Blogging.Admin.Blogs.CreateBlogDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Admin.Blogs.CreateBlogDto",
"typeSimple": "Volo.Blogging.Admin.Blogs.CreateBlogDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Blogs.Dtos.BlogDto",
"typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
},
"UpdateAsyncByIdAndInput": {
"uniqueName": "UpdateAsyncByIdAndInput",
"name": "UpdateAsync",
"httpMethod": "PUT",
"url": "api/blogging/blogs/admin/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.Blogging.Admin.Blogs.UpdateBlogDto, Volo.Blogging.Admin.Application.Contracts",
"type": "Volo.Blogging.Admin.Blogs.UpdateBlogDto",
"typeSimple": "Volo.Blogging.Admin.Blogs.UpdateBlogDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Admin.Blogs.UpdateBlogDto",
"typeSimple": "Volo.Blogging.Admin.Blogs.UpdateBlogDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Blogs.Dtos.BlogDto",
"typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
},
"DeleteAsyncById": {
"uniqueName": "DeleteAsyncById",
"name": "DeleteAsync",
"httpMethod": "DELETE",
"url": "api/blogging/blogs/admin/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
},
"ClearCacheAsyncById": {
"uniqueName": "ClearCacheAsyncById",
"name": "ClearCacheAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs/admin/clear-cache/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Admin.Blogs.IBlogManagementAppService"
}
}
}
}
}
},
"types": {}
}

8
modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/Volo/Blogging/Admin/BloggingAdminHttpApiClientModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Blogging.Admin
{
@ -11,8 +12,13 @@ namespace Volo.Blogging.Admin
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(typeof(BloggingAdminApplicationContractsModule).Assembly,
context.Services.AddStaticHttpClientProxies(typeof(BloggingAdminApplicationContractsModule).Assembly,
BloggingAdminRemoteServiceConsts.RemoteServiceName);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BloggingAdminHttpApiClientModule>();
});
}
}

24
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs

@ -0,0 +1,24 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Files;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
public partial class BlogFilesClientProxy
{
public virtual async Task<RawFileDto> GetAsync(string name)
{
return await RequestAsync<RawFileDto>(nameof(GetAsync), name);
}
public virtual async Task<FileUploadOutputDto> CreateAsync(FileUploadInputDto input)
{
return await RequestAsync<FileUploadOutputDto>(nameof(CreateAsync), input);
}
}
}

13
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Files;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IFileAppService), typeof(BlogFilesClientProxy))]
public partial class BlogFilesClientProxy : ClientProxyBase<IFileAppService>, IFileAppService
{
}
}

30
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs

@ -0,0 +1,30 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Blogs;
using Volo.Blogging.Blogs.Dtos;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
public partial class BlogsClientProxy
{
public virtual async Task<ListResultDto<BlogDto>> GetListAsync()
{
return await RequestAsync<ListResultDto<BlogDto>>(nameof(GetListAsync));
}
public virtual async Task<BlogDto> GetByShortNameAsync(string shortName)
{
return await RequestAsync<BlogDto>(nameof(GetByShortNameAsync), shortName);
}
public virtual async Task<BlogDto> GetAsync(Guid id)
{
return await RequestAsync<BlogDto>(nameof(GetAsync), id);
}
}
}

13
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogAppService), typeof(BlogsClientProxy))]
public partial class BlogsClientProxy : ClientProxyBase<IBlogAppService>, IBlogAppService
{
}
}

36
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs

@ -0,0 +1,36 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Comments;
using System.Collections.Generic;
using Volo.Blogging.Comments.Dtos;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
public partial class CommentsClientProxy
{
public virtual async Task<List<CommentWithRepliesDto>> GetHierarchicalListOfPostAsync(Guid postId)
{
return await RequestAsync<List<CommentWithRepliesDto>>(nameof(GetHierarchicalListOfPostAsync), postId);
}
public virtual async Task<CommentWithDetailsDto> CreateAsync(CreateCommentDto input)
{
return await RequestAsync<CommentWithDetailsDto>(nameof(CreateAsync), input);
}
public virtual async Task<CommentWithDetailsDto> UpdateAsync(Guid id, UpdateCommentDto input)
{
return await RequestAsync<CommentWithDetailsDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICommentAppService), typeof(CommentsClientProxy))]
public partial class CommentsClientProxy : ClientProxyBase<ICommentAppService>, ICommentAppService
{
}
}

49
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs

@ -0,0 +1,49 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Posts;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
public partial class PostsClientProxy
{
public virtual async Task<ListResultDto<PostWithDetailsDto>> GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName)
{
return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetListByBlogIdAndTagNameAsync), blogId, tagName);
}
public virtual async Task<ListResultDto<PostWithDetailsDto>> GetTimeOrderedListAsync(Guid blogId)
{
return await RequestAsync<ListResultDto<PostWithDetailsDto>>(nameof(GetTimeOrderedListAsync), blogId);
}
public virtual async Task<PostWithDetailsDto> GetForReadingAsync(GetPostInput input)
{
return await RequestAsync<PostWithDetailsDto>(nameof(GetForReadingAsync), input);
}
public virtual async Task<PostWithDetailsDto> GetAsync(Guid id)
{
return await RequestAsync<PostWithDetailsDto>(nameof(GetAsync), id);
}
public virtual async Task<PostWithDetailsDto> CreateAsync(CreatePostDto input)
{
return await RequestAsync<PostWithDetailsDto>(nameof(CreateAsync), input);
}
public virtual async Task<PostWithDetailsDto> UpdateAsync(Guid id, UpdatePostDto input)
{
return await RequestAsync<PostWithDetailsDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Posts;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPostAppService), typeof(PostsClientProxy))]
public partial class PostsClientProxy : ClientProxyBase<IPostAppService>, IPostAppService
{
}
}

21
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs

@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Blogging.Tagging;
using System.Collections.Generic;
using Volo.Blogging.Tagging.Dtos;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
public partial class TagsClientProxy
{
public virtual async Task<List<TagDto>> GetPopularTagsAsync(Guid blogId, GetPopularTagsInput input)
{
return await RequestAsync<List<TagDto>>(nameof(GetPopularTagsAsync), blogId, input);
}
}
}

13
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Blogging.Tagging;
// ReSharper disable once CheckNamespace
namespace Volo.Blogging.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITagAppService), typeof(TagsClientProxy))]
public partial class TagsClientProxy : ClientProxyBase<ITagAppService>, ITagAppService
{
}
}

851
modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/blogging-generate-proxy.json

@ -0,0 +1,851 @@
{
"modules": {
"blogging": {
"rootPath": "blogging",
"remoteServiceName": "Blogging",
"controllers": {
"Volo.Blogging.BlogFilesController": {
"controllerName": "BlogFiles",
"type": "Volo.Blogging.BlogFilesController",
"interfaces": [
{
"type": "Volo.Blogging.Files.IFileAppService"
}
],
"actions": {
"GetAsyncByName": {
"uniqueName": "GetAsyncByName",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/blogging/files/{name}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "name",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "name",
"name": "name",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Files.RawFileDto",
"typeSimple": "Volo.Blogging.Files.RawFileDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Files.IFileAppService"
},
"GetForWebAsyncByName": {
"uniqueName": "GetForWebAsyncByName",
"name": "GetForWebAsync",
"httpMethod": "GET",
"url": "api/blogging/files/www/{name}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "name",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "name",
"name": "name",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Microsoft.AspNetCore.Mvc.FileResult",
"typeSimple": "Microsoft.AspNetCore.Mvc.FileResult"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.BlogFilesController"
},
"CreateAsyncByInput": {
"uniqueName": "CreateAsyncByInput",
"name": "CreateAsync",
"httpMethod": "POST",
"url": "api/blogging/files",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Blogging.Files.FileUploadInputDto, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Files.FileUploadInputDto",
"typeSimple": "Volo.Blogging.Files.FileUploadInputDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Files.FileUploadInputDto",
"typeSimple": "Volo.Blogging.Files.FileUploadInputDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Files.FileUploadOutputDto",
"typeSimple": "Volo.Blogging.Files.FileUploadOutputDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Files.IFileAppService"
},
"UploadImageByFile": {
"uniqueName": "UploadImageByFile",
"name": "UploadImage",
"httpMethod": "POST",
"url": "api/blogging/files/images/upload",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "file",
"typeAsString": "Microsoft.AspNetCore.Http.IFormFile, Microsoft.AspNetCore.Http.Features",
"type": "Microsoft.AspNetCore.Http.IFormFile",
"typeSimple": "Microsoft.AspNetCore.Http.IFormFile",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "file",
"name": "file",
"jsonName": null,
"type": "Microsoft.AspNetCore.Http.IFormFile",
"typeSimple": "Microsoft.AspNetCore.Http.IFormFile",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "FormFile",
"descriptorName": ""
}
],
"returnValue": {
"type": "Microsoft.AspNetCore.Mvc.JsonResult",
"typeSimple": "Microsoft.AspNetCore.Mvc.JsonResult"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.BlogFilesController"
}
}
},
"Volo.Blogging.BlogsController": {
"controllerName": "Blogs",
"type": "Volo.Blogging.BlogsController",
"interfaces": [
{
"type": "Volo.Blogging.Blogs.IBlogAppService"
}
],
"actions": {
"GetListAsync": {
"uniqueName": "GetListAsync",
"name": "GetListAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Blogs.Dtos.BlogDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Blogs.Dtos.BlogDto>"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Blogs.IBlogAppService"
},
"GetByShortNameAsyncByShortName": {
"uniqueName": "GetByShortNameAsyncByShortName",
"name": "GetByShortNameAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs/by-shortname/{shortName}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "shortName",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "shortName",
"name": "shortName",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Blogs.Dtos.BlogDto",
"typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Blogs.IBlogAppService"
},
"GetAsyncById": {
"uniqueName": "GetAsyncById",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/blogging/blogs/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Blogs.Dtos.BlogDto",
"typeSimple": "Volo.Blogging.Blogs.Dtos.BlogDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Blogs.IBlogAppService"
}
}
},
"Volo.Blogging.CommentsController": {
"controllerName": "Comments",
"type": "Volo.Blogging.CommentsController",
"interfaces": [
{
"type": "Volo.Blogging.Comments.ICommentAppService"
}
],
"actions": {
"GetHierarchicalListOfPostAsyncByPostId": {
"uniqueName": "GetHierarchicalListOfPostAsyncByPostId",
"name": "GetHierarchicalListOfPostAsync",
"httpMethod": "GET",
"url": "api/blogging/comments/hierarchical/{postId}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "postId",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "postId",
"name": "postId",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.Blogging.Comments.Dtos.CommentWithRepliesDto>",
"typeSimple": "[Volo.Blogging.Comments.Dtos.CommentWithRepliesDto]"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Comments.ICommentAppService"
},
"CreateAsyncByInput": {
"uniqueName": "CreateAsyncByInput",
"name": "CreateAsync",
"httpMethod": "POST",
"url": "api/blogging/comments",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Blogging.Comments.Dtos.CreateCommentDto, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Comments.Dtos.CreateCommentDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.CreateCommentDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Comments.Dtos.CreateCommentDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.CreateCommentDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Comments.ICommentAppService"
},
"UpdateAsyncByIdAndInput": {
"uniqueName": "UpdateAsyncByIdAndInput",
"name": "UpdateAsync",
"httpMethod": "PUT",
"url": "api/blogging/comments/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.Blogging.Comments.Dtos.UpdateCommentDto, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Comments.Dtos.UpdateCommentDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.UpdateCommentDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Comments.Dtos.UpdateCommentDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.UpdateCommentDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto",
"typeSimple": "Volo.Blogging.Comments.Dtos.CommentWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Comments.ICommentAppService"
},
"DeleteAsyncById": {
"uniqueName": "DeleteAsyncById",
"name": "DeleteAsync",
"httpMethod": "DELETE",
"url": "api/blogging/comments/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Comments.ICommentAppService"
}
}
},
"Volo.Blogging.PostsController": {
"controllerName": "Posts",
"type": "Volo.Blogging.PostsController",
"interfaces": [
{
"type": "Volo.Blogging.Posts.IPostAppService"
}
],
"actions": {
"GetListByBlogIdAndTagNameAsyncByBlogIdAndTagName": {
"uniqueName": "GetListByBlogIdAndTagNameAsyncByBlogIdAndTagName",
"name": "GetListByBlogIdAndTagNameAsync",
"httpMethod": "GET",
"url": "api/blogging/posts/{blogId}/all",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "blogId",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "tagName",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "blogId",
"name": "blogId",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "tagName",
"name": "tagName",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Posts.PostWithDetailsDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Posts.PostWithDetailsDto>"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"GetTimeOrderedListAsyncByBlogId": {
"uniqueName": "GetTimeOrderedListAsyncByBlogId",
"name": "GetTimeOrderedListAsync",
"httpMethod": "GET",
"url": "api/blogging/posts/{blogId}/all/by-time",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "blogId",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "blogId",
"name": "blogId",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Posts.PostWithDetailsDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.Blogging.Posts.PostWithDetailsDto>"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"GetForReadingAsyncByInput": {
"uniqueName": "GetForReadingAsyncByInput",
"name": "GetForReadingAsync",
"httpMethod": "GET",
"url": "api/blogging/posts/read",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Blogging.Posts.GetPostInput, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Posts.GetPostInput",
"typeSimple": "Volo.Blogging.Posts.GetPostInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "Url",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
},
{
"nameOnMethod": "input",
"name": "BlogId",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
}
],
"returnValue": {
"type": "Volo.Blogging.Posts.PostWithDetailsDto",
"typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"GetAsyncById": {
"uniqueName": "GetAsyncById",
"name": "GetAsync",
"httpMethod": "GET",
"url": "api/blogging/posts/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Posts.PostWithDetailsDto",
"typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"CreateAsyncByInput": {
"uniqueName": "CreateAsyncByInput",
"name": "CreateAsync",
"httpMethod": "POST",
"url": "api/blogging/posts",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "Volo.Blogging.Posts.CreatePostDto, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Posts.CreatePostDto",
"typeSimple": "Volo.Blogging.Posts.CreatePostDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Posts.CreatePostDto",
"typeSimple": "Volo.Blogging.Posts.CreatePostDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Posts.PostWithDetailsDto",
"typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"UpdateAsyncByIdAndInput": {
"uniqueName": "UpdateAsyncByIdAndInput",
"name": "UpdateAsync",
"httpMethod": "PUT",
"url": "api/blogging/posts/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.Blogging.Posts.UpdatePostDto, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Posts.UpdatePostDto",
"typeSimple": "Volo.Blogging.Posts.UpdatePostDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "Volo.Blogging.Posts.UpdatePostDto",
"typeSimple": "Volo.Blogging.Posts.UpdatePostDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "Volo.Blogging.Posts.PostWithDetailsDto",
"typeSimple": "Volo.Blogging.Posts.PostWithDetailsDto"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
},
"DeleteAsyncById": {
"uniqueName": "DeleteAsyncById",
"name": "DeleteAsync",
"httpMethod": "DELETE",
"url": "api/blogging/posts/{id}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "id",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "id",
"name": "id",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Posts.IPostAppService"
}
}
},
"Volo.Blogging.TagsController": {
"controllerName": "Tags",
"type": "Volo.Blogging.TagsController",
"interfaces": [
{
"type": "Volo.Blogging.Tagging.ITagAppService"
}
],
"actions": {
"GetPopularTagsAsyncByBlogIdAndInput": {
"uniqueName": "GetPopularTagsAsyncByBlogIdAndInput",
"name": "GetPopularTagsAsync",
"httpMethod": "GET",
"url": "api/blogging/tags/popular/{blogId}",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "blogId",
"typeAsString": "System.Guid, System.Private.CoreLib",
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput, Volo.Blogging.Application.Contracts",
"type": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput",
"typeSimple": "Volo.Blogging.Tagging.Dtos.GetPopularTagsInput",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "blogId",
"name": "blogId",
"jsonName": null,
"type": "System.Guid",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "ResultCount",
"jsonName": null,
"type": "System.Int32",
"typeSimple": "number",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
},
{
"nameOnMethod": "input",
"name": "MinimumPostCount",
"jsonName": null,
"type": "System.Int32?",
"typeSimple": "number?",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": "input"
}
],
"returnValue": {
"type": "System.Collections.Generic.List<Volo.Blogging.Tagging.Dtos.TagDto>",
"typeSimple": "[Volo.Blogging.Tagging.Dtos.TagDto]"
},
"allowAnonymous": null,
"implementFrom": "Volo.Blogging.Tagging.ITagAppService"
}
}
}
}
}
},
"types": {}
}

8
modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo/Blogging/BloggingHttpApiClientModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Blogging
{
@ -11,8 +12,13 @@ namespace Volo.Blogging
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly,
context.Services.AddStaticHttpClientProxies(typeof(BloggingApplicationContractsModule).Assembly,
BloggingRemoteServiceConsts.RemoteServiceName);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BloggingHttpApiClientModule>();
});
}
}

4
modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Properties/launchSettings.json

@ -1,4 +1,4 @@
{
 {
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
@ -24,4 +24,4 @@
}
}
}
}
}

4
modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json

@ -3,8 +3,8 @@
"CorsOrigins": "https://*.CmsKit.com,http://localhost:4200"
},
"ConnectionStrings": {
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True",
"CmsKit": "Server=localhost;Database=CmsKit_Module;Trusted_Connection=True"
"Default": "Server=(localdb)\\.\\MSSQLLocalDB;Database=CmsKit_Main;Trusted_Connection=True",
"CmsKit": "Server=(localdb)\\.\\MSSQLLocalDB;Database=CmsKit_Module;Trusted_Connection=True"
},
"Redis": {
"Configuration": "127.0.0.1"

2
modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json

@ -5,7 +5,7 @@
},
"AppSelfUrl": "https://localhost:44318/",
"ConnectionStrings": {
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True"
"Default": "Server=(localdb)\\.\\MSSQLLocalDB;Database=CmsKit_Main;Trusted_Connection=True"
},
"Redis": {
"Configuration": "127.0.0.1"

39
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs

@ -0,0 +1,39 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
public partial class BlogAdminClientProxy
{
public virtual async Task<BlogDto> GetAsync(Guid id)
{
return await RequestAsync<BlogDto>(nameof(GetAsync), id);
}
public virtual async Task<PagedResultDto<BlogDto>> GetListAsync(BlogGetListInput input)
{
return await RequestAsync<PagedResultDto<BlogDto>>(nameof(GetListAsync), input);
}
public virtual async Task<BlogDto> CreateAsync(CreateBlogDto input)
{
return await RequestAsync<BlogDto>(nameof(CreateAsync), input);
}
public virtual async Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input)
{
return await RequestAsync<BlogDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogAdminAppService), typeof(BlogAdminClientProxy))]
public partial class BlogAdminClientProxy : ClientProxyBase<IBlogAdminAppService>, IBlogAdminAppService
{
}
}

26
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs

@ -0,0 +1,26 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Blogs;
using System.Collections.Generic;
using Volo.CmsKit.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
public partial class BlogFeatureAdminClientProxy
{
public virtual async Task<List<BlogFeatureDto>> GetListAsync(Guid blogId)
{
return await RequestAsync<List<BlogFeatureDto>>(nameof(GetListAsync), blogId);
}
public virtual async Task SetAsync(Guid blogId, BlogFeatureInputDto dto)
{
await RequestAsync(nameof(SetAsync), blogId, dto);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogFeatureAdminAppService), typeof(BlogFeatureAdminClientProxy))]
public partial class BlogFeatureAdminClientProxy : ClientProxyBase<IBlogFeatureAdminAppService>, IBlogFeatureAdminAppService
{
}
}

39
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs

@ -0,0 +1,39 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
public partial class BlogPostAdminClientProxy
{
public virtual async Task<BlogPostDto> CreateAsync(CreateBlogPostDto input)
{
return await RequestAsync<BlogPostDto>(nameof(CreateAsync), input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
public virtual async Task<BlogPostDto> GetAsync(Guid id)
{
return await RequestAsync<BlogPostDto>(nameof(GetAsync), id);
}
public virtual async Task<PagedResultDto<BlogPostListDto>> GetListAsync(BlogPostGetListInput input)
{
return await RequestAsync<PagedResultDto<BlogPostListDto>>(nameof(GetListAsync), input);
}
public virtual async Task<BlogPostDto> UpdateAsync(Guid id, UpdateBlogPostDto input)
{
return await RequestAsync<BlogPostDto>(nameof(UpdateAsync), id, input);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Blogs.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogPostAdminAppService), typeof(BlogPostAdminClientProxy))]
public partial class BlogPostAdminClientProxy : ClientProxyBase<IBlogPostAdminAppService>, IBlogPostAdminAppService
{
}
}

29
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs

@ -0,0 +1,29 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Comments.ClientProxies
{
public partial class CommentAdminClientProxy
{
public virtual async Task<PagedResultDto<CommentWithAuthorDto>> GetListAsync(CommentGetListInput input)
{
return await RequestAsync<PagedResultDto<CommentWithAuthorDto>>(nameof(GetListAsync), input);
}
public virtual async Task<CommentWithAuthorDto> GetAsync(Guid id)
{
return await RequestAsync<CommentWithAuthorDto>(nameof(GetAsync), id);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Comments.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICommentAdminAppService), typeof(CommentAdminClientProxy))]
public partial class CommentAdminClientProxy : ClientProxyBase<ICommentAdminAppService>, ICommentAdminAppService
{
}
}

29
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs

@ -0,0 +1,29 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Tags;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Tags.ClientProxies
{
public partial class EntityTagAdminClientProxy
{
public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input)
{
await RequestAsync(nameof(AddTagToEntityAsync), input);
}
public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input)
{
await RequestAsync(nameof(RemoveTagFromEntityAsync), input);
}
public virtual async Task SetEntityTagsAsync(EntityTagSetDto input)
{
await RequestAsync(nameof(SetEntityTagsAsync), input);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Tags;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Tags.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IEntityTagAdminAppService), typeof(EntityTagAdminClientProxy))]
public partial class EntityTagAdminClientProxy : ClientProxyBase<IEntityTagAdminAppService>, IEntityTagAdminAppService
{
}
}

24
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs

@ -0,0 +1,24 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.MediaDescriptors;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies
{
public partial class MediaDescriptorAdminClientProxy
{
public virtual async Task<MediaDescriptorDto> CreateAsync(string entityType, CreateMediaInputWithStream inputStream)
{
return await RequestAsync<MediaDescriptorDto>(nameof(CreateAsync), entityType, inputStream);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.MediaDescriptors;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMediaDescriptorAdminAppService), typeof(MediaDescriptorAdminClientProxy))]
public partial class MediaDescriptorAdminClientProxy : ClientProxyBase<IMediaDescriptorAdminAppService>, IMediaDescriptorAdminAppService
{
}
}

50
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs

@ -0,0 +1,50 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Menus;
using Volo.CmsKit.Menus;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Menus.ClientProxies
{
public partial class MenuItemAdminClientProxy
{
public virtual async Task<ListResultDto<MenuItemDto>> GetListAsync()
{
return await RequestAsync<ListResultDto<MenuItemDto>>(nameof(GetListAsync));
}
public virtual async Task<MenuItemDto> GetAsync(Guid id)
{
return await RequestAsync<MenuItemDto>(nameof(GetAsync), id);
}
public virtual async Task<MenuItemDto> CreateAsync(MenuItemCreateInput input)
{
return await RequestAsync<MenuItemDto>(nameof(CreateAsync), input);
}
public virtual async Task<MenuItemDto> UpdateAsync(Guid id, MenuItemUpdateInput input)
{
return await RequestAsync<MenuItemDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
public virtual async Task MoveMenuItemAsync(Guid id, MenuItemMoveInput input)
{
await RequestAsync(nameof(MoveMenuItemAsync), id, input);
}
public virtual async Task<PagedResultDto<PageLookupDto>> GetPageLookupAsync(PageLookupInputDto input)
{
return await RequestAsync<PagedResultDto<PageLookupDto>>(nameof(GetPageLookupAsync), input);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Menus;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Menus.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMenuItemAdminAppService), typeof(MenuItemAdminClientProxy))]
public partial class MenuItemAdminClientProxy : ClientProxyBase<IMenuItemAdminAppService>, IMenuItemAdminAppService
{
}
}

39
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs

@ -0,0 +1,39 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Pages;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Pages.ClientProxies
{
public partial class PageAdminClientProxy
{
public virtual async Task<PageDto> GetAsync(Guid id)
{
return await RequestAsync<PageDto>(nameof(GetAsync), id);
}
public virtual async Task<PagedResultDto<PageDto>> GetListAsync(GetPagesInputDto input)
{
return await RequestAsync<PagedResultDto<PageDto>>(nameof(GetListAsync), input);
}
public virtual async Task<PageDto> CreateAsync(CreatePageInputDto input)
{
return await RequestAsync<PageDto>(nameof(CreateAsync), input);
}
public virtual async Task<PageDto> UpdateAsync(Guid id, UpdatePageInputDto input)
{
return await RequestAsync<PageDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Pages;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Pages.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPageAdminAppService), typeof(PageAdminClientProxy))]
public partial class PageAdminClientProxy : ClientProxyBase<IPageAdminAppService>, IPageAdminAppService
{
}
}

46
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs

@ -0,0 +1,46 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Admin.Tags;
using Volo.CmsKit.Tags;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Tags.ClientProxies
{
public partial class TagAdminClientProxy
{
public virtual async Task<TagDto> CreateAsync(TagCreateDto input)
{
return await RequestAsync<TagDto>(nameof(CreateAsync), input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
public virtual async Task<TagDto> GetAsync(Guid id)
{
return await RequestAsync<TagDto>(nameof(GetAsync), id);
}
public virtual async Task<PagedResultDto<TagDto>> GetListAsync(TagGetListInput input)
{
return await RequestAsync<PagedResultDto<TagDto>>(nameof(GetListAsync), input);
}
public virtual async Task<TagDto> UpdateAsync(Guid id, TagUpdateDto input)
{
return await RequestAsync<TagDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task<List<TagDefinitionDto>> GetTagDefinitionsAsync()
{
return await RequestAsync<List<TagDefinitionDto>>(nameof(GetTagDefinitionsAsync));
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Admin.Tags;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Admin.Tags.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITagAdminAppService), typeof(TagAdminClientProxy))]
public partial class TagAdminClientProxy : ClientProxyBase<ITagAdminAppService>, ITagAdminAppService
{
}
}

3028
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json

File diff suppressed because it is too large

8
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/Volo/CmsKit/Admin/CmsKitAdminHttpApiClientModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.CmsKit.Admin
{
@ -11,10 +12,15 @@ namespace Volo.CmsKit.Admin
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
context.Services.AddStaticHttpClientProxies(
typeof(CmsKitAdminApplicationContractsModule).Assembly,
CmsKitAdminRemoteServiceConsts.RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<CmsKitAdminHttpApiClientModule>();
});
}
}
}

2
modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/Volo/CmsKit/CmsKitCommonHttpApiClientModule.cs

@ -12,7 +12,7 @@ namespace Volo.CmsKit
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
context.Services.AddStaticHttpClientProxies(
typeof(CmsKitCommonApplicationContractsModule).Assembly,
CmsKitCommonRemoteServiceConsts.RemoteServiceName
);

19
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs

@ -0,0 +1,19 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Blogs.ClientProxies
{
public partial class BlogFeatureClientProxy
{
public virtual async Task<BlogFeatureDto> GetOrDefaultAsync(Guid blogId, string featureName)
{
return await RequestAsync<BlogFeatureDto>(nameof(GetOrDefaultAsync), blogId, featureName);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Blogs.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogFeatureAppService), typeof(BlogFeatureClientProxy))]
public partial class BlogFeatureClientProxy : ClientProxyBase<IBlogFeatureAppService>, IBlogFeatureAppService
{
}
}

24
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs

@ -0,0 +1,24 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Blogs.ClientProxies
{
public partial class BlogPostPublicClientProxy
{
public virtual async Task<BlogPostPublicDto> GetAsync(string blogSlug, string blogPostSlug)
{
return await RequestAsync<BlogPostPublicDto>(nameof(GetAsync), blogSlug, blogPostSlug);
}
public virtual async Task<PagedResultDto<BlogPostPublicDto>> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input)
{
return await RequestAsync<PagedResultDto<BlogPostPublicDto>>(nameof(GetListAsync), blogSlug, input);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Blogs;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Blogs.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBlogPostPublicAppService), typeof(BlogPostPublicClientProxy))]
public partial class BlogPostPublicClientProxy : ClientProxyBase<IBlogPostPublicAppService>, IBlogPostPublicAppService
{
}
}

34
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs

@ -0,0 +1,34 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies
{
public partial class CommentPublicClientProxy
{
public virtual async Task<ListResultDto<CommentWithDetailsDto>> GetListAsync(string entityType, string entityId)
{
return await RequestAsync<ListResultDto<CommentWithDetailsDto>>(nameof(GetListAsync), entityType, entityId);
}
public virtual async Task<CommentDto> CreateAsync(string entityType, string entityId, CreateCommentInput input)
{
return await RequestAsync<CommentDto>(nameof(CreateAsync), entityType, entityId, input);
}
public virtual async Task<CommentDto> UpdateAsync(Guid id, UpdateCommentInput input)
{
return await RequestAsync<CommentDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Comments;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Comments.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))]
public partial class CommentPublicClientProxy : ClientProxyBase<ICommentPublicAppService>, ICommentPublicAppService
{
}
}

20
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs

@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.MediaDescriptors;
using Volo.Abp.Content;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.MediaDescriptors.ClientProxies
{
public partial class MediaDescriptorClientProxy
{
public virtual async Task<RemoteStreamContent> DownloadAsync(Guid id)
{
return await RequestAsync<RemoteStreamContent>(nameof(DownloadAsync), id);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.MediaDescriptors;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.MediaDescriptors.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMediaDescriptorAppService), typeof(MediaDescriptorClientProxy))]
public partial class MediaDescriptorClientProxy : ClientProxyBase<IMediaDescriptorAppService>, IMediaDescriptorAppService
{
}
}

21
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.Generated.cs

@ -0,0 +1,21 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Menus;
using System.Collections.Generic;
using Volo.CmsKit.Menus;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Menus.ClientProxies
{
public partial class MenuItemPublicClientProxy
{
public virtual async Task<List<MenuItemDto>> GetListAsync()
{
return await RequestAsync<List<MenuItemDto>>(nameof(GetListAsync));
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/MenuItemPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Menus;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Menus.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMenuItemPublicAppService), typeof(MenuItemPublicClientProxy))]
public partial class MenuItemPublicClientProxy : ClientProxyBase<IMenuItemPublicAppService>, IMenuItemPublicAppService
{
}
}

19
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs

@ -0,0 +1,19 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Pages;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Pages.ClientProxies
{
public partial class PagesPublicClientProxy
{
public virtual async Task<PageDto> FindBySlugAsync(string slug)
{
return await RequestAsync<PageDto>(nameof(FindBySlugAsync), slug);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Pages;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Pages.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPagePublicAppService), typeof(PagesPublicClientProxy))]
public partial class PagesPublicClientProxy : ClientProxyBase<IPagePublicAppService>, IPagePublicAppService
{
}
}

30
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs

@ -0,0 +1,30 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Ratings;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies
{
public partial class RatingPublicClientProxy
{
public virtual async Task<RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input)
{
return await RequestAsync<RatingDto>(nameof(CreateAsync), entityType, entityId, input);
}
public virtual async Task DeleteAsync(string entityType, string entityId)
{
await RequestAsync(nameof(DeleteAsync), entityType, entityId);
}
public virtual async Task<List<RatingWithStarCountDto>> GetGroupedStarCountsAsync(string entityType, string entityId)
{
return await RequestAsync<List<RatingWithStarCountDto>>(nameof(GetGroupedStarCountsAsync), entityType, entityId);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Ratings;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Ratings.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))]
public partial class RatingPublicClientProxy : ClientProxyBase<IRatingPublicAppService>, IRatingPublicAppService
{
}
}

29
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs

@ -0,0 +1,29 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Public.Reactions;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Reactions.ClientProxies
{
public partial class ReactionPublicClientProxy
{
public virtual async Task<ListResultDto<ReactionWithSelectionDto>> GetForSelectionAsync(string entityType, string entityId)
{
return await RequestAsync<ListResultDto<ReactionWithSelectionDto>>(nameof(GetForSelectionAsync), entityType, entityId);
}
public virtual async Task CreateAsync(string entityType, string entityId, string reaction)
{
await RequestAsync(nameof(CreateAsync), entityType, entityId, reaction);
}
public virtual async Task DeleteAsync(string entityType, string entityId, string reaction)
{
await RequestAsync(nameof(DeleteAsync), entityType, entityId, reaction);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Public.Reactions;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Reactions.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IReactionPublicAppService), typeof(ReactionPublicClientProxy))]
public partial class ReactionPublicClientProxy : ClientProxyBase<IReactionPublicAppService>, IReactionPublicAppService
{
}
}

20
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs

@ -0,0 +1,20 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.CmsKit.Tags;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Tags.ClientProxies
{
public partial class TagPublicClientProxy
{
public virtual async Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId)
{
return await RequestAsync<List<TagDto>>(nameof(GetAllRelatedTagsAsync), entityType, entityId);
}
}
}

13
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.CmsKit.Tags;
// ReSharper disable once CheckNamespace
namespace Volo.CmsKit.Public.Tags.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITagAppService), typeof(TagPublicClientProxy))]
public partial class TagPublicClientProxy : ClientProxyBase<ITagAppService>, ITagAppService
{
}
}

3028
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json

File diff suppressed because it is too large

8
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/Volo/CmsKit/Public/CmsKitPublicHttpApiClientModule.cs

@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.CmsKit.Public
{
@ -11,10 +12,15 @@ namespace Volo.CmsKit.Public
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
context.Services.AddStaticHttpClientProxies(
typeof(CmsKitPublicApplicationContractsModule).Assembly,
CmsKitPublicRemoteServiceConsts.RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<CmsKitPublicHttpApiClientModule>();
});
}
}
}

2
modules/docs/app/VoloDocs.Migrator/appsettings.json

@ -1,3 +1,3 @@
{
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True"
"ConnectionString": "Server=(localdb)\\.\\MSSQLLocalDB;Database=VoloDocs;Trusted_Connection=True"
}

2
modules/docs/app/VoloDocs.Web/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True",
"ConnectionString": "Server=(localdb)\\.\\MSSQLLocalDB;Database=VoloDocs;Trusted_Connection=True",
"ElasticSearch": {
"Url": "http://localhost:9200"
},

44
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs

@ -0,0 +1,44 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Docs.Admin.Documents;
// ReSharper disable once CheckNamespace
namespace Volo.Docs.Admin.ClientProxies
{
public partial class DocumentsAdminClientProxy
{
public virtual async Task ClearCacheAsync(ClearCacheInput input)
{
await RequestAsync(nameof(ClearCacheAsync), input);
}
public virtual async Task PullAllAsync(PullAllDocumentInput input)
{
await RequestAsync(nameof(PullAllAsync), input);
}
public virtual async Task PullAsync(PullDocumentInput input)
{
await RequestAsync(nameof(PullAsync), input);
}
public virtual async Task<PagedResultDto<DocumentDto>> GetAllAsync(GetAllInput input)
{
return await RequestAsync<PagedResultDto<DocumentDto>>(nameof(GetAllAsync), input);
}
public virtual async Task RemoveFromCacheAsync(Guid documentId)
{
await RequestAsync(nameof(RemoveFromCacheAsync), documentId);
}
public virtual async Task ReindexAsync(Guid documentId)
{
await RequestAsync(nameof(ReindexAsync), documentId);
}
}
}

13
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Docs.Admin.Documents;
// ReSharper disable once CheckNamespace
namespace Volo.Docs.Admin.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IDocumentAdminAppService), typeof(DocumentsAdminClientProxy))]
public partial class DocumentsAdminClientProxy : ClientProxyBase<IDocumentAdminAppService>, IDocumentAdminAppService
{
}
}

49
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs

@ -0,0 +1,49 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling;
using Volo.Docs.Admin.Projects;
// ReSharper disable once CheckNamespace
namespace Volo.Docs.Admin.ClientProxies
{
public partial class ProjectsAdminClientProxy
{
public virtual async Task<PagedResultDto<ProjectDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
return await RequestAsync<PagedResultDto<ProjectDto>>(nameof(GetListAsync), input);
}
public virtual async Task<ProjectDto> GetAsync(Guid id)
{
return await RequestAsync<ProjectDto>(nameof(GetAsync), id);
}
public virtual async Task<ProjectDto> CreateAsync(CreateProjectDto input)
{
return await RequestAsync<ProjectDto>(nameof(CreateAsync), input);
}
public virtual async Task<ProjectDto> UpdateAsync(Guid id, UpdateProjectDto input)
{
return await RequestAsync<ProjectDto>(nameof(UpdateAsync), id, input);
}
public virtual async Task DeleteAsync(Guid id)
{
await RequestAsync(nameof(DeleteAsync), id);
}
public virtual async Task ReindexAllAsync()
{
await RequestAsync(nameof(ReindexAllAsync));
}
public virtual async Task ReindexAsync(ReindexInput input)
{
await RequestAsync(nameof(ReindexAsync), input);
}
}
}

13
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.cs

@ -0,0 +1,13 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying;
using Volo.Docs.Admin.Projects;
// ReSharper disable once CheckNamespace
namespace Volo.Docs.Admin.ClientProxies
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IProjectAdminAppService), typeof(ProjectsAdminClientProxy))]
public partial class ProjectsAdminClientProxy : ClientProxyBase<IProjectAdminAppService>, IProjectAdminAppService
{
}
}

1451
modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/docs-generate-proxy.json

File diff suppressed because it is too large

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save