Skip to content

Commit 0eb5f57

Browse files
committed
other update
1 parent 1125f19 commit 0eb5f57

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

src/Common/Codelisk.GeneratorAttributes/Helper/AttributeHelper.cs

+27-10
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,36 @@ namespace Codelisk.GeneratorAttributes.Helper
77
{
88
public static class AttributeHelper
99
{
10-
public static Dictionary<Type, string> AllAttributesMethodeHeaderDictionary(string delete="Delete", string get="Get", string post="Post")
10+
public static Dictionary<Type, string> AllAttributesMethodeHeaderDictionary(
11+
string delete = "Delete",
12+
string get = "Get",
13+
string post = "Post"
14+
)
1115
{
1216
return new Dictionary<Type, string>
1317
{
14-
{typeof(GetAttribute), get },
15-
{typeof(GetLastAttribute), get },
16-
{typeof(GetFullAttribute), get },
17-
{typeof(GetAllAttribute), get },
18-
{typeof(GetAllFullAttribute), get },
19-
{typeof(SaveAttribute), post },
20-
{typeof(AddAttribute), post },
21-
{typeof(AddRangeAttribute), post },
22-
{typeof(DeleteAttribute), delete }
18+
{ typeof(GetAttribute), get },
19+
{ typeof(GetLastAttribute), get },
20+
{ typeof(GetFullAttribute), get },
21+
{ typeof(GetAllAttribute), get },
22+
{ typeof(GetAllFullAttribute), get },
23+
{ typeof(SaveAttribute), post },
24+
{ typeof(AddAttribute), post },
25+
{ typeof(AddRangeAttribute), post },
26+
{ typeof(DeleteAttribute), delete }
27+
};
28+
}
29+
30+
public static Dictionary<Type, string> AllFullAttributesMethodeHeaderDictionary(
31+
string delete = "Delete",
32+
string get = "Get",
33+
string post = "Post"
34+
)
35+
{
36+
return new Dictionary<Type, string>
37+
{
38+
{ typeof(GetFullAttribute), get },
39+
{ typeof(GetAllFullAttribute), get },
2340
};
2441
}
2542
}

src/Generators/Web/Codelisk.Controller.Generator/CodeBuilders/ControllerCodeBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ ClassWithMethods repoModel
8888
.First();
8989

9090
Dictionary<Type, string> methodsWithControllerAttributeName =
91-
AttributeHelper.AllAttributesMethodeHeaderDictionary(
91+
AttributeHelper.AllFullAttributesMethodeHeaderDictionary(
9292
Constants.HttpDeleteAttribute,
9393
Constants.HttpGetAttribute,
9494
Constants.HttpPostAttribute

0 commit comments

Comments
 (0)