- #362 and more - make a few more properties immutable - in a few cases, just remove `private` setters - in others, adjust consuming code to handle the changes - make `Equals()` commutative - use `GetType() == obj.GetType()` if necessary - use only immutable values in `GetHashCode()` calculations - avoid `object.GetHashCode()`; that calculates hash of reference - add warnings about `RazorError` property setters but use properties - BUT lack of immutable values leads to some static `GetHashCode()` calculations - correct important typo in `TagHelperDescriptorComparer` - ensure `Equals()` does not `throw` an NRE e.g. in `LineMapping` - add `SyntaxTreeNode.GetEquivalenceHash()` - make `SourceLocation.Equals()` and `SourceLocation.CompareTo()` consistent Update affected tests - code generators and edit handlers less likely to be equal; adjust expectations Add lots of tests - not for all updated classes but enough to see impact of odd choices nits: - remove some `Equals()` and `GetHashCode()` overrides in `SpanCodeGenerator` subclasses - no longer unique - remove redundant null checks e.g. when also done in `base.Equals()` - add `StringComparer.Ordinal` if `StringComparison.Ordinal` used in `Equals()` - make some `CSharpLineMappingWriter` fields `readonly` - remove unused `LineMapping` constructor |
||
|---|---|---|
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| NuGet.Config | ||
| README.md | ||
| Razor.sln | ||
| appveyor.yml | ||
| build.cmd | ||
| build.sh | ||
| global.json | ||
| makefile.shade | ||
README.md
Razor
The Razor syntax provides a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content. This repo contains the parser and the C# code generator for the Razor syntax.
This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.