From 74cac774f8800f59da9aaf98950b7da9e2297d72 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Tue, 1 Mar 2016 01:10:43 +0000 Subject: [PATCH] Normalise trailing whitespace and line endings everywhere --- .gitattributes | 4 +- .travis.yml | 2 +- NuGet.master.config | 2 +- README.md | 2 +- appveyor.yml | 2 +- .../MusicStore/Apis/ArtistsApiController.cs | 2 +- .../MusicStore/Apis/GenresApiController.cs | 2 +- .../Apis/Models/AccountViewModels.cs | 2 +- .../angular/MusicStore/Apis/Models/Album.cs | 4 +- .../angular/MusicStore/Apis/Models/Artist.cs | 2 +- .../MusicStore/Apis/Models/CartItem.cs | 2 +- .../angular/MusicStore/Apis/Models/Genre.cs | 2 +- .../Apis/Models/MusicStoreContext.cs | 2 +- .../angular/MusicStore/Apis/Models/Order.cs | 2 +- .../MusicStore/Apis/Models/OrderDetail.cs | 2 +- .../MusicStore/Apis/Models/SampleData.cs | 10 +- .../Apis/Models/SentimentAnalysis.cs | 6 +- .../MusicStore/Apis/Models/ShoppingCart.cs | 6 +- .../Infrastructure/NoCacheAttribute.cs | 2 +- .../MusicStore/Infrastructure/PagedList.cs | 2 +- samples/angular/MusicStore/MusicStore.xproj | 2 +- samples/angular/MusicStore/Startup.cs | 8 +- .../MusicStore/Views/Home/Index.cshtml | 52 ++-- .../MusicStore/Views/Shared/Error.cshtml | 12 +- .../MusicStore/Views/Shared/_Layout.cshtml | 80 +++--- .../MusicStore/Views/_ViewImports.cshtml | 8 +- .../MusicStore/Views/_ViewStart.cshtml | 6 +- samples/angular/MusicStore/project.json | 2 +- .../components/admin/admin-home/admin-home.ts | 2 +- .../album-delete-prompt.ts | 6 +- .../admin/album-details/album-details.html | 2 +- .../admin/album-details/album-details.ts | 2 +- .../admin/album-edit/album-edit.html | 10 +- .../components/admin/album-edit/album-edit.ts | 8 +- .../admin/albums-list/albums-list.html | 2 +- .../admin/albums-list/albums-list.ts | 14 +- .../components/admin/form-field/form-field.ts | 2 +- .../public/album-details/album-details.html | 6 +- .../public/album-details/album-details.ts | 2 +- .../public/genre-contents/genre-contents.ts | 2 +- .../public/genres-list/genres-list.ts | 2 +- .../ng-app/components/public/home/home.ts | 4 +- samples/angular/MusicStore/wwwroot/web.config | 18 +- .../ES2015Transpilation.xproj | 2 +- samples/misc/ES2015Transpilation/Startup.cs | 8 +- .../Views/Home/Index.cshtml | 12 +- .../Views/Shared/Error.cshtml | 12 +- .../Views/Shared/_Layout.cshtml | 22 +- .../Views/_ViewImports.cshtml | 4 +- .../Views/_ViewStart.cshtml | 6 +- samples/misc/ES2015Transpilation/project.json | 2 +- .../misc/ES2015Transpilation/transpilation.js | 2 +- .../ES2015Transpilation/wwwroot/web.config | 18 +- samples/misc/Webpack/Startup.cs | 2 +- samples/misc/Webpack/Views/Home/Index.cshtml | 20 +- .../misc/Webpack/Views/Shared/Error.cshtml | 12 +- .../misc/Webpack/Views/Shared/_Layout.cshtml | 28 +-- .../misc/Webpack/Views/_ViewImports.cshtml | 4 +- samples/misc/Webpack/Views/_ViewStart.cshtml | 6 +- samples/misc/Webpack/webpack.config.js | 2 +- samples/misc/Webpack/webpack.config.prod.js | 2 +- samples/misc/Webpack/wwwroot/web.config | 18 +- .../MusicStore/Apis/ArtistsApiController.cs | 2 +- .../MusicStore/Apis/GenresApiController.cs | 2 +- .../Apis/Models/AccountViewModels.cs | 2 +- samples/react/MusicStore/Apis/Models/Album.cs | 4 +- .../react/MusicStore/Apis/Models/Artist.cs | 2 +- .../react/MusicStore/Apis/Models/CartItem.cs | 2 +- samples/react/MusicStore/Apis/Models/Genre.cs | 2 +- .../Apis/Models/MusicStoreContext.cs | 2 +- samples/react/MusicStore/Apis/Models/Order.cs | 2 +- .../MusicStore/Apis/Models/OrderDetail.cs | 2 +- .../MusicStore/Apis/Models/SampleData.cs | 10 +- .../MusicStore/Apis/Models/ShoppingCart.cs | 6 +- .../Infrastructure/NoCacheAttribute.cs | 2 +- .../MusicStore/Infrastructure/PagedList.cs | 2 +- .../react/MusicStore/ReactApp/boot-server.tsx | 2 +- .../ReactApp/components/NavMenu.tsx | 6 +- .../components/public/AlbumDetails.tsx | 4 +- .../ReactApp/components/public/AlbumTile.tsx | 2 +- .../components/public/GenreDetails.tsx | 2 +- .../MusicStore/ReactApp/configureStore.ts | 6 +- .../MusicStore/ReactApp/store/AlbumDetails.ts | 4 +- .../ReactApp/store/FeaturedAlbums.ts | 2 +- .../MusicStore/ReactApp/store/GenreDetails.ts | 6 +- .../MusicStore/ReactApp/store/GenreList.ts | 2 +- .../react/MusicStore/ReactApp/store/index.ts | 2 +- samples/react/MusicStore/Startup.cs | 8 +- .../react/MusicStore/Views/Home/Index.cshtml | 22 +- .../MusicStore/Views/Shared/Error.cshtml | 12 +- .../MusicStore/Views/Shared/_Layout.cshtml | 24 +- .../MusicStore/Views/_ViewImports.cshtml | 6 +- .../react/MusicStore/Views/_ViewStart.cshtml | 6 +- samples/react/MusicStore/wwwroot/web.config | 18 +- .../Controllers/PeopleApiController.cs | 4 +- .../react/ReactGrid/ReactApp/boot-server.jsx | 2 +- .../ReactApp/components/CustomPager.jsx | 4 +- .../ReactApp/components/PersonEditor.jsx | 10 +- .../ReactApp/components/ReactApp.jsx | 2 +- samples/react/ReactGrid/ReactGrid.xproj | 2 +- samples/react/ReactGrid/Startup.cs | 2 +- .../react/ReactGrid/Views/Home/Index.cshtml | 12 +- .../react/ReactGrid/Views/Shared/Error.cshtml | 12 +- .../ReactGrid/Views/Shared/_Layout.cshtml | 28 +-- .../react/ReactGrid/Views/_ViewImports.cshtml | 6 +- .../react/ReactGrid/Views/_ViewStart.cshtml | 6 +- samples/react/ReactGrid/project.json | 2 +- samples/react/ReactGrid/wwwroot/web.config | 18 +- .../AngularPrerenderTagHelper.cs | 8 +- .../AngularRenderer.cs | 4 +- .../Content/Node/angular-rendering.js | 2 +- .../Microsoft.AspNet.AngularServices.xproj | 2 +- .../PrimeCacheHelper.cs | 4 +- .../npm/build.js | 2 +- .../npm/readme.md | 20 +- .../npm/src/CachePrimedHttp.ts | 6 +- .../npm/src/Validation.ts | 8 +- .../Configuration.cs | 6 +- .../Content/Node/entrypoint-http.js | 8 +- .../Content/Node/entrypoint-stream.js | 2 +- .../HostingModels/HttpNodeInstance.cs | 26 +- .../InputOutputStreamNodeInstance.cs | 14 +- .../HostingModels/OutOfProcessNodeInstance.cs | 12 +- .../INodeInstance.cs | 4 +- .../Microsoft.AspNet.NodeServices.xproj | 2 +- .../NodeHostingModel.cs | 2 +- .../Util/EmbeddedResourceReader.cs | 6 +- .../Util/StringAsTempFile.cs | 2 +- .../Microsoft.AspNet.ReactServices.xproj | 2 +- .../redux-typed/src/ObjectAssignPolyfill.ts | 2 +- .../npm/redux-typed/src/StrongProvide.ts | 8 +- .../Content/Node/prerenderer.js | 18 +- .../Content/Node/webpack-dev-middleware.js | 14 +- .../Microsoft.AspNet.SpaServices.xproj | 2 +- .../Prerendering/PrerenderTagHelper.cs | 12 +- .../Prerendering/Prerenderer.cs | 12 +- .../Routing/SpaRouteConstraint.cs | 8 +- .../Routing/SpaRouteExtensions.cs | 6 +- .../Webpack/WebpackDevMiddleware.cs | 8 +- .../npm/domain-task/src/fetch.ts | 6 +- .../npm/domain-task/src/main.ts | 4 +- .../ClientApp/components/app/app.html | 2 +- .../ClientApp/components/counter/counter.ts | 2 +- .../components/fetch-data/fetch-data.ts | 4 +- .../ClientApp/components/home/home.html | 2 +- .../components/nav-menu/nav-menu.html | 2 +- .../Controllers/SampleDataController.cs | 6 +- templates/Angular2Spa/Startup.cs | 4 +- .../Angular2Spa/Views/Shared/Error.cshtml | 12 +- .../Angular2Spa/Views/_ViewImports.cshtml | 6 +- templates/Angular2Spa/Views/_ViewStart.cshtml | 6 +- templates/Angular2Spa/wwwroot/web.config | 18 +- .../ReactSpa/ClientApp/components/Counter.tsx | 8 +- .../ClientApp/components/FetchData.tsx | 4 +- .../ReactSpa/ClientApp/components/Home.tsx | 2 +- .../ReactSpa/ClientApp/components/Layout.tsx | 2 +- .../ReactSpa/ClientApp/components/NavMenu.tsx | 2 +- templates/ReactSpa/ClientApp/css/site.css | 1 - .../Controllers/SampleDataController.cs | 6 +- templates/ReactSpa/Startup.cs | 4 +- templates/ReactSpa/Views/Shared/Error.cshtml | 12 +- templates/ReactSpa/Views/_ViewImports.cshtml | 6 +- templates/ReactSpa/Views/_ViewStart.cshtml | 6 +- templates/ReactSpa/webpack.config.prod.js | 2 +- templates/ReactSpa/wwwroot/web.config | 18 +- .../Views/Home/About.cshtml | 14 +- .../Views/Home/Contact.cshtml | 34 +-- .../Views/Home/Index.cshtml | 228 +++++++++--------- .../Views/Shared/Error.cshtml | 12 +- .../Views/Shared/_Layout.cshtml | 88 +++---- .../Views/_ViewImports.cshtml | 4 +- .../Views/_ViewStart.cshtml | 6 +- .../webpack.config.prod.js | 2 +- .../WebApplicationBasic/wwwroot/web.config | 18 +- 174 files changed, 782 insertions(+), 783 deletions(-) diff --git a/.gitattributes b/.gitattributes index 66abdf2..d0a46d6 100755 --- a/.gitattributes +++ b/.gitattributes @@ -13,7 +13,7 @@ *.png binary *.gif binary -*.cs text=auto diff=csharp +*.cs text=auto diff=csharp *.vb text=auto *.resx text=auto *.c text=auto @@ -48,4 +48,4 @@ *.fsproj text=auto *.dbproj text=auto *.sln text=auto eol=crlf -*.sh eol=lf \ No newline at end of file +*.sh eol=lf diff --git a/.travis.yml b/.travis.yml index bf811dc..d2d8dfd 100755 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,4 @@ os: - osx osx_image: xcode7.1 script: - - ./build.sh verify \ No newline at end of file + - ./build.sh verify diff --git a/NuGet.master.config b/NuGet.master.config index 9a79e2e..1ff3c9a 100755 --- a/NuGet.master.config +++ b/NuGet.master.config @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/README.md b/README.md index 87feb7d..8ad7653 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Note that to run the React example, you'll also need to run `webpack` from the ` ``` 4. Where applicable, build the project. For example, the Angular example uses Gulp, so you'll need to execute `gulp`, whereas the React example uses Webpack, so you'll need to execute `webpack`. The ES2015 example does not need to be built. - + If you don't already have it, install the applicable build tool first (e.g., `npm install -g webpack`). 5. Run the project (and wait until it displays the message `Application started`) diff --git a/appveyor.yml b/appveyor.yml index 3fab83e..eb24616 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,4 +4,4 @@ build_script: - build.cmd verify clone_depth: 1 test: off -deploy: off \ No newline at end of file +deploy: off diff --git a/samples/angular/MusicStore/Apis/ArtistsApiController.cs b/samples/angular/MusicStore/Apis/ArtistsApiController.cs index 0efe110..b698b39 100644 --- a/samples/angular/MusicStore/Apis/ArtistsApiController.cs +++ b/samples/angular/MusicStore/Apis/ArtistsApiController.cs @@ -27,4 +27,4 @@ namespace MusicStore.Apis return Json(artists); } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/GenresApiController.cs b/samples/angular/MusicStore/Apis/GenresApiController.cs index e5d6ba1..830340d 100644 --- a/samples/angular/MusicStore/Apis/GenresApiController.cs +++ b/samples/angular/MusicStore/Apis/GenresApiController.cs @@ -67,4 +67,4 @@ namespace MusicStore.Apis return Json(albums); } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs b/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs index 657a4f0..831978a 100644 --- a/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs +++ b/samples/angular/MusicStore/Apis/Models/AccountViewModels.cs @@ -60,4 +60,4 @@ namespace MusicStore.Models [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] public string ConfirmPassword { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/Album.cs b/samples/angular/MusicStore/Apis/Models/Album.cs index 919bf1b..68e26ff 100644 --- a/samples/angular/MusicStore/Apis/Models/Album.cs +++ b/samples/angular/MusicStore/Apis/Models/Album.cs @@ -7,7 +7,7 @@ namespace MusicStore.Models { public Album() { - // TODO: Temporary hack to populate the orderdetails until EF does this automatically. + // TODO: Temporary hack to populate the orderdetails until EF does this automatically. OrderDetails = new List(); } @@ -37,4 +37,4 @@ namespace MusicStore.Models public virtual ICollection OrderDetails { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/Artist.cs b/samples/angular/MusicStore/Apis/Models/Artist.cs index 43d677c..b364a89 100644 --- a/samples/angular/MusicStore/Apis/Models/Artist.cs +++ b/samples/angular/MusicStore/Apis/Models/Artist.cs @@ -9,4 +9,4 @@ namespace MusicStore.Models [Required] public string Name { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/CartItem.cs b/samples/angular/MusicStore/Apis/Models/CartItem.cs index 64550ab..7209462 100644 --- a/samples/angular/MusicStore/Apis/Models/CartItem.cs +++ b/samples/angular/MusicStore/Apis/Models/CartItem.cs @@ -18,4 +18,4 @@ namespace MusicStore.Models public virtual Album Album { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/Genre.cs b/samples/angular/MusicStore/Apis/Models/Genre.cs index a7fdb34..eed5616 100644 --- a/samples/angular/MusicStore/Apis/Models/Genre.cs +++ b/samples/angular/MusicStore/Apis/Models/Genre.cs @@ -21,4 +21,4 @@ namespace MusicStore.Models [JsonIgnore] public virtual ICollection Albums { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs index ffecfc5..300bea4 100644 --- a/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs +++ b/samples/angular/MusicStore/Apis/Models/MusicStoreContext.cs @@ -31,4 +31,4 @@ namespace MusicStore.Models base.OnModelCreating(builder); } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/Order.cs b/samples/angular/MusicStore/Apis/Models/Order.cs index 0461dbc..110a77d 100644 --- a/samples/angular/MusicStore/Apis/Models/Order.cs +++ b/samples/angular/MusicStore/Apis/Models/Order.cs @@ -70,4 +70,4 @@ namespace MusicStore.Models public ICollection OrderDetails { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs b/samples/angular/MusicStore/Apis/Models/OrderDetail.cs index 29f8798..cb1e693 100644 --- a/samples/angular/MusicStore/Apis/Models/OrderDetail.cs +++ b/samples/angular/MusicStore/Apis/Models/OrderDetail.cs @@ -11,4 +11,4 @@ public virtual Album Album { get; set; } public virtual Order Order { get; set; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/SampleData.cs b/samples/angular/MusicStore/Apis/Models/SampleData.cs index 95ed0b3..ca81996 100644 --- a/samples/angular/MusicStore/Apis/Models/SampleData.cs +++ b/samples/angular/MusicStore/Apis/Models/SampleData.cs @@ -42,13 +42,13 @@ namespace MusicStore.Models { // Query in a separate context so that we can attach existing entities as modified List existingData; - + using (var scope = serviceProvider.GetRequiredService().CreateScope()) using (var db = scope.ServiceProvider.GetService()) { existingData = db.Set().ToList(); } - + using (var scope = serviceProvider.GetRequiredService().CreateScope()) using (var db = scope.ServiceProvider.GetService()) { @@ -65,8 +65,8 @@ namespace MusicStore.Models private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists) { - var albums = new Album[] - { + var albums = new Album[] + { new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl }, new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl }, @@ -912,4 +912,4 @@ namespace MusicStore.Models } } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs b/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs index e505d2e..8167ec3 100644 --- a/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs +++ b/samples/angular/MusicStore/Apis/Models/SentimentAnalysis.cs @@ -8,9 +8,9 @@ namespace MusicStore.Models public static class SentimentAnalysis { private static string[] positiveSentimentWords = new[] { "happy", "fun", "joy", "love", "delight", "bunny", "bunnies", "asp.net" }; - + private static string[] negativeSentimentWords = new[] { "sad", "pain", "despair", "hate", "scorn", "death", "package management" }; - + public static SentimentResult GetSentiment(string text) { var numPositiveWords = CountWordOccurrences(text, positiveSentimentWords); var numNegativeWords = CountWordOccurrences(text, negativeSentimentWords); @@ -35,4 +35,4 @@ namespace MusicStore.Models Positive, } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs b/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs index 41b3277..3e42600 100644 --- a/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs +++ b/samples/angular/MusicStore/Apis/Models/ShoppingCart.cs @@ -123,7 +123,7 @@ namespace MusicStore.Models public decimal GetTotal() { - // Multiply album price by count of that album to get + // Multiply album price by count of that album to get // the current price for each of those albums in the cart // sum all album price totals to get the cart total @@ -190,7 +190,7 @@ namespace MusicStore.Models if (string.IsNullOrWhiteSpace(sessionCookie)) { - //A GUID to hold the cartId. + //A GUID to hold the cartId. cartId = Guid.NewGuid().ToString(); // Send cart Id as a cookie to the client. @@ -204,4 +204,4 @@ namespace MusicStore.Models return cartId; } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs index 7c0a9cd..d4b73c6 100644 --- a/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs +++ b/samples/angular/MusicStore/Infrastructure/NoCacheAttribute.cs @@ -16,4 +16,4 @@ namespace MusicStore.Infrastructure base.OnResultExecuting(context); } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/Infrastructure/PagedList.cs b/samples/angular/MusicStore/Infrastructure/PagedList.cs index 98c5b13..b5593a6 100644 --- a/samples/angular/MusicStore/Infrastructure/PagedList.cs +++ b/samples/angular/MusicStore/Infrastructure/PagedList.cs @@ -147,4 +147,4 @@ namespace MusicStore.Infrastructure public int PageSize { get; set; } } } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/MusicStore.xproj b/samples/angular/MusicStore/MusicStore.xproj index b4d622b..86f2b29 100644 --- a/samples/angular/MusicStore/MusicStore.xproj +++ b/samples/angular/MusicStore/MusicStore.xproj @@ -16,4 +16,4 @@ 5068 - \ No newline at end of file + diff --git a/samples/angular/MusicStore/Startup.cs b/samples/angular/MusicStore/Startup.cs index 990041e..67008f7 100755 --- a/samples/angular/MusicStore/Startup.cs +++ b/samples/angular/MusicStore/Startup.cs @@ -44,7 +44,7 @@ namespace MusicStore // Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers. // You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json. // services.AddWebApiConventions(); - + // Add EF services to the service container services.AddEntityFramework() .AddSqlite() @@ -82,7 +82,7 @@ namespace MusicStore { // Initialize the sample data SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait(); - + loggerFactory.MinimumLevel = LogLevel.Warning; loggerFactory.AddConsole(); loggerFactory.AddDebug(); @@ -103,7 +103,7 @@ namespace MusicStore // send the request to the following path or controller action. app.UseExceptionHandler("/Home/Error"); } - + // Add static files to the request pipeline. app.UseStaticFiles(); @@ -112,7 +112,7 @@ namespace MusicStore { // Matches requests that correspond to an existent controller/action pair routes.MapRoute("default", "{controller}/{action}/{id:int?}"); - + // Matches any other request that doesn't appear to have a filename extension (defined as 'having a dot in the last URI segment'). // This means you'll correctly get 404s for /some/dir/non-existent-image.png instead of returning the SPA HTML. // However, it means requests like /customers/isaac.newton will *not* be mapped into the SPA, so if you need to accept diff --git a/samples/angular/MusicStore/Views/Home/Index.cshtml b/samples/angular/MusicStore/Views/Home/Index.cshtml index a5d33b4..68d2c2c 100755 --- a/samples/angular/MusicStore/Views/Home/Index.cshtml +++ b/samples/angular/MusicStore/Views/Home/Index.cshtml @@ -1,26 +1,26 @@ -@{ - ViewData["Title"] = "Home Page"; -} - - - - Loading... - - - -@section scripts { - @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) - @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi")) - - - - - - - - - - - - -} +@{ + ViewData["Title"] = "Home Page"; +} + + + + Loading... + + + +@section scripts { + @await Html.PrimeCache(Url.Action("GenreMenuList", "GenresApi")) + @await Html.PrimeCache(Url.Action("MostPopular", "AlbumsApi")) + + + + + + + + + + + + +} diff --git a/samples/angular/MusicStore/Views/Shared/Error.cshtml b/samples/angular/MusicStore/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/samples/angular/MusicStore/Views/Shared/Error.cshtml +++ b/samples/angular/MusicStore/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml b/samples/angular/MusicStore/Views/Shared/_Layout.cshtml index 21900d3..562ccf8 100755 --- a/samples/angular/MusicStore/Views/Shared/_Layout.cshtml +++ b/samples/angular/MusicStore/Views/Shared/_Layout.cshtml @@ -1,40 +1,40 @@ - - - - - - Music Store - - - - - - - - - - - - - @RenderBody() - - - - - - - - - - - @RenderSection("scripts", required: false) - - + + + + + + Music Store + + + + + + + + + + + + + @RenderBody() + + + + + + + + + + + @RenderSection("scripts", required: false) + + diff --git a/samples/angular/MusicStore/Views/_ViewImports.cshtml b/samples/angular/MusicStore/Views/_ViewImports.cshtml index 7d8e7d6..15f1095 100755 --- a/samples/angular/MusicStore/Views/_ViewImports.cshtml +++ b/samples/angular/MusicStore/Views/_ViewImports.cshtml @@ -1,4 +1,4 @@ -@using MusicStore -@using Microsoft.AspNet.AngularServices -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNet.AngularServices" +@using MusicStore +@using Microsoft.AspNet.AngularServices +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@addTagHelper "*, Microsoft.AspNet.AngularServices" diff --git a/samples/angular/MusicStore/Views/_ViewStart.cshtml b/samples/angular/MusicStore/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/samples/angular/MusicStore/Views/_ViewStart.cshtml +++ b/samples/angular/MusicStore/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/samples/angular/MusicStore/project.json b/samples/angular/MusicStore/project.json index c303a1f..a48cf08 100755 --- a/samples/angular/MusicStore/project.json +++ b/samples/angular/MusicStore/project.json @@ -44,4 +44,4 @@ "gulp" ] } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts index 8bcb893..cb057e6 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/admin-home/admin-home.ts @@ -17,5 +17,5 @@ import { AlbumEdit } from '../album-edit/album-edit'; directives: [router.ROUTER_DIRECTIVES] }) export class AdminHome { - + } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts index 88cdb22..f9997ef 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-delete-prompt/album-delete-prompt.ts @@ -9,13 +9,13 @@ import * as models from '../../../models/models'; }) export class AlbumDeletePrompt { public album: models.Album; - + constructor(@ng.Inject(ng.ElementRef) private _elementRef: ng.ElementRef) { } - + public show(album: models.Album) { this.album = album; - + // Consider rewriting this using Angular 2's "Renderer" API so as to avoid direct DOM access (window).jQuery(".modal", this._elementRef.nativeElement).modal(); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html index 8b954b8..a13e0d1 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.html @@ -47,4 +47,4 @@ - \ No newline at end of file + diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts index 7b2228f..78140be 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts @@ -13,7 +13,7 @@ import { AlbumDeletePrompt } from '../album-delete-prompt/album-delete-prompt'; }) export class AlbumDetails { public albumData: models.Album; - + constructor(http: Http, routeParam: router.RouteParams) { http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { this.albumData = result.json(); diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html index 655fd93..3b09db1 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.html @@ -8,18 +8,18 @@ - + - + - +
$ @@ -30,7 +30,7 @@ - + @@ -44,4 +44,4 @@ - \ No newline at end of file + diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts index 0ff5fe5..c88a392 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts @@ -55,7 +55,7 @@ export class AlbumEdit { Price: fb.control('', Validators.compose([Validators.required, AlbumEdit._validatePrice])), AlbumArtUrl: fb.control('', Validators.required) }); - + this.form.valueChanges.subscribe(() => { this.changesSaved = false; }); @@ -70,7 +70,7 @@ export class AlbumEdit { if (this.form.valid) { var controls = this.form.controls; var albumId = this.originalAlbum.AlbumId; - + this._putJson(`/api/albums/${ albumId }/update`, this.form.value).subscribe(successResponse => { this.changesSaved = true; }, errorResponse => { @@ -82,7 +82,7 @@ export class AlbumEdit { private static _validatePrice(control: Control): { [key: string]: boolean } { return /^\d+\.\d+$/.test(control.value) ? null : { Price: true }; } - + // Need feedback on whether this really is the easiest way to PUT some JSON private _putJson(url: string, body: any): Observable { return this._http.put(url, JSON.stringify(body), { @@ -93,4 +93,4 @@ export class AlbumEdit { private ngDoCheck() { this.formErrors = this.form.dirty ? Object.keys(this.form.errors || {}) : []; } -} \ No newline at end of file +} diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html index 8f3248b..51889e7 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.html @@ -32,7 +32,7 @@
-
diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts index 28af1e2..6261a82 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts @@ -11,7 +11,7 @@ import * as models from '../../../models/models'; }) export class AlbumDetails { public albumData: models.Album; - + constructor(http: Http, routeParam: router.RouteParams) { http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { this.albumData = result.json(); diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts index dea5553..57b840f 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts @@ -16,7 +16,7 @@ export class GenreContents { constructor(http: Http, routeParam: router.RouteParams) { http.get(`/api/genres/${ routeParam.params['genreId'] }/albums`).subscribe(result => { - this.albums = result.json(); + this.albums = result.json(); }); } } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts index 6fbdf80..7e8ebe4 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts @@ -15,7 +15,7 @@ export class GenresList { constructor(http: Http) { http.get('/api/genres').subscribe(result => { - this.genres = result.json(); + this.genres = result.json(); }); } } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts index ddb7917..1044478 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts @@ -2,7 +2,7 @@ import * as ng from 'angular2/core'; import { Http } from 'angular2/http'; import { AlbumTile } from '../album-tile/album-tile'; import * as models from '../../../models/models'; - + @ng.Component({ selector: 'home' }) @@ -15,7 +15,7 @@ export class Home { constructor(http: Http) { http.get('/api/albums/mostPopular').subscribe(result => { - this.mostPopular = result.json(); + this.mostPopular = result.json(); }); } } diff --git a/samples/angular/MusicStore/wwwroot/web.config b/samples/angular/MusicStore/wwwroot/web.config index f51dd9a..bb50c71 100644 --- a/samples/angular/MusicStore/wwwroot/web.config +++ b/samples/angular/MusicStore/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/samples/misc/ES2015Transpilation/ES2015Transpilation.xproj b/samples/misc/ES2015Transpilation/ES2015Transpilation.xproj index 7b9d1f7..c218887 100644 --- a/samples/misc/ES2015Transpilation/ES2015Transpilation.xproj +++ b/samples/misc/ES2015Transpilation/ES2015Transpilation.xproj @@ -16,4 +16,4 @@ 2018 - \ No newline at end of file + diff --git a/samples/misc/ES2015Transpilation/Startup.cs b/samples/misc/ES2015Transpilation/Startup.cs index 79f43f9..64a0543 100755 --- a/samples/misc/ES2015Transpilation/Startup.cs +++ b/samples/misc/ES2015Transpilation/Startup.cs @@ -56,23 +56,23 @@ namespace ES2015Example // send the request to the following path or controller action. app.UseExceptionHandler("/Home/Error"); } - + // Dynamically transpile any .js files under the '/js/' directory app.Use(next => async context => { var requestPath = context.Request.Path.Value; if (requestPath.StartsWith("/js/") && requestPath.EndsWith(".js")) { - var fileInfo = env.WebRootFileProvider.GetFileInfo(requestPath); + var fileInfo = env.WebRootFileProvider.GetFileInfo(requestPath); if (fileInfo.Exists) { var transpiled = await nodeServices.Invoke("transpilation.js", fileInfo.PhysicalPath, requestPath); await context.Response.WriteAsync(transpiled); return; } } - + // Not a JS file, or doesn't exist - let some other middleware handle it await next.Invoke(context); }); - + // Add static files to the request pipeline. app.UseStaticFiles(); diff --git a/samples/misc/ES2015Transpilation/Views/Home/Index.cshtml b/samples/misc/ES2015Transpilation/Views/Home/Index.cshtml index 5b5e2f2..d8c8251 100755 --- a/samples/misc/ES2015Transpilation/Views/Home/Index.cshtml +++ b/samples/misc/ES2015Transpilation/Views/Home/Index.cshtml @@ -1,6 +1,6 @@ -Hello - -@section scripts { - - -} +Hello + +@section scripts { + + +} diff --git a/samples/misc/ES2015Transpilation/Views/Shared/Error.cshtml b/samples/misc/ES2015Transpilation/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/samples/misc/ES2015Transpilation/Views/Shared/Error.cshtml +++ b/samples/misc/ES2015Transpilation/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/samples/misc/ES2015Transpilation/Views/Shared/_Layout.cshtml b/samples/misc/ES2015Transpilation/Views/Shared/_Layout.cshtml index 2e8aa72..e0d9802 100755 --- a/samples/misc/ES2015Transpilation/Views/Shared/_Layout.cshtml +++ b/samples/misc/ES2015Transpilation/Views/Shared/_Layout.cshtml @@ -1,11 +1,11 @@ - - - - - ES2015 Example - - - @RenderBody() - @RenderSection("scripts", required: false) - - + + + + + ES2015 Example + + + @RenderBody() + @RenderSection("scripts", required: false) + + diff --git a/samples/misc/ES2015Transpilation/Views/_ViewImports.cshtml b/samples/misc/ES2015Transpilation/Views/_ViewImports.cshtml index 7b6d0ab..7f1bf8c 100755 --- a/samples/misc/ES2015Transpilation/Views/_ViewImports.cshtml +++ b/samples/misc/ES2015Transpilation/Views/_ViewImports.cshtml @@ -1,2 +1,2 @@ -@using ES2015Example -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@using ES2015Example +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" diff --git a/samples/misc/ES2015Transpilation/Views/_ViewStart.cshtml b/samples/misc/ES2015Transpilation/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/samples/misc/ES2015Transpilation/Views/_ViewStart.cshtml +++ b/samples/misc/ES2015Transpilation/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/samples/misc/ES2015Transpilation/project.json b/samples/misc/ES2015Transpilation/project.json index fcf2aa4..555412d 100755 --- a/samples/misc/ES2015Transpilation/project.json +++ b/samples/misc/ES2015Transpilation/project.json @@ -40,4 +40,4 @@ "npm install" ] } -} \ No newline at end of file +} diff --git a/samples/misc/ES2015Transpilation/transpilation.js b/samples/misc/ES2015Transpilation/transpilation.js index 972a4d7..595776a 100644 --- a/samples/misc/ES2015Transpilation/transpilation.js +++ b/samples/misc/ES2015Transpilation/transpilation.js @@ -3,7 +3,7 @@ var babelCore = require('babel-core'); module.exports = function(cb, physicalPath, requestPath) { var originalContents = fs.readFileSync(physicalPath); - var result = babelCore.transform(originalContents, { + var result = babelCore.transform(originalContents, { sourceMaps: 'inline', sourceFileName: '/sourcemapped' + requestPath }); diff --git a/samples/misc/ES2015Transpilation/wwwroot/web.config b/samples/misc/ES2015Transpilation/wwwroot/web.config index f51dd9a..bb50c71 100644 --- a/samples/misc/ES2015Transpilation/wwwroot/web.config +++ b/samples/misc/ES2015Transpilation/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - \ No newline at end of file + + + + + + + + + diff --git a/samples/misc/Webpack/Startup.cs b/samples/misc/Webpack/Startup.cs index 902523e..c12be2d 100755 --- a/samples/misc/Webpack/Startup.cs +++ b/samples/misc/Webpack/Startup.cs @@ -47,7 +47,7 @@ namespace Webpack } app.UseIISPlatformHandler(); - + if (env.IsDevelopment()) { app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true diff --git a/samples/misc/Webpack/Views/Home/Index.cshtml b/samples/misc/Webpack/Views/Home/Index.cshtml index f616aa0..7828ec1 100755 --- a/samples/misc/Webpack/Views/Home/Index.cshtml +++ b/samples/misc/Webpack/Views/Home/Index.cshtml @@ -1,10 +1,10 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -

Hello

-Hi there. Enter some text: - -@section scripts { - -} +@{ + ViewData["Title"] = "Home Page"; +} + +

Hello

+Hi there. Enter some text: + +@section scripts { + +} diff --git a/samples/misc/Webpack/Views/Shared/Error.cshtml b/samples/misc/Webpack/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/samples/misc/Webpack/Views/Shared/Error.cshtml +++ b/samples/misc/Webpack/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/samples/misc/Webpack/Views/Shared/_Layout.cshtml b/samples/misc/Webpack/Views/Shared/_Layout.cshtml index bce6df5..9296718 100755 --- a/samples/misc/Webpack/Views/Shared/_Layout.cshtml +++ b/samples/misc/Webpack/Views/Shared/_Layout.cshtml @@ -1,14 +1,14 @@ - - - - - @ViewData["Title"] - - - - - - @RenderBody() - @RenderSection("scripts", required: false) - - + + + + + @ViewData["Title"] + + + + + + @RenderBody() + @RenderSection("scripts", required: false) + + diff --git a/samples/misc/Webpack/Views/_ViewImports.cshtml b/samples/misc/Webpack/Views/_ViewImports.cshtml index 085c79d..c6ab37e 100755 --- a/samples/misc/Webpack/Views/_ViewImports.cshtml +++ b/samples/misc/Webpack/Views/_ViewImports.cshtml @@ -1,2 +1,2 @@ -@using Webpack -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@using Webpack +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" diff --git a/samples/misc/Webpack/Views/_ViewStart.cshtml b/samples/misc/Webpack/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/samples/misc/Webpack/Views/_ViewStart.cshtml +++ b/samples/misc/Webpack/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/samples/misc/Webpack/webpack.config.js b/samples/misc/Webpack/webpack.config.js index 53c427f..8bd834c 100644 --- a/samples/misc/Webpack/webpack.config.js +++ b/samples/misc/Webpack/webpack.config.js @@ -14,7 +14,7 @@ module.exports = merge({ ], }, entry: { - main: ['./Clientside/App.ts'] + main: ['./Clientside/App.ts'] }, output: { path: path.join(__dirname, 'wwwroot', 'dist'), diff --git a/samples/misc/Webpack/webpack.config.prod.js b/samples/misc/Webpack/webpack.config.prod.js index 03c663f..5dbe0c8 100644 --- a/samples/misc/Webpack/webpack.config.prod.js +++ b/samples/misc/Webpack/webpack.config.prod.js @@ -9,7 +9,7 @@ module.exports = { ] }, plugins: [ - extractLESS, + extractLESS, new webpack.optimize.UglifyJsPlugin({ minimize: true }) ] }; diff --git a/samples/misc/Webpack/wwwroot/web.config b/samples/misc/Webpack/wwwroot/web.config index db6e6f4..e70a777 100644 --- a/samples/misc/Webpack/wwwroot/web.config +++ b/samples/misc/Webpack/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/samples/react/MusicStore/Apis/ArtistsApiController.cs b/samples/react/MusicStore/Apis/ArtistsApiController.cs index 0efe110..b698b39 100644 --- a/samples/react/MusicStore/Apis/ArtistsApiController.cs +++ b/samples/react/MusicStore/Apis/ArtistsApiController.cs @@ -27,4 +27,4 @@ namespace MusicStore.Apis return Json(artists); } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/GenresApiController.cs b/samples/react/MusicStore/Apis/GenresApiController.cs index e5d6ba1..830340d 100644 --- a/samples/react/MusicStore/Apis/GenresApiController.cs +++ b/samples/react/MusicStore/Apis/GenresApiController.cs @@ -67,4 +67,4 @@ namespace MusicStore.Apis return Json(albums); } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs b/samples/react/MusicStore/Apis/Models/AccountViewModels.cs index 657a4f0..831978a 100644 --- a/samples/react/MusicStore/Apis/Models/AccountViewModels.cs +++ b/samples/react/MusicStore/Apis/Models/AccountViewModels.cs @@ -60,4 +60,4 @@ namespace MusicStore.Models [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] public string ConfirmPassword { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/Album.cs b/samples/react/MusicStore/Apis/Models/Album.cs index 919bf1b..68e26ff 100644 --- a/samples/react/MusicStore/Apis/Models/Album.cs +++ b/samples/react/MusicStore/Apis/Models/Album.cs @@ -7,7 +7,7 @@ namespace MusicStore.Models { public Album() { - // TODO: Temporary hack to populate the orderdetails until EF does this automatically. + // TODO: Temporary hack to populate the orderdetails until EF does this automatically. OrderDetails = new List(); } @@ -37,4 +37,4 @@ namespace MusicStore.Models public virtual ICollection OrderDetails { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/Artist.cs b/samples/react/MusicStore/Apis/Models/Artist.cs index 43d677c..b364a89 100644 --- a/samples/react/MusicStore/Apis/Models/Artist.cs +++ b/samples/react/MusicStore/Apis/Models/Artist.cs @@ -9,4 +9,4 @@ namespace MusicStore.Models [Required] public string Name { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/CartItem.cs b/samples/react/MusicStore/Apis/Models/CartItem.cs index 64550ab..7209462 100644 --- a/samples/react/MusicStore/Apis/Models/CartItem.cs +++ b/samples/react/MusicStore/Apis/Models/CartItem.cs @@ -18,4 +18,4 @@ namespace MusicStore.Models public virtual Album Album { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/Genre.cs b/samples/react/MusicStore/Apis/Models/Genre.cs index a7fdb34..eed5616 100644 --- a/samples/react/MusicStore/Apis/Models/Genre.cs +++ b/samples/react/MusicStore/Apis/Models/Genre.cs @@ -21,4 +21,4 @@ namespace MusicStore.Models [JsonIgnore] public virtual ICollection Albums { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs b/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs index ffecfc5..300bea4 100644 --- a/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs +++ b/samples/react/MusicStore/Apis/Models/MusicStoreContext.cs @@ -31,4 +31,4 @@ namespace MusicStore.Models base.OnModelCreating(builder); } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/Order.cs b/samples/react/MusicStore/Apis/Models/Order.cs index 0461dbc..110a77d 100644 --- a/samples/react/MusicStore/Apis/Models/Order.cs +++ b/samples/react/MusicStore/Apis/Models/Order.cs @@ -70,4 +70,4 @@ namespace MusicStore.Models public ICollection OrderDetails { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/OrderDetail.cs b/samples/react/MusicStore/Apis/Models/OrderDetail.cs index 29f8798..cb1e693 100644 --- a/samples/react/MusicStore/Apis/Models/OrderDetail.cs +++ b/samples/react/MusicStore/Apis/Models/OrderDetail.cs @@ -11,4 +11,4 @@ public virtual Album Album { get; set; } public virtual Order Order { get; set; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/SampleData.cs b/samples/react/MusicStore/Apis/Models/SampleData.cs index 95ed0b3..ca81996 100644 --- a/samples/react/MusicStore/Apis/Models/SampleData.cs +++ b/samples/react/MusicStore/Apis/Models/SampleData.cs @@ -42,13 +42,13 @@ namespace MusicStore.Models { // Query in a separate context so that we can attach existing entities as modified List existingData; - + using (var scope = serviceProvider.GetRequiredService().CreateScope()) using (var db = scope.ServiceProvider.GetService()) { existingData = db.Set().ToList(); } - + using (var scope = serviceProvider.GetRequiredService().CreateScope()) using (var db = scope.ServiceProvider.GetService()) { @@ -65,8 +65,8 @@ namespace MusicStore.Models private static Album[] GetAlbums(string imgUrl, Dictionary genres, Dictionary artists) { - var albums = new Album[] - { + var albums = new Album[] + { new Album { Title = "The Best Of The Men At Work", Genre = genres["Pop"], Price = 8.99M, Artist = artists["Men At Work"], AlbumArtUrl = imgUrl }, new Album { Title = "...And Justice For All", Genre = genres["Metal"], Price = 8.99M, Artist = artists["Metallica"], AlbumArtUrl = imgUrl }, new Album { Title = "עד גבול האור", Genre = genres["World"], Price = 8.99M, Artist = artists["אריק אינשטיין"], AlbumArtUrl = imgUrl }, @@ -912,4 +912,4 @@ namespace MusicStore.Models } } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs b/samples/react/MusicStore/Apis/Models/ShoppingCart.cs index 41b3277..3e42600 100644 --- a/samples/react/MusicStore/Apis/Models/ShoppingCart.cs +++ b/samples/react/MusicStore/Apis/Models/ShoppingCart.cs @@ -123,7 +123,7 @@ namespace MusicStore.Models public decimal GetTotal() { - // Multiply album price by count of that album to get + // Multiply album price by count of that album to get // the current price for each of those albums in the cart // sum all album price totals to get the cart total @@ -190,7 +190,7 @@ namespace MusicStore.Models if (string.IsNullOrWhiteSpace(sessionCookie)) { - //A GUID to hold the cartId. + //A GUID to hold the cartId. cartId = Guid.NewGuid().ToString(); // Send cart Id as a cookie to the client. @@ -204,4 +204,4 @@ namespace MusicStore.Models return cartId; } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs b/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs index 7c0a9cd..d4b73c6 100644 --- a/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs +++ b/samples/react/MusicStore/Infrastructure/NoCacheAttribute.cs @@ -16,4 +16,4 @@ namespace MusicStore.Infrastructure base.OnResultExecuting(context); } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/Infrastructure/PagedList.cs b/samples/react/MusicStore/Infrastructure/PagedList.cs index 98c5b13..b5593a6 100644 --- a/samples/react/MusicStore/Infrastructure/PagedList.cs +++ b/samples/react/MusicStore/Infrastructure/PagedList.cs @@ -147,4 +147,4 @@ namespace MusicStore.Infrastructure public int PageSize { get; set; } } } -} \ No newline at end of file +} diff --git a/samples/react/MusicStore/ReactApp/boot-server.tsx b/samples/react/MusicStore/ReactApp/boot-server.tsx index c0df3ab..4bf5d6e 100644 --- a/samples/react/MusicStore/ReactApp/boot-server.tsx +++ b/samples/react/MusicStore/ReactApp/boot-server.tsx @@ -21,7 +21,7 @@ export default function (params: any): Promise<{ html: string }> { const app = ( - + ); // Perform an initial render that will cause any async tasks (e.g., data access) to begin diff --git a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx b/samples/react/MusicStore/ReactApp/components/NavMenu.tsx index 867fc90..6e85da8 100644 --- a/samples/react/MusicStore/ReactApp/components/NavMenu.tsx +++ b/samples/react/MusicStore/ReactApp/components/NavMenu.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import * as React from 'react'; import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap'; import { Link } from 'react-router'; import { LinkContainer } from 'react-router-bootstrap'; @@ -25,7 +25,7 @@ class NavMenu extends React.Component { {genres.map(genre => { genre.Name } - + )} More… @@ -43,7 +43,7 @@ class NavMenu extends React.Component { // Selects which part of global state maps to this component, and defines a type for the resulting props const provider = provide( (state: ApplicationState) => state.genreList, - GenreList.actionCreators + GenreList.actionCreators ); type NavMenuProps = typeof provider.allProps; export default provider.connect(NavMenu); diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx index 5cac2c7..6e6fab2 100644 --- a/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx +++ b/samples/react/MusicStore/ReactApp/components/public/AlbumDetails.tsx @@ -22,9 +22,9 @@ class AlbumDetails extends React.Component { const albumData = this.props.album; return

{ albumData.Title }

- +

{

- +

Genre: diff --git a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx b/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx index d93af5d..04b74d5 100644 --- a/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx +++ b/samples/react/MusicStore/ReactApp/components/public/AlbumTile.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import * as React from 'react'; import { Link } from 'react-router'; import { Album } from '../../store/FeaturedAlbums'; diff --git a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx b/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx index 3ba789f..59dc50b 100644 --- a/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx +++ b/samples/react/MusicStore/ReactApp/components/public/GenreDetails.tsx @@ -13,7 +13,7 @@ class GenreDetails extends React.Component { componentWillMount() { this.props.requestGenreDetails(parseInt(this.props.params.genreId)); } - + componentWillReceiveProps(nextProps: GenreDetailsProps) { this.props.requestGenreDetails(parseInt(nextProps.params.genreId)); } diff --git a/samples/react/MusicStore/ReactApp/configureStore.ts b/samples/react/MusicStore/ReactApp/configureStore.ts index 9fad3d3..9274c22 100644 --- a/samples/react/MusicStore/ReactApp/configureStore.ts +++ b/samples/react/MusicStore/ReactApp/configureStore.ts @@ -10,7 +10,7 @@ export default function configureStore(history: HistoryModule.History, initialSt const reduxRouterMiddleware = syncHistory(history); const middlewares = [thunk, reduxRouterMiddleware, typedToPlain]; const devToolsExtension = null;//(window as any).devToolsExtension; // If devTools is installed, connect to it - + const finalCreateStore = compose( applyMiddleware(...middlewares), devToolsExtension ? devToolsExtension() : f => f @@ -20,10 +20,10 @@ export default function configureStore(history: HistoryModule.History, initialSt const allReducers = buildRootReducer(Store.reducers); const store = finalCreateStore(allReducers, initialState) as Redux.Store; - + // Required for replaying actions from devtools to work reduxRouterMiddleware.listenForReplays(store); - + // Enable Webpack hot module replacement for reducers if (module.hot) { module.hot.accept('./store', () => { diff --git a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts index 0edb2a4..247c947 100644 --- a/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts +++ b/samples/react/MusicStore/ReactApp/store/AlbumDetails.ts @@ -47,7 +47,7 @@ class ReceiveAlbumDetails extends Action { // ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. // They don't directly mutate state, but they can have external side-effects (such as loading data). -export const actionCreators = { +export const actionCreators = { requestAlbumDetails: (albumId: number): ActionCreator => (dispatch, getState) => { // Only load if it's not already loaded (or currently being loaded) if (albumId !== getState().albumDetails.requestedAlbumId) { @@ -59,7 +59,7 @@ export const actionCreators = { dispatch(new ReceiveAlbumDetails(album)); } }); - + dispatch(new RequestAlbumDetails(albumId)); } } diff --git a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts index 1824ab2..a3d13b1 100644 --- a/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts +++ b/samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts @@ -42,7 +42,7 @@ export const actionCreators = { fetch('/api/albums/mostPopular') .then(results => results.json()) .then(albums => dispatch(new ReceiveFeaturedAlbums(albums))); - + return dispatch(new RequestFeaturedAlbums()); } } diff --git a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts index 6640e06..2a5f8ff 100644 --- a/samples/react/MusicStore/ReactApp/store/GenreDetails.ts +++ b/samples/react/MusicStore/ReactApp/store/GenreDetails.ts @@ -35,7 +35,7 @@ class ReceiveGenreDetails extends Action { // ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. // They don't directly mutate state, but they can have external side-effects (such as loading data). -export const actionCreators = { +export const actionCreators = { requestGenreDetails: (genreId: number): ActionCreator => (dispatch, getState) => { // Only load if it's not already loaded (or currently being loaded) if (genreId !== getState().genreDetails.requestedGenreId) { @@ -44,10 +44,10 @@ export const actionCreators = { .then(albums => { // Only replace state if it's still the most recent request if (genreId === getState().genreDetails.requestedGenreId) { - dispatch(new ReceiveGenreDetails(genreId, albums)); + dispatch(new ReceiveGenreDetails(genreId, albums)); } }); - + dispatch(new RequestGenreDetails(genreId)); } } diff --git a/samples/react/MusicStore/ReactApp/store/GenreList.ts b/samples/react/MusicStore/ReactApp/store/GenreList.ts index 133fad4..e24e32c 100644 --- a/samples/react/MusicStore/ReactApp/store/GenreList.ts +++ b/samples/react/MusicStore/ReactApp/store/GenreList.ts @@ -31,7 +31,7 @@ class ReceiveGenresList extends Action { // ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition. // They don't directly mutate state, but they can have external side-effects (such as loading data). -export const actionCreators = { +export const actionCreators = { requestGenresList: (): ActionCreator => (dispatch, getState) => { if (!getState().genreList.isLoaded) { fetch('/api/genres') diff --git a/samples/react/MusicStore/ReactApp/store/index.ts b/samples/react/MusicStore/ReactApp/store/index.ts index 4688b21..50f6178 100644 --- a/samples/react/MusicStore/ReactApp/store/index.ts +++ b/samples/react/MusicStore/ReactApp/store/index.ts @@ -23,5 +23,5 @@ export const reducers = { }; // This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are -// correctly typed to match your store. +// correctly typed to match your store. export type ActionCreator = ActionCreatorGeneric; diff --git a/samples/react/MusicStore/Startup.cs b/samples/react/MusicStore/Startup.cs index 3e601f5..fc94961 100755 --- a/samples/react/MusicStore/Startup.cs +++ b/samples/react/MusicStore/Startup.cs @@ -41,7 +41,7 @@ namespace MusicStore // Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers. // You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json. // services.AddWebApiConventions(); - + // Add EF services to the service container services.AddEntityFramework() .AddSqlite() @@ -78,7 +78,7 @@ namespace MusicStore public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(LogLevel.Warning); - + // Initialize the sample data SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait(); @@ -89,7 +89,7 @@ namespace MusicStore } app.UseIISPlatformHandler(); - + // In dev mode, the JS/TS/etc is compiled and served dynamically and supports hot replacement. // In production, we assume you've used webpack to emit the prebuilt content to disk. if (env.IsDevelopment()) { @@ -105,7 +105,7 @@ namespace MusicStore routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); - + routes.MapSpaFallbackRoute( name: "spa-fallback", defaults: new { controller = "Home", action = "Index" }); diff --git a/samples/react/MusicStore/Views/Home/Index.cshtml b/samples/react/MusicStore/Views/Home/Index.cshtml index b3e8731..9595e01 100755 --- a/samples/react/MusicStore/Views/Home/Index.cshtml +++ b/samples/react/MusicStore/Views/Home/Index.cshtml @@ -1,11 +1,11 @@ -@{ - ViewData["Title"] = "Home Page"; -} - -

- -@section scripts { - - -} +@{ + ViewData["Title"] = "Home Page"; +} + +
+ +@section scripts { + + +} diff --git a/samples/react/MusicStore/Views/Shared/Error.cshtml b/samples/react/MusicStore/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/samples/react/MusicStore/Views/Shared/Error.cshtml +++ b/samples/react/MusicStore/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/samples/react/MusicStore/Views/Shared/_Layout.cshtml b/samples/react/MusicStore/Views/Shared/_Layout.cshtml index f64f7f5..47e4e48 100755 --- a/samples/react/MusicStore/Views/Shared/_Layout.cshtml +++ b/samples/react/MusicStore/Views/Shared/_Layout.cshtml @@ -1,12 +1,12 @@ - - - - - @ViewData["Title"] - - - - @RenderBody() - @RenderSection("scripts", required: false) - - + + + + + @ViewData["Title"] + + + + @RenderBody() + @RenderSection("scripts", required: false) + + diff --git a/samples/react/MusicStore/Views/_ViewImports.cshtml b/samples/react/MusicStore/Views/_ViewImports.cshtml index 89b9e8f..3f89d8a 100755 --- a/samples/react/MusicStore/Views/_ViewImports.cshtml +++ b/samples/react/MusicStore/Views/_ViewImports.cshtml @@ -1,3 +1,3 @@ -@using MusicStore -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNet.SpaServices" +@using MusicStore +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@addTagHelper "*, Microsoft.AspNet.SpaServices" diff --git a/samples/react/MusicStore/Views/_ViewStart.cshtml b/samples/react/MusicStore/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/samples/react/MusicStore/Views/_ViewStart.cshtml +++ b/samples/react/MusicStore/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/samples/react/MusicStore/wwwroot/web.config b/samples/react/MusicStore/wwwroot/web.config index db6e6f4..e70a777 100644 --- a/samples/react/MusicStore/wwwroot/web.config +++ b/samples/react/MusicStore/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/samples/react/ReactGrid/Controllers/PeopleApiController.cs b/samples/react/ReactGrid/Controllers/PeopleApiController.cs index 4ca743d..4cba391 100644 --- a/samples/react/ReactGrid/Controllers/PeopleApiController.cs +++ b/samples/react/ReactGrid/Controllers/PeopleApiController.cs @@ -16,14 +16,14 @@ namespace ReactExample.Controllers } } } - + public class PersonDto { public string name { get; set; } public string city { get; set; } public string state { get; set; } public string country { get; set; } public string company { get; set; } - + [Range(1, 10)] public int favoriteNumber { get; set; } } diff --git a/samples/react/ReactGrid/ReactApp/boot-server.jsx b/samples/react/ReactGrid/ReactApp/boot-server.jsx index c132f0a..b41e0c7 100644 --- a/samples/react/ReactGrid/ReactApp/boot-server.jsx +++ b/samples/react/ReactGrid/ReactApp/boot-server.jsx @@ -16,7 +16,7 @@ export default function renderApp (params) { const app = ; // Render it as an HTML string which can be injected into the response - const html = renderToString(app); + const html = renderToString(app); resolve({ html }); }); }); diff --git a/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx b/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx index 2bda259..50a3008 100644 --- a/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx +++ b/samples/react/ReactGrid/ReactApp/components/CustomPager.jsx @@ -5,7 +5,7 @@ export class CustomPager extends React.Component { pageChange(event) { this.props.setPage(parseInt(event.target.getAttribute("data-value"))); } - + render() { var previous = null; var next = null; @@ -47,4 +47,4 @@ CustomPager.defaultProps = { nextText: '', previousText: '', currentPage: 0 -}; \ No newline at end of file +}; diff --git a/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx b/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx index 6cb11d5..3c78f58 100644 --- a/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx +++ b/samples/react/ReactGrid/ReactApp/components/PersonEditor.jsx @@ -8,11 +8,11 @@ export class PersonEditor extends React.Component { super(); this.state = { savedChanges: false }; } - + onChange() { this.setState({ savedChanges: false }); } - + submit(model, reset, setErrors) { PersonEditor.sendJson('put', `/api/people/${ this.props.params.personId }`, model).then(response => { if (response.ok) { @@ -23,7 +23,7 @@ export class PersonEditor extends React.Component { } }); } - + render() { var personId = parseInt(this.props.params.personId); var person = fakeData.filter(p => p.id === personId)[0]; @@ -46,12 +46,12 @@ export class PersonEditor extends React.Component {
; } - + static sendJson(method, url, object) { return fetch(url, { method: method, headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(object) + body: JSON.stringify(object) }); } } diff --git a/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx b/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx index 6978f1d..64977a7 100644 --- a/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx +++ b/samples/react/ReactGrid/ReactApp/components/ReactApp.jsx @@ -6,7 +6,7 @@ import { PersonEditor } from './PersonEditor.jsx'; export const routes = - + ; export class ReactApp extends React.Component { diff --git a/samples/react/ReactGrid/ReactGrid.xproj b/samples/react/ReactGrid/ReactGrid.xproj index d2d598c..eeab8af 100644 --- a/samples/react/ReactGrid/ReactGrid.xproj +++ b/samples/react/ReactGrid/ReactGrid.xproj @@ -16,4 +16,4 @@ 2311 - \ No newline at end of file + diff --git a/samples/react/ReactGrid/Startup.cs b/samples/react/ReactGrid/Startup.cs index 6024c42..caa0d48 100755 --- a/samples/react/ReactGrid/Startup.cs +++ b/samples/react/ReactGrid/Startup.cs @@ -52,7 +52,7 @@ namespace ReactExample // send the request to the following path or controller action. app.UseExceptionHandler("/Home/Error"); } - + // In dev mode, the JS/TS/etc is compiled and served dynamically and supports hot replacement. // In production, we assume you've used webpack to emit the prebuilt content to disk. if (env.IsDevelopment()) { diff --git a/samples/react/ReactGrid/Views/Home/Index.cshtml b/samples/react/ReactGrid/Views/Home/Index.cshtml index 41e56b4..59b13d5 100755 --- a/samples/react/ReactGrid/Views/Home/Index.cshtml +++ b/samples/react/ReactGrid/Views/Home/Index.cshtml @@ -1,6 +1,6 @@ -
- -@section scripts { - -} +
+ +@section scripts { + +} diff --git a/samples/react/ReactGrid/Views/Shared/Error.cshtml b/samples/react/ReactGrid/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/samples/react/ReactGrid/Views/Shared/Error.cshtml +++ b/samples/react/ReactGrid/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/samples/react/ReactGrid/Views/Shared/_Layout.cshtml b/samples/react/ReactGrid/Views/Shared/_Layout.cshtml index 0d504fc..7ea6273 100755 --- a/samples/react/ReactGrid/Views/Shared/_Layout.cshtml +++ b/samples/react/ReactGrid/Views/Shared/_Layout.cshtml @@ -1,14 +1,14 @@ - - - - - ReactExample - - - -
- @RenderBody() -
- @RenderSection("scripts", required: false) - - + + + + + ReactExample + + + +
+ @RenderBody() +
+ @RenderSection("scripts", required: false) + + diff --git a/samples/react/ReactGrid/Views/_ViewImports.cshtml b/samples/react/ReactGrid/Views/_ViewImports.cshtml index 5746f7e..9a3224d 100755 --- a/samples/react/ReactGrid/Views/_ViewImports.cshtml +++ b/samples/react/ReactGrid/Views/_ViewImports.cshtml @@ -1,3 +1,3 @@ -@using ReactExample -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" -@addTagHelper "*, Microsoft.AspNet.SpaServices" +@using ReactExample +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@addTagHelper "*, Microsoft.AspNet.SpaServices" diff --git a/samples/react/ReactGrid/Views/_ViewStart.cshtml b/samples/react/ReactGrid/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/samples/react/ReactGrid/Views/_ViewStart.cshtml +++ b/samples/react/ReactGrid/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/samples/react/ReactGrid/project.json b/samples/react/ReactGrid/project.json index 87370b9..9876849 100755 --- a/samples/react/ReactGrid/project.json +++ b/samples/react/ReactGrid/project.json @@ -40,4 +40,4 @@ "npm install" ] } -} \ No newline at end of file +} diff --git a/samples/react/ReactGrid/wwwroot/web.config b/samples/react/ReactGrid/wwwroot/web.config index db6e6f4..e70a777 100644 --- a/samples/react/ReactGrid/wwwroot/web.config +++ b/samples/react/ReactGrid/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/Microsoft.AspNet.AngularServices/AngularPrerenderTagHelper.cs b/src/Microsoft.AspNet.AngularServices/AngularPrerenderTagHelper.cs index fc7c447..99ffaa7 100644 --- a/src/Microsoft.AspNet.AngularServices/AngularPrerenderTagHelper.cs +++ b/src/Microsoft.AspNet.AngularServices/AngularPrerenderTagHelper.cs @@ -12,13 +12,13 @@ namespace Microsoft.AspNet.AngularServices public class AngularPrerenderTagHelper : TagHelper { static INodeServices fallbackNodeServices; // Used only if no INodeServices was registered with DI - + const string PrerenderModuleAttributeName = "asp-ng2-prerender-module"; const string PrerenderExportAttributeName = "asp-ng2-prerender-export"; - + [HtmlAttributeName(PrerenderModuleAttributeName)] public string ModuleName { get; set; } - + [HtmlAttributeName(PrerenderExportAttributeName)] public string ExportName { get; set; } @@ -29,7 +29,7 @@ namespace Microsoft.AspNet.AngularServices { this.contextAccessor = contextAccessor; this.nodeServices = (INodeServices)serviceProvider.GetService(typeof (INodeServices)) ?? fallbackNodeServices; - + // Consider removing the following. Having it means you can get away with not putting app.AddNodeServices() // in your startup file, but then again it might be confusing that you don't need to. if (this.nodeServices == null) { diff --git a/src/Microsoft.AspNet.AngularServices/AngularRenderer.cs b/src/Microsoft.AspNet.AngularServices/AngularRenderer.cs index 5c52cb6..900c701 100644 --- a/src/Microsoft.AspNet.AngularServices/AngularRenderer.cs +++ b/src/Microsoft.AspNet.AngularServices/AngularRenderer.cs @@ -6,13 +6,13 @@ namespace Microsoft.AspNet.AngularServices public static class AngularRenderer { private static StringAsTempFile nodeScript; - + static AngularRenderer() { // Consider populating this lazily var script = EmbeddedResourceReader.Read(typeof (AngularRenderer), "/Content/Node/angular-rendering.js"); nodeScript = new StringAsTempFile(script); // Will be cleaned up on process exit } - + public static async Task RenderToString(INodeServices nodeServices, string componentModuleName, string componentExportName, string componentTagName, string requestUrl) { return await nodeServices.InvokeExport(nodeScript.FileName, "renderToString", new { moduleName = componentModuleName, diff --git a/src/Microsoft.AspNet.AngularServices/Content/Node/angular-rendering.js b/src/Microsoft.AspNet.AngularServices/Content/Node/angular-rendering.js index db75eb3..5afd015 100644 --- a/src/Microsoft.AspNet.AngularServices/Content/Node/angular-rendering.js +++ b/src/Microsoft.AspNet.AngularServices/Content/Node/angular-rendering.js @@ -18,7 +18,7 @@ function findAngularComponent(options) { // If exportName is specified explicitly, use it return getExportOrThrow(loadedModule, resolvedPath, options.exportName); } else if (typeof loadedModule === 'function') { - // Otherwise, if the module itself is a function, assume that is the component + // Otherwise, if the module itself is a function, assume that is the component return loadedModule; } else if (typeof loadedModule.default === 'function') { // Otherwise, if the module has a default export which is a function, assume that is the component diff --git a/src/Microsoft.AspNet.AngularServices/Microsoft.AspNet.AngularServices.xproj b/src/Microsoft.AspNet.AngularServices/Microsoft.AspNet.AngularServices.xproj index 984caa4..82193b4 100644 --- a/src/Microsoft.AspNet.AngularServices/Microsoft.AspNet.AngularServices.xproj +++ b/src/Microsoft.AspNet.AngularServices/Microsoft.AspNet.AngularServices.xproj @@ -16,4 +16,4 @@ 2.0 - \ No newline at end of file + diff --git a/src/Microsoft.AspNet.AngularServices/PrimeCacheHelper.cs b/src/Microsoft.AspNet.AngularServices/PrimeCacheHelper.cs index a0f8859..8f6cd4f 100644 --- a/src/Microsoft.AspNet.AngularServices/PrimeCacheHelper.cs +++ b/src/Microsoft.AspNet.AngularServices/PrimeCacheHelper.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.AngularServices { // TODO: Consider deduplicating the PrimeCache calls (that is, if there are multiple requests to precache // the same URL, only return nonempty for one of them). This will make it easier to auto-prime-cache any // HTTP requests made during server-side rendering, without risking unnecessary duplicate requests. - + if (string.IsNullOrEmpty(url)) { throw new ArgumentException("Value cannot be null or empty", "url"); } @@ -41,4 +41,4 @@ namespace Microsoft.AspNet.AngularServices { ); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNet.AngularServices/npm/build.js b/src/Microsoft.AspNet.AngularServices/npm/build.js index 937708a..876e152 100644 --- a/src/Microsoft.AspNet.AngularServices/npm/build.js +++ b/src/Microsoft.AspNet.AngularServices/npm/build.js @@ -20,7 +20,7 @@ builder.config({ var entryPoint = 'dist/Exports'; var tasks = [ builder.bundle(entryPoint, './bundles/angular2-aspnet.js'), - builder.bundle(entryPoint, './bundles/angular2-aspnet.min.js', { minify: true }) + builder.bundle(entryPoint, './bundles/angular2-aspnet.min.js', { minify: true }) ]; Promise.all(tasks) diff --git a/src/Microsoft.AspNet.AngularServices/npm/readme.md b/src/Microsoft.AspNet.AngularServices/npm/readme.md index ed257e3..cb0461f 100644 --- a/src/Microsoft.AspNet.AngularServices/npm/readme.md +++ b/src/Microsoft.AspNet.AngularServices/npm/readme.md @@ -1,7 +1,7 @@ If you just want to use this package, then you *don't have to build it*. Instead, just grab the prebuilt package from NPM: npm install angular2-aspnet - + The rest of this file is notes for anyone contributing to this package itself. ## How to build @@ -10,7 +10,7 @@ Run the following: npm install npm run prepublish - + Requirements: * Node, NPM @@ -25,16 +25,16 @@ so that developers get a good IDE experience when consuming it. The build process is therefore: 1. Compile the TypeScript to produce the development-time (.d.ts) and server-side (.js) artifacts - + `tsc` reads `tsconfig.json` and is instructed to compile all the `.ts` files in `src/`. It produces a corresponding structure of `.js` and `.d.ts` files in `dist/`. - + When a developer consumes the resulting package (via `npm install angular2-aspnet`), - + - No additional copy of `angular2` will be installed, because this package's dependency on it is declared as a `peerDependency`. This means it will work with whatever (compatible) version of `angular2` is already installed. - At runtime inside Node.js, the `main` configuration in `package.json` means the developer can use a standard - `import` statement to consume this package (i.e., `import * from 'angular2-aspnet';` in either JS or TS files). + `import` statement to consume this package (i.e., `import * from 'angular2-aspnet';` in either JS or TS files). - At development time inside an IDE such as Visual Studio Code, the `typings` configuration in `package.json` means the IDE will use the corresponding `.d.ts` file as type metadata for the variable imported that way. @@ -43,17 +43,17 @@ The build process is therefore: `build.js` uses the SystemJS Builder API to combine files in `dist/` into `.js` files ready for use in client-side SystemJS environments, and puts them in `bundles/`. The bundle files contain `System.register` calls so that any other part of your client-side code that tries to import `angular2-aspnet` via SystemJS will get that module at runtime. - + To make it work in an application: - Set up some build step that copies your chosen bundle file from `bundles/` to some location where it will be served to the client - Below your ` -} +@{ + ViewData["Title"] = "Home Page"; +} + + + + + +@section scripts { + +} diff --git a/templates/WebApplicationBasic/Views/Shared/Error.cshtml b/templates/WebApplicationBasic/Views/Shared/Error.cshtml index a288cb0..473b35d 100755 --- a/templates/WebApplicationBasic/Views/Shared/Error.cshtml +++ b/templates/WebApplicationBasic/Views/Shared/Error.cshtml @@ -1,6 +1,6 @@ -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

+@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

diff --git a/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml b/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml index 39d0e3f..c095086 100755 --- a/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml +++ b/templates/WebApplicationBasic/Views/Shared/_Layout.cshtml @@ -1,44 +1,44 @@ - - - - - - @ViewData["Title"] - WebApplicationBasic - - - - - - - -
- @RenderBody() -
-
-

© 2016 - WebApplicationBasic

-
-
- - - @RenderSection("scripts", required: false) - - + + + + + + @ViewData["Title"] - WebApplicationBasic + + + + + + + +
+ @RenderBody() +
+
+

© 2016 - WebApplicationBasic

+
+
+ + + @RenderSection("scripts", required: false) + + diff --git a/templates/WebApplicationBasic/Views/_ViewImports.cshtml b/templates/WebApplicationBasic/Views/_ViewImports.cshtml index 7252adc..1d8ab6f 100755 --- a/templates/WebApplicationBasic/Views/_ViewImports.cshtml +++ b/templates/WebApplicationBasic/Views/_ViewImports.cshtml @@ -1,2 +1,2 @@ -@using WebApplicationBasic -@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" +@using WebApplicationBasic +@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" diff --git a/templates/WebApplicationBasic/Views/_ViewStart.cshtml b/templates/WebApplicationBasic/Views/_ViewStart.cshtml index 66b5da2..820a2f6 100755 --- a/templates/WebApplicationBasic/Views/_ViewStart.cshtml +++ b/templates/WebApplicationBasic/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ - Layout = "_Layout"; -} +@{ + Layout = "_Layout"; +} diff --git a/templates/WebApplicationBasic/webpack.config.prod.js b/templates/WebApplicationBasic/webpack.config.prod.js index 302dd3c..846e8e1 100644 --- a/templates/WebApplicationBasic/webpack.config.prod.js +++ b/templates/WebApplicationBasic/webpack.config.prod.js @@ -9,7 +9,7 @@ module.exports = { ] }, plugins: [ - extractCSS, + extractCSS, new webpack.optimize.UglifyJsPlugin({ minimize: true }) ] }; diff --git a/templates/WebApplicationBasic/wwwroot/web.config b/templates/WebApplicationBasic/wwwroot/web.config index db6e6f4..e70a777 100644 --- a/templates/WebApplicationBasic/wwwroot/web.config +++ b/templates/WebApplicationBasic/wwwroot/web.config @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + +