mirror of https://github.com/abpframework/eventhub
8 changed files with 176 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||
{ |
|||
"modules": { |
|||
"Payment": { |
|||
"rootPath": "Payment", |
|||
"remoteServiceName": "Payment", |
|||
"controllers": { |
|||
"Payment.Samples.SampleController": { |
|||
"controllerName": "Sample", |
|||
"controllerGroupName": "Sample", |
|||
"type": "Payment.Samples.SampleController", |
|||
"interfaces": [ |
|||
{ |
|||
"type": "Payment.Samples.ISampleAppService" |
|||
} |
|||
], |
|||
"actions": { |
|||
"GetAsync": { |
|||
"uniqueName": "GetAsync", |
|||
"name": "GetAsync", |
|||
"httpMethod": "GET", |
|||
"url": "api/Payment/sample", |
|||
"supportedVersions": [], |
|||
"parametersOnMethod": [], |
|||
"parameters": [], |
|||
"returnValue": { |
|||
"type": "Payment.Samples.SampleDto", |
|||
"typeSimple": "Payment.Samples.SampleDto" |
|||
}, |
|||
"allowAnonymous": null, |
|||
"implementFrom": "Payment.Samples.ISampleAppService" |
|||
}, |
|||
"GetAuthorizedAsync": { |
|||
"uniqueName": "GetAuthorizedAsync", |
|||
"name": "GetAuthorizedAsync", |
|||
"httpMethod": "GET", |
|||
"url": "api/Payment/sample/authorized", |
|||
"supportedVersions": [], |
|||
"parametersOnMethod": [], |
|||
"parameters": [], |
|||
"returnValue": { |
|||
"type": "Payment.Samples.SampleDto", |
|||
"typeSimple": "Payment.Samples.SampleDto" |
|||
}, |
|||
"allowAnonymous": false, |
|||
"implementFrom": "Payment.Samples.ISampleAppService" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"types": {} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
|
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Http.Modeling; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Http.Client.ClientProxying; |
|||
using Payment.Samples; |
|||
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Payment.Samples.ClientProxies |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
[ExposeServices(typeof(ISampleAppService), typeof(SampleClientProxy))] |
|||
public partial class SampleClientProxy : ClientProxyBase<ISampleAppService>, ISampleAppService |
|||
{ |
|||
public virtual async Task<SampleDto> GetAsync() |
|||
{ |
|||
return await RequestAsync<SampleDto>(nameof(GetAsync)); |
|||
} |
|||
|
|||
public virtual async Task<SampleDto> GetAuthorizedAsync() |
|||
{ |
|||
return await RequestAsync<SampleDto>(nameof(GetAuthorizedAsync)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
// This file is part of SampleClientProxy, you can customize it here
|
|||
// ReSharper disable once CheckNamespace
|
|||
namespace Payment.Samples.ClientProxies |
|||
{ |
|||
public partial class SampleClientProxy |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait ContinueOnCapturedContext="false" /> |
|||
</Weavers> |
|||
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
|||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> |
|||
<xs:element name="Weavers"> |
|||
<xs:complexType> |
|||
<xs:all> |
|||
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> |
|||
<xs:complexType> |
|||
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> |
|||
</xs:complexType> |
|||
</xs:element> |
|||
</xs:all> |
|||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> |
|||
<xs:annotation> |
|||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> |
|||
<xs:annotation> |
|||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
<xs:attribute name="GenerateXsd" type="xs:boolean"> |
|||
<xs:annotation> |
|||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> |
|||
</xs:annotation> |
|||
</xs:attribute> |
|||
</xs:complexType> |
|||
</xs:element> |
|||
</xs:schema> |
|||
@ -0,0 +1,20 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>Payment</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.Http.Client" Version="5.0.0-beta.1" /> |
|||
<ProjectReference Include="..\Payment.Application.Contracts\Payment.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="**\*generate-proxy.json" /> |
|||
<Content Remove="**\*generate-proxy.json" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,27 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Http.Client; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace Payment |
|||
{ |
|||
[DependsOn( |
|||
typeof(PaymentApplicationContractsModule), |
|||
typeof(AbpHttpClientModule))] |
|||
public class PaymentHttpApiClientModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddStaticHttpClientProxies( |
|||
typeof(PaymentApplicationContractsModule).Assembly, |
|||
PaymentRemoteServiceConsts.RemoteServiceName |
|||
); |
|||
|
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<PaymentHttpApiClientModule>(); |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue