tomkuijsten / restup

Webserver for universal windows platform (UWP) apps
MIT License
114 stars 48 forks source link

Structs on controller methods are not accepted #61

Closed tomkuijsten closed 8 years ago

tomkuijsten commented 8 years ago

I tried making a controller parameter a struct, which was not accepted (InvalidOperationException). Should this be a valid scenario?

tomkuijsten commented 8 years ago

Enum seems to have the same problem

tomkuijsten commented 8 years ago

I tested this with Enums (as [FromContent] parameter) and that worked fine.

Structs can't have public properties, because "windows runtime" structs can only contain public instance fields, see msdn for more info. My advice... don't use structs as parameter type.

tomkuijsten commented 8 years ago

Wiki updated