Commit Graph

53 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 05f5d59e44 Fix build break 2017-07-06 19:43:42 -07:00
Pranav K 8963b83dd3 Remove ParseOptions and CompilationOptions from RazorViewEngineOptions (#6487)
* Remove ParseOptions and CompilationOptions from RazorViewEngineOptions

Fixes #6009
2017-07-05 14:18:49 -07:00
Ryan Nowak 8d9c16132a Fix #6479 - remove IFileProvider constructor
The RazorProject implementation used by MVC at runtime has a constructor
that takes an IFileProvider (used by tests). This causes ambiguities
when a user registers an IFileProvider in DI.

Cleaning up tests to use a mock instead of the file provider directly
2017-07-04 13:48:56 -07:00
Pranav K d1813a7cd7 Normalize paths returned by view location expanders
Fixes #6448
2017-06-27 08:48:07 -07:00
Pranav K 1124eb5016 Perform case insensitive lookups for precompiled views 2017-06-07 15:19:21 -07:00
Ryan Nowak c3f7613725 Make RazorReferenceManage public
Fix for #4938. This change makes the reference manager public and
documented so that it can be replaced.
2017-05-26 10:58:45 -07:00
Pranav K 452578e4a8 Revisit the architecture of CompilerCache
Fixes #5912
2017-05-25 08:54:15 -07:00
Ryan Nowak c8614e9aa8 Fix build break due to Razor changes 2017-05-18 10:58:43 -07:00
Ryan Nowak cf4742735d Fix Build Break 2017-05-12 20:06:51 -07:00
Ryan Nowak b2d95ffb21 Remove usage of NotFoundProjectItem
We're making this type internal in Razor, using a mock here is fine.

Also renamed some types with a generic name. The actual 'default'
RazorProject class lives in Razor and is internal.
2017-05-12 15:55:36 -07:00
Ryan Nowak 8f52507e9d Fix build break 2017-05-12 15:53:49 -07:00
N. Taylor Mullen 83faaebdb6 Upgrade Roslyn dependency to 2.0.0.
- Added C# 7 unit and functional test to validate features work end-to-end.

#6149
2017-04-21 11:41:31 -07:00
Jass Bagga d8a95c731b Move RazorViewEngineOptionsSetup to internal namespace (#6125)
Addresses #6116
2017-04-13 13:35:35 -07:00
N. Taylor Mullen 36e272fdc2 React to Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
aspnet/Razor#1169
2017-04-10 10:20:19 -07:00
Ryan Nowak c6e4609096 Getting rid of _PageImports
Pages will just use _ViewImports.
2017-04-06 08:14:37 -07:00
Ryan Brandenburg c47825944d Remove Microsoft.AspNetCore.Mvc.Razor.Host 2017-03-29 16:50:39 -07:00
Pranav K f3ee4064a2 React to Razor changes 2017-03-22 19:58:46 -07:00
Ryan Brandenburg 270f66198f Remove Razor from projects 2017-03-17 15:00:39 -07:00
Ajay Bhargav Baaskaran 2ffaa88830 Using NullLogger types from Logging.Abstractions 2017-03-14 12:24:18 -07:00
Pranav K f7fd5114b3 Introduce MvcRazorTemplateEngine 2017-03-13 16:33:13 -07:00
Pranav K 7b53ba1f6b Reacting to https://github.com/aspnet/Razor/issues/1063 2017-03-13 09:46:36 -07:00
Pranav K 145d27f9b3 Add a PagesOption type that allows configuring the root for Page file discovery
Fixes #5785
2017-03-03 17:20:07 -08:00
N. Taylor Mullen acfad83aa6 Migrate to MSBuild
- thanx to @NTaylorMullen for initial conversion
  - e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files

Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
  - see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world

Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
  - work around inability to deserialize a odd `ref` type
  - xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
  - rename tests to avoid duplicates
- work around Microsoft/vstest#419
  - set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00
Ajay Bhargav Baaskaran 0f5d5ff3b5 React to aspnet/Razor#1017 2017-02-17 16:01:54 -08:00
Pranav K 624909763b Make _PageImports work
Add support for generating the Model property
2017-02-07 11:13:15 -08:00
Ajay Bhargav Baaskaran c349929cc1 Port old Razor tests to new Razor 2017-02-03 17:09:18 -08:00
Ryan Nowak 84d2e027f5 Use new Razor in MVC 2017-01-30 10:55:49 -08:00
Jass Bagga 304000095a Added logging for precompiled views in RazorViewEngine
Addresses #5462
2016-11-07 10:46:54 -08:00
Ajay Bhargav Baaskaran 7985121bab [Fixes #5207] Support IsIndexer for ViewComponent tag helpers 2016-11-03 16:50:22 -07:00
Ajay Bhargav Baaskaran c28ad48e98 [Fixes #5216] Make generic parameters work with ViewComponent tag helpers 2016-11-02 15:55:23 -07:00
Ajay Bhargav Baaskaran e987e2107f [Fixes #5379] Dont generate TagHelperDescriptors for ViewComponents with generic parameters 2016-10-07 12:26:53 -07:00
Ajay Bhargav Baaskaran b3fe8b30ac Moved VCTHDFactory to .Internal namespace 2016-09-16 15:50:44 -07:00
Ryan Brandenburg 43a0a5a9f1 Replace ConfigureOptions with IConfigureOptions 2016-09-08 15:19:07 -07:00
Pranav K c942eab6e2 Adding support for Razor precompilation
Fixes #3917
2016-08-19 07:27:51 -07:00
Pranav K b7a0393311 Register DependencyContextRazorViewEngineOptionsSetup after RazorViewEngineOptionsSetup
Fixes #4902
2016-07-15 10:33:59 -07:00
Ryan Brandenburg 310ab25347 Make tests resilient to Localization (#5011) 2016-07-14 09:28:01 -07:00
Pranav K 7ce344270a Show message about preserveCompilationContext when a Roslyn diagnostic error says a reference
could not be found.

Fixes #4911
2016-07-06 15:09:54 -07:00
Doug Bunting 42cea41737 Fail more gracefully when option collections cleared
- #4690
- move `ModelBindingMessageProvider` init from `DefaultBindingMetadataProvider` to `DefaultModelMetadata`
 - in addition to avoiding error cases, this removes some boilerplate
- add specific errors to `BodyModelBinderProvider`, `CompilerCache`, `CompositeViewEngine`, `ModelBinderFactory`,
  and `ObjectResultExecutor`
 - `DefaultRazorViewEngineFileProviderAccessor.FileProvider` now a `NullFileProvider` in empty case
2016-06-30 14:52:50 -07:00
N. Taylor Mullen 51c285574b Add `AdditionalCompilationReferences` option to `RazorViewEngineOptions`.
- `AdditionalCompilationReferences` is a purely additive option to add `MetadataReference` instances to be used for Razor compilation.
- Added a test to validate the compilation references get combined with the `ApplicationPartManager`s metadata references.

#4497
2016-06-01 16:32:46 -07:00
Pranav K ab76f743f4 Use dependency context from all application parts when compiling views
Fixes #4498
2016-05-24 10:28:51 -07:00
mnltejaswini 5fb36ae406 [Perf] Replace Activator.CreateInstance with cached delegate in RazorPageFactoryProvider
Fixes #4470
2016-05-16 11:26:33 -07:00
Pranav K 0ff2f875d9 Avoid holding on to DependencyContext instance
Fixes #4527
2016-04-29 14:44:55 -07:00
jacalvar 1bd66ffda0 [Fixes #4089] Add support for application parts
This commit introduces application parts as a concept on MVC.

An application part is an abstraction that allows you to expose some
feature or corncern in a way that is decoupled from their underlying source.
Examples of this include types in an assembly, emdeded resources, files on
disk etc.

Application parts are configured during startup by adding or removing them from
the application part manager available as part of IMvcBuilder and IMvcCoreBuilder.

The application part manager provides the ability to populate features from the
list of available application parts by using a list of application feature providers.
Application feature providers are responsible for populating a given feature given a
list of application parts.

Examples of application providers can be a ControllerFeatureProvider
that goes through the list of application parts, sees which one of those parts exposes types,
determines which of those types are controller types, and adds them to a ControllerFeature
that holds a list of all the types that will be considered controllers in the application.
2016-03-31 12:14:04 -07:00
jacalvar 680e9bb2d1 Refactor and cleanup tag helper creation.
* Moved instantiation of tag helpers into DefaultTagHelperActivator.
* Introduced ITagHelperFactory for handling the setup of new tag helper instances.
2016-03-31 10:47:17 -07:00
Doug Bunting 6bf25cecec React to HttpAbstractions namespace changes
- aspnet/HttpAbstractions#549 and aspnet/HttpAbstractions#592
- clean up `using`s
2016-03-30 16:19:42 -07:00
Pranav K 12d7093278 Revert "Remove DependencyModel dependency"
This reverts commit 4299a4d50b.
2016-03-29 07:29:43 -07:00
Pranav K 4299a4d50b Remove DependencyModel dependency 2016-03-16 16:05:04 -07:00
Pranav K c03aabbff5 RazorCompilationService should throw a meaningful error when a user produces an application without `preserveCompilationContext`
Fixes #4202
2016-03-15 11:19:38 -07:00
Pranav K 6d3bd33c64 Revive DefaultRoslynCompilationServiceTest
Partially fixes #4140
2016-03-09 11:50:14 -08:00
Pranav K 80b6996701 * Moving DNX dependencies to test only
* Updating Mvc tests to use dotnet test to run on dnxcore50
2016-02-23 18:58:42 -08:00