mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
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}]";
|
|
}
|
|
}
|
|
|