scriptsharp icon indicating copy to clipboard operation
scriptsharp copied to clipboard

Support for string ScriptNames

Open dested opened this issue 12 years ago • 0 comments

An attribute like "Content-Type" has to be faked with Dictionary, instead of [ScriptName] being able to determining this key needs to be accessed as a hash (item["funky-key"] vs item.funky-key.

Setup:

...
[ScriptName("Content-Type")]
public int ContentType;
...

foo.ContentType="text/html";

Expected:

foo["Content-Type"]="text/html";

Actual:

foo.Content-Type="text/html";

I gave [ScriptName("['Content-Type']")] a try, but it caused numerous issues, obviously.

dested avatar Jul 17 '12 02:07 dested