@@ -67,6 +67,16 @@ public class AnotherClass
67
67
public string [ ] List { get ; set ; }
68
68
}
69
69
70
+ public class DerivedClassWithShadowedProperty : AnotherClass
71
+ {
72
+ public new string Number { get ; set ; }
73
+ }
74
+
75
+ public class DerivedClassWithAnotherShadowedProperty : DerivedClassWithShadowedProperty
76
+ {
77
+ public new int Number { get ; set ; }
78
+ }
79
+
70
80
[ RoutePrefix ( "api/Test/{hole}/actions" ) ]
71
81
public class TestController : ApiController
72
82
{
@@ -83,14 +93,7 @@ public string Get([EncryptedInt] int id, string hole)
83
93
{
84
94
return $ "value { hole } / { id } ";
85
95
}
86
-
87
- //[HttpGet]
88
- //[Route("getty/{id:encryptedInt}")]
89
- //public string Getty(int id, string hole)
90
- //{
91
- // return $"{nameof(Getty)}: value {hole} / {id}";
92
- //}
93
-
96
+
94
97
[ HttpGet ]
95
98
[ Route ( "getSomething/{id}/ha" ) ]
96
99
public string GetSomething ( string hole , int id , DummyEnum y = DummyEnum . Bye )
@@ -113,6 +116,22 @@ public string Post(string hole, DummyClass value)
113
116
return $ "thanks for the { valueJson } in the { hole } ";
114
117
}
115
118
119
+ [ HttpPost ]
120
+ [ Route ( "derived" ) ]
121
+ public string Post ( string hole , DerivedClassWithShadowedProperty value )
122
+ {
123
+ var valueJson = JsonConvert . SerializeObject ( value ) ;
124
+ return $ "thanks for the { valueJson } in the { hole } ";
125
+ }
126
+
127
+ [ HttpPost ]
128
+ [ Route ( "derivedAgain" ) ]
129
+ public string Post ( string hole , DerivedClassWithAnotherShadowedProperty value )
130
+ {
131
+ var valueJson = JsonConvert . SerializeObject ( value ) ;
132
+ return $ "thanks for the { valueJson } in the { hole } ";
133
+ }
134
+
116
135
[ HttpPut ]
117
136
[ Route ( "{id}" ) ]
118
137
public string Put ( int id , [ FromBody ] string value , string hole )
0 commit comments