-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14429 from abpframework/Proxy-Contracts
Generate DTOs in the client-side for static c# proxy generation.
- Loading branch information
Showing
8 changed files
with
444 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
506 changes: 348 additions & 158 deletions
506
.../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/InterfaceMethodApiDescriptionModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using JetBrains.Annotations; | ||
|
||
namespace Volo.Abp.Http.Modeling; | ||
|
||
[Serializable] | ||
public class InterfaceMethodApiDescriptionModel | ||
{ | ||
public string Name { get; set; } | ||
|
||
public IList<MethodParameterApiDescriptionModel> ParametersOnMethod { get; set; } | ||
|
||
public ReturnValueApiDescriptionModel ReturnValue { get; set; } | ||
|
||
public InterfaceMethodApiDescriptionModel() | ||
{ | ||
|
||
} | ||
|
||
public static InterfaceMethodApiDescriptionModel Create([NotNull] MethodInfo method) | ||
{ | ||
return new InterfaceMethodApiDescriptionModel | ||
{ | ||
Name = method.Name, | ||
ReturnValue = ReturnValueApiDescriptionModel.Create(method.ReturnType), | ||
ParametersOnMethod = method | ||
.GetParameters() | ||
.Select(MethodParameterApiDescriptionModel.Create) | ||
.ToList(), | ||
}; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"[InterfaceMethodApiDescriptionModel {Name}]"; | ||
} | ||
} |