Commit Graph

36463 Commits

Author SHA1 Message Date
Ryan Nowak 92dbd8923b Fix #2582 - Remove @inject dependency on [Activate]
Removes usage of [Activate] in razor code generation. Razor will now use
it's own special attribute recognized by the Razor activator.
2015-05-21 22:57:39 -07:00
Ryan Nowak 8f38650d1f Fix #1579 - Bind top-level collections as an empty collection
This change treats 'top-level' collection-type models similarly to
top-level POCO model - namely that they will always be instantiated even
if there's no data to put inside.
2015-05-21 22:46:04 -07:00
Ryan Nowak b64fd7ae39 Fix #2407 - Add back the implicit [Required] for value types
This change adds a [Required] client validator when
ModelMetadata.IsRequired == true. The bulk of the changes here are
mechanical updates to test files.
2015-05-21 17:52:25 -07:00
Kiran Challa 9e62751649 Fixed for build break 2015-05-21 16:47:40 -07:00
Kiran Challa d2f041def9 Fixed test 2015-05-21 16:43:15 -07:00
N. Taylor Mullen e689863461 Add required attributes to AnchorTagHelper and FormTagHelper.
- This involved also adding required attributes with wildcards.
- With this change AnchorTagHelpers and FormTagHelpers should no longer light up on every `<form>` or `<a>` tag.

#2581
2015-05-21 16:42:45 -07:00
Kiran Challa ddd76e2f4d Fix for build break(removing reference to non-existing Caching.Distributed package) 2015-05-21 16:28:48 -07:00
N. Taylor Mullen 0e61b49881 Add support for '*' at the end of required attributes.
- [TargetElement(Attributes ="prefix-*")] is now supported.
- Added '*' to the list of invalid non whitespace characters in TagHelperDescriptorFactory.
- Modified TagHelperDescriptorProvider to respect suffixed wildcards in TagHelperAttributeDescriptor.Attributes.
- Added tests to validate wildcard required attributes

#361
2015-05-21 15:01:32 -07:00
Kiran Challa 2a321fd622 React to Caching api review changes 2015-05-21 14:44:27 -07:00
moozzyk e771141eb8 Replacing rimraf in target-dir-clean with non-node.js based solution
rimraf needs to pull node.js and is slow.
2015-05-21 14:43:07 -07:00
Damian Edwards 3b02fc8c19 Merge pull request #24 from hishamco/dev
Remove unnecessary using directives
2015-05-21 13:59:39 -07:00
Kiran Challa 903885c20d Reacting to Caching api review changes 2015-05-21 13:28:37 -07:00
Kiran Challa 76bd1a2f17 Reacting to Caching api review changes 2015-05-21 13:24:31 -07:00
Doug Bunting 8a701726b3 Rename _GlobalImport.cshtml files to _ViewImports.cshtml
- also rename files and directories with "GlobalImport" in name
 - nearly blind but avoid "ViewImportss" in new names
- public API change: `ViewHierarchyUtility.GetGlobalImportLocations()` -> `GetViewImportsLocations()`
 - primary source updates were comments, tests, and implementation details

nit:
- rename NestedGlobalImports.cs file to NestedViewImportsController.cs, matching class
2015-05-21 12:27:08 -07:00
Onat Yiğit Mercan c2b637f888 Added instruction to install unzip in order to unpack runtime packages 2015-05-21 22:09:48 +03:00
Kirthi Krishnamraju 78033fda1f fix build break 2015-05-21 11:25:03 -07:00
Eilon Lipton 186d4cde42 Merge pull request #6 from hishamco/issue#5
ASP.NET vNext -> ASP.NET 5
2015-05-21 09:22:40 -07:00
Doug Bunting 3bdaec5b7e React to aspnet/Mvc#2489 fix
- rename _GlobalImport.cshtml file to _ViewImports.cshtml
2015-05-21 07:59:26 -07:00
David Fowler eb182fdafd Fixed dependencies 2015-05-21 03:46:18 -07:00
Kirthi Krishnamraju 7968239891 React to aspnet/Configuration #195,#198 2015-05-20 23:40:16 -07:00
Doug Bunting 517c013882 React to aspnet/Razor#89 fix
- use `IDictionary<string, TValue>` support in `<a/>` and `<form/>` tag helpers
 - make `RouteValues` dictionaries `IDictionary<string, string>` for ease of use
- remove `TagHelperOutputExtensions.FindPrefixedAttributes()`
- set all `GeneratedTagHelperContext` properties
- add error for tag helper dictionary properties where `TValue` is `ModelExpression`
- add new `RazorPage.InvalidTagHelperIndexerAssignment()` method and resource

tests
- use new `isIndexer` argument when creating `TagHelperAttributeDescriptor`
- arrange `AnchorTagHelper` and `FormTagHelper` correctly
 - also expect `routeValues != null` in calls to `IHtmlGenerator`

