- extend the "test" target in our build to use new k-xml-docs-test.shade command
Example output with one syntax error and one invalid reference:
```
info: Target xml-docs-test
warn: Invalid documentation syntax in src\Microsoft.AspNet.Mvc.Core\bin\debug\net45\Microsoft.AspNet.Mvc.Core.xml
warn: 3170: <!-- Badly formed XML comment ignored for member "T:Microsoft.AspNet.Mvc.Rendering.HtmlHelper" -->
warn: 3203: If the object is already an <see cref="!:IDictionaries<string, object>"/> instance, then it is
```
it into exception thrown
All values in Exception.Data need to be serializable which is not true for
the diagnostics. Removing this property since we can't pass it through.
* Update CompilationFailedException to include path of file being compiled
* Pass in path being compiled to Rolsyn.
* Adding doc comments for compilation pieces
Fixes#869
- correct XML comment typo introduced in `HtmlHelper` in 56d66c090e (bad merge)
- fix missed `null` requirement for `@Html.RadioButtonFor()` and remove buried `null` check
- add back `Environment.Newline` to `@Html.TextArea()` (was dropped though comment wasn't)
- don't call other extension methods
- #847 line 7
- remove extension methods that do nothing but pass through to the interface method
- weren't exactly ambiguous (interface method wins) but were useless
- #874 lines 3, 4, and 6
- correct `Value()` to treat a `null` expression name the same as `string.Empty`
- add missing `[NotNull]` attributes in `EditorExtensions` and for `GenerateIdFromName()`
- consistently pass `null` for default expression names to the helpers
- for example, from extension methods
- add test cases using `null` for expression name
nits:
- correct summary XML comment for `HtmlHelper` class
- use named parameters and prefer interface (not extension) methods in changed calls
- use `string.Empty` instead of `""` in a few tests
- fix problems at least with Roslyn compiler and VS IntelliSense or the Object Browser
- `<see langref="keyword"/>` generates nothing
- `<example>` at top level (outside `<summary>`) generates nothing
- curly braces don't become angle brackets outside `<see cref="reference"/>` references
- yeah, a point @yishaigalatzer asked about in a previous PR
- `<see href="reference"/>` is not valid
- correct some invalid use of angle brackets and remove useless empty elements
- correct unresolved XML comment references; generally, add namespace prefix
Symptoms for some of the above issues included
- generated XML comments such as `<!-- Badly formed XML comment ... -->`, usually indicating an unclosed element
- generated XML attributes such as `cref="!:..."`, indicating a broken reference
- in a couple of cases we had `<typeparamref cref="TOption"/>`; attribute should be `"name"`
Few wording changes beyond
- `"opening </form> tag"` -> `"<form> start tag"`
- `"closing </form> tag"` -> `"</form> end tag"`
Also correct two typos in `HtmlHelper`
Will create a unit test to ensure XML syntax doesn't degrade going forward. Separate PR.
- for now, check using `dir -r *.xml | sls '!'`
RazorTextWriter represents the result of rendering a page as a sequence of
strings rather than a concatenated string. This avoids building up large
strings in memory.
https://roslyn.codeplex.com/workitem/246 affects usage of code with the
latest build of Roslyn with Moq v4.2. The workaround involves ensuring a
closure is created. Updating affected tests to make ToString() calls on
local variables to create these closures.
- see line 2 of #874
- focus on `TextBox[For]()` and `ValidationSummary()`
related fixes included here:
- `TextArea[For]()` documentation incorrectly indicated their `htmlAttributes` parameters were dictionaries
- handle `htmlAttributes` parameters more consistently; create a dictionary only when necessary
- fixes#566 and part of #847
- allows compositions such as `@Html.Label("property", Html.Id("property"))`
and `@Html.Raw(Html.DisplayText("property"))` (this one is not recommended)
- adjust XML comments to match
- add missing XML comments to `HtmlHelperValueExtensions`
- nit: `TInnerModel` -> `TModelItem`
- increase XML comment consistency for changed methods
- generally make wording more consistent e.g. how we use words such as
"returns"
- use `<see langref="string|true|false|null"/>` more
- address all of #659 and a bit of #874 (avoid `public virtual` methods in
`HtmlHelper`)
- make `MetadataProvider` and `GetClientValidationRules()` `public` and
therefore available to extension methods
- remove unused `GetValidationAttributes()` overload
- make remaining `GetValidationAttributes()` overload (and not
`GetClientValidationRules()`) `virtual`, allowing derived classes to
change the attributes without overriding all callers
- reverse `GetValidationAttributes()` and `GetClientValidationRules()`
parameter order to match precedence
- add `GenerateName()` and `GenerateValidationSummary()` to make
`protected virtual` method names consistent
- `Name()`, `ValidationSummary()` and `TextArea()` are no longer `virtual`
because `protected virtual Generate*()` methods exist for all
This change consists of :
1. Conneg based on request headers, supports the following 3 scenarios:
a. ContentType property on ObjectResult set to null or is empty.
b. ContentType property on ObjectResult set to a single content type.
c. ContentType property on ObjectResult set to multiple content types.
2. Parsing Helpers, comparers and extensions for comparing various http headers.
3. Tests.
Open workitems:
1. Remodel JsonResult and ContentResult to be a derivation of ObjectResult.
2. Populate DeclaredType.
Conflicts:
src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterDescriptor.cs
src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptorExtensions.cs
src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
src/Microsoft.AspNet.Mvc.Core/Resources.resx
src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs
src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
src/Microsoft.AspNet.Mvc/MvcServices.cs
test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs
test/Microsoft.AspNet.Mvc.HeaderValueAbstractions.Test/MediaTypeHeaderValueParsingTests.cs
test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs
- remove `ViewContext.UnobtrusiveJavaScriptEnabled` property and all references
- avoid `ViewContext.GetFormContextForClientValidation()` calls since
ternary expression is more explicit and we were inconsistent
- improve `ValidationMessage()` comments
- don't treat `ModelState.IsValid` as if it were still nullable