Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Unassigned: A "public class" declared inside @functions is generated as a static class. [137]

$
0
0
In RazorGenerator 1.6.3 a construct such as the following:

@functions {

public class MyClass
{
public string SomeMember { get; set; }
}
}

will produce a public static class in the generated code.

If the public keyword is omitted (making the class private), the class is not generated as static.

Comments: We generate static Mvc helper types in Mvc 3. Newer versions do not have this transformation. 1. Are you targeting Mvc 3 in your project? If not, this might be an issue in our Mvc version detection mechanism. 2. Our heuristic for determining if you're generating a helper is by looking specifically for the string "Helper" in your file name. Is this the case? 3. Is this a new behavior you're seeing? Was this working earlier and has changed since upgrading to 1.6.3?

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>