nits:
- get rid of some `foo` and `bar` gunk in tests
- remove unused variable to cleanup a test compilation warning
2015-05-20 22:07:19 -07:00
Doug Bunting 60c47c8874 Add `[HtmlAttributeName(..., DictionaryAttributePrefix="prefix")]` part III
- #89 remainder
- support adding attributes (that aren't otherwise bound) to a tag helper dictionary
- use two `TagHelperAttributeDescriptor`s for dictionary and indexer
 - most exising descriptor properties have two meanings depending on new `IsIndexer`
 - add `TagHelperAttributeDescriptor.IsNameMatch()`
- create no `TagHelperAttributeDescriptor`s if property name or `HtmlAttributeNameAttribute`
  is invalid
 - avoid corner case misfeatures where invalidity removes just one descriptor
- extend handling of invalid attribute names to include `[HtmlAttributeName]`
- handle prefix matches in `TagHelperBlockRewriter`
 - add parse error when resolved dictionary key is `string.Empty`
- generate code for indexer property assignments
 - add code generation for runtime error if using indexer when property is `null`
 - use new `GeneratedTagHelperContext.FormatInvalidIndexerAssignmentMethodName` for message
- code generation now handles attributes in source order; thus above errors occur only when
  expected if dictionary is also initialized in the Razor source
 - surprisingly generation order change did not break existing tests!

nits:
- improve `TagHelperDescriptorFactory_InvalidBoundAttributeName` wording
 - rename resource to `TagHelperDescriptorFactory_InvalidAttributeNameOrPrefixStart`
- correct order of arguments to `FormatTagHelperDescriptorFactory_InvalidBoundAttributeName`
- correct `TagHelperBlockRewriter_TagHelperAttributeListMustBeWellFormed` resource
- correct `TagHelperDescriptorFactoryTest` test names
 - remove a few unnecessary `ToArray()` calls
- update `TagHelperAttributeDescriptorComparer` comments
2015-05-20 22:01:00 -07:00
N. Taylor Mullen 1879ac6427 Add support for static usings.
- Added special cases to the using statement parser to understand `@using static Foo`.
- Added several unit tests to validate the static using structure.
- Modified existing import code generation tests to validate several static usings.

#44
2015-05-20 21:47:23 -07:00
Hisham Abdullah Bin Ateya ef0be7ca75 ASP.NET vNext -> ASP.NET 5 2015-05-21 06:23:44 +03:00
Kirthi Krishnamraju 337bbad51d React to aspnet/Configuration #195,#198 and fix few minor build break issues 2015-05-20 20:01:23 -07:00
Kirthi Krishnamraju 030459b8ba React to aspnet/Configuration #195,#198 2015-05-20 19:34:27 -07:00
Kirthi Krishnamraju 9ba11ee04a React to aspnet/Configuration #195,#198 2015-05-20 18:43:12 -07:00
Kirthi Krishnamraju a38815de58 React to aspnet/Configuration #195,#198 2015-05-20 18:37:10 -07:00
Kirthi Krishnamraju af2c524352 React to aspnet/Configuration #195,#198 2015-05-20 18:20:35 -07:00
Kirthi Krishnamraju 56e563909d React to aspnet/Configuration #195,#198 2015-05-20 18:10:48 -07:00
Hisham Abdullah Bin Ateya 8382170178 Unnecessary using directives 2015-05-21 03:44:19 +03:00
Kirthi Krishnamraju 7e78374053 React to aspnet/Configuration #195,#198 2015-05-20 17:26:00 -07:00
Kirthi Krishnamraju 7ed0f2e55f React to aspnet\Configuration #195,#198 2015-05-20 17:20:32 -07:00
damianedwards 8deb0b1137 Merge branch 'hishamco-dev' into dev 2015-05-20 16:23:30 -07:00
damianedwards 5c7d811aa6 Fix the merge 2015-05-20 16:22:54 -07:00
damianedwards e5a0918054 Merge branch 'dev' of https://github.com/hishamco/Localization into hishamco-dev
Conflicts:
	src/Microsoft.AspNet.Localization/CustomRequestCultureStrategy.cs
	src/Microsoft.AspNet.Localization/IApplicationBuilderExtensions.cs
	src/Microsoft.Framework.Localization/ResourceManagerStringLocalizer.cs
2015-05-20 16:17:57 -07:00
Chris R 2168176149 #276 #277 Fix ini loading, read location from command line. 2015-05-20 16:10:58 -07:00
Kiran Challa 7ed6802bba Reacting to Caching api review changes 2015-05-20 15:15:12 -07:00
Kirthi Krishnamraju b75a855b98 React to aspnet/Congifuration #195,#198 2015-05-20 14:54:33 -07:00
damianedwards 4ba159afe7 Removed Moq from tests & enabled .NET Core
- Introduced AssemblyWrapper to enable testing
- Cleaned up properties on ResourceManagerStringLocalizer
- #15

Change "Strategy" to "Provider"
- #19
2015-05-20 14:41:52 -07:00
damianedwards 9384848cc7 Cache walk of the culture tree when building resource name list:
- #15
2015-05-20 14:41:36 -07:00
Ajay Bhargav Baaskaran aaa14cd36b More bug fix for #379 2015-05-20 13:55:12 -07:00
Chris R 5694f79af4 React to IRequestCookieFeature API change. 2015-05-20 12:51:38 -07:00
Chris R 69849cc37c #311 Move UseMiddleware to Http.Abstractions. 2015-05-20 12:42:54 -07:00
Troy Dai f6119d4856 Update references
Microsoft.Framework.NotNullAttribute.Internal =>
Microsoft.Framework.NotNullAttribute.Sources
2015-05-20 12:41:17 -07:00
Troy Dai e86f571011 Update dependency, react to Microsoft.Framework.NotNullAttribute.Sources 2015-05-20 12:38:31 -07:00
Troy Dai 1566f72063 Update TestHost's dependencies 2015-05-20 12:24:38 -07:00
Doug Bunting 75c1efeec7 Fix `target-dir-clean` target
- not currently cleaning in most cases
- typo in 16bb0df
2015-05-20 12:02:39 -07:00
Doug Bunting 0e296283f9 Address a round of nits
- clean up trailing curly braces (Java style)
 - affected lots of files touched for #89 fix
- a couple of trailing whitespace removals
2015-05-19 17:39:26 -07:00
Ajay Bhargav Baaskaran 47577fd936 [Fixes #379] Ignoring whitespace at the end of text tag 2015-05-19 17:21:28 -07:00