Browse Source

Added Payment.HttpApi.Client

pull/69/head
Halil İbrahim Kalkan 5 years ago
parent
commit
0aa3b0c52d
  1. 7
      modules/payment/Payment.sln
  2. 53
      modules/payment/src/Payment.HttpApi.Client/ClientProxies/Payment-generate-proxy.json
  3. 28
      modules/payment/src/Payment.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs
  4. 8
      modules/payment/src/Payment.HttpApi.Client/ClientProxies/SampleClientProxy.cs
  5. 3
      modules/payment/src/Payment.HttpApi.Client/FodyWeavers.xml
  6. 30
      modules/payment/src/Payment.HttpApi.Client/FodyWeavers.xsd
  7. 20
      modules/payment/src/Payment.HttpApi.Client/Payment.HttpApi.Client.csproj
  8. 27
      modules/payment/src/Payment.HttpApi.Client/PaymentHttpApiClientModule.cs

7
modules/payment/Payment.sln

@ -41,6 +41,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "www", "www", "{D3FD0217-A8C
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{FC718EF0-43EB-4767-9578-95FA0B3727A5}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{FC718EF0-43EB-4767-9578-95FA0B3727A5}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.HttpApi.Client", "src\Payment.HttpApi.Client\Payment.HttpApi.Client.csproj", "{3FF65447-69D5-4115-8398-8156FB381215}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -91,6 +93,10 @@ Global
{3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU
{3FF65447-69D5-4115-8398-8156FB381215}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FF65447-69D5-4115-8398-8156FB381215}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FF65447-69D5-4115-8398-8156FB381215}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FF65447-69D5-4115-8398-8156FB381215}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -113,6 +119,7 @@ Global
{D3FD0217-A8C7-4BAF-BF77-962F1B055515} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} {D3FD0217-A8C7-4BAF-BF77-962F1B055515} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{90CB5DC4-C040-45C7-8900-9688B26405BC} = {D3FD0217-A8C7-4BAF-BF77-962F1B055515} {90CB5DC4-C040-45C7-8900-9688B26405BC} = {D3FD0217-A8C7-4BAF-BF77-962F1B055515}
{FC718EF0-43EB-4767-9578-95FA0B3727A5} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} {FC718EF0-43EB-4767-9578-95FA0B3727A5} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{3FF65447-69D5-4115-8398-8156FB381215} = {4EF8B98A-E7A3-48A6-9C1F-10DE32001213}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D} SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}

53
modules/payment/src/Payment.HttpApi.Client/ClientProxies/Payment-generate-proxy.json

@ -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": {}
}

28
modules/payment/src/Payment.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs

@ -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));
}
}
}

8
modules/payment/src/Payment.HttpApi.Client/ClientProxies/SampleClientProxy.cs

@ -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
{
}
}

3
modules/payment/src/Payment.HttpApi.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
modules/payment/src/Payment.HttpApi.Client/FodyWeavers.xsd

@ -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>

20
modules/payment/src/Payment.HttpApi.Client/Payment.HttpApi.Client.csproj

@ -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>

27
modules/payment/src/Payment.HttpApi.Client/PaymentHttpApiClientModule.cs

@ -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…
Cancel
Save