You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void is detected as class when preceeded by new instead of override.
expected coloring:
found another one for attributes:
[Required][Range(1,10)]publiclong PersId {get;set;}// above is the common short of this:[RequiredAttribute()][RangeAttribute(1,10)]publiclong PersId {get;set;}
This is indeed a real edge case, as these are constructor calls. the first one is a parameterless ctor,
the second one has 2 params.
expected coloring:
this one is another attribute problem:
[ValidatePath( AllowEmptyStrings =false, ErrorMessage ="must end with a slash")]publicstring SearchDir {get;set;}
here we have properties which are allowed to be set in the ctor call. those are not arguments for the ctor, but properties of the ValidatePathAttribute class.
So ValidatePath should be colored as class, AllowEmptyStrings as property.
expected coloring:
(maybe it looks different for you, I sepratated the coloroing for class and function into different colors in the css.)
(Seems as if github has its problems, too. It does some funny coloring, too. ;-) )
The text was updated successfully, but these errors were encountered:
Thanks for reporting.
As an introduction, remember that Prism is not a parser nor a linter, only a highlighter. It does not aim to be perfectly semantically accurate.
I played around with your examples a bit, and managed to end up with the following, where (for the sake of this example) functions are red and classes are dark green:
After #1365 has been fixed, classes are styled when they are passed as parameters.
There are more cases, where classes get no coloring:
generics:
expected coloring:
generics with lambdas:
expected coloring:
overridden methods:
void
is detected as class when preceeded bynew
instead ofoverride
.expected coloring:
found another one for attributes:
This is indeed a real edge case, as these are constructor calls. the first one is a parameterless ctor,
the second one has 2 params.
expected coloring:
this one is another attribute problem:
here we have properties which are allowed to be set in the ctor call. those are not arguments for the ctor, but properties of the
ValidatePathAttribute
class.So
ValidatePath
should be colored as class,AllowEmptyStrings
as property.expected coloring:
(maybe it looks different for you, I sepratated the coloroing for class and function into different colors in the css.)
(Seems as if github has its problems, too. It does some funny coloring, too. ;-) )
The text was updated successfully, but these errors were encountered: