├── LICENSE.md ├── MovieHunter.API ├── App_Data │ ├── actors.json │ └── movies.json ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ └── WebApiConfig.cs ├── Areas │ └── HelpPage │ │ ├── ApiDescriptionExtensions.cs │ │ ├── App_Start │ │ └── HelpPageConfig.cs │ │ ├── Controllers │ │ └── HelpController.cs │ │ ├── HelpPage.css │ │ ├── HelpPageAreaRegistration.cs │ │ ├── HelpPageConfigurationExtensions.cs │ │ ├── ModelDescriptions │ │ ├── CollectionModelDescription.cs │ │ ├── ComplexTypeModelDescription.cs │ │ ├── DictionaryModelDescription.cs │ │ ├── EnumTypeModelDescription.cs │ │ ├── EnumValueDescription.cs │ │ ├── IModelDocumentationProvider.cs │ │ ├── KeyValuePairModelDescription.cs │ │ ├── ModelDescription.cs │ │ ├── ModelDescriptionGenerator.cs │ │ ├── ModelNameAttribute.cs │ │ ├── ModelNameHelper.cs │ │ ├── ParameterAnnotation.cs │ │ ├── ParameterDescription.cs │ │ └── SimpleTypeModelDescription.cs │ │ ├── Models │ │ └── HelpPageApiModel.cs │ │ ├── SampleGeneration │ │ ├── HelpPageSampleGenerator.cs │ │ ├── HelpPageSampleKey.cs │ │ ├── ImageSample.cs │ │ ├── InvalidSample.cs │ │ ├── ObjectGenerator.cs │ │ ├── SampleDirection.cs │ │ └── TextSample.cs │ │ ├── Views │ │ ├── Help │ │ │ ├── Api.cshtml │ │ │ ├── DisplayTemplates │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ ├── CollectionModelDescription.cshtml │ │ │ │ ├── ComplexTypeModelDescription.cshtml │ │ │ │ ├── DictionaryModelDescription.cshtml │ │ │ │ ├── EnumTypeModelDescription.cshtml │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ ├── ImageSample.cshtml │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ ├── KeyValuePairModelDescription.cshtml │ │ │ │ ├── ModelDescriptionLink.cshtml │ │ │ │ ├── Parameters.cshtml │ │ │ │ ├── Samples.cshtml │ │ │ │ ├── SimpleTypeModelDescription.cshtml │ │ │ │ └── TextSample.cshtml │ │ │ ├── Index.cshtml │ │ │ └── ResourceModel.cshtml │ │ ├── Shared │ │ │ └── _Layout.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ │ └── XmlDocumentationProvider.cs ├── Content │ ├── Site.css │ ├── bootstrap.css │ └── bootstrap.min.css ├── Controllers │ ├── ActorsController.cs │ ├── HomeController.cs │ └── MoviesController.cs ├── Global.asax ├── Global.asax.cs ├── Models │ ├── Actor.cs │ ├── ActorRepository.cs │ ├── Movie.cs │ └── MovieRepository.cs ├── MovieHunter.API.csproj ├── Project_Readme.html ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── _references.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.10.2.intellisense.js │ ├── jquery-1.10.2.js │ ├── jquery-1.10.2.min.js │ ├── jquery-1.10.2.min.map │ ├── modernizr-2.6.2.js │ ├── respond.js │ └── respond.min.js ├── Views │ ├── Home │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── packages.config ├── MovieHunter.UI ├── Content │ ├── app.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ └── bootstrap.min.css ├── Web.Debug.config ├── Web.config ├── app │ ├── app.js │ ├── movieDetail │ │ ├── actorDetailCtrl.js │ │ ├── actorDetailView.html │ │ ├── movieDetailCtrl.js │ │ └── movieDetailView.html │ ├── movieSearch │ │ ├── searchByActorCtrl.js │ │ ├── searchByActorView.html │ │ ├── searchByTitleCtrl.js │ │ └── searchByTitleView.html │ └── welcomeView.html ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── images │ └── filmhunterlogo.png ├── index.html ├── packages.config └── scripts │ ├── angular-mocks.js │ ├── angular-route.js │ ├── angular.js │ ├── angular.min.js │ ├── angular.min.js.map │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.9.0.intellisense.js │ ├── jquery-1.9.0.js │ ├── jquery-1.9.0.min.js │ └── jquery-1.9.0.min.map ├── MovieHunter.sln ├── MovieHunter.v12.suo ├── README.md └── packages ├── AngularJS.Core.1.2.23 ├── AngularJS.Core.1.2.23.nupkg └── content │ └── scripts │ ├── angular-mocks.js │ ├── angular.js │ ├── angular.min.js │ └── angular.min.js.map ├── Antlr.3.4.1.9004 ├── Antlr.3.4.1.9004.nupkg └── lib │ ├── Antlr3.Runtime.dll │ └── Antlr3.Runtime.pdb ├── Microsoft.AspNet.Cors.5.1.2 ├── Microsoft.AspNet.Cors.5.1.2.nupkg └── lib │ └── net45 │ └── System.Web.Cors.dll ├── Microsoft.AspNet.Mvc.5.1.2 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.Mvc.5.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Mvc.dll │ └── System.Web.Mvc.xml ├── Microsoft.AspNet.Razor.3.1.2 ├── Microsoft.AspNet.Razor.3.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Razor.dll │ └── System.Web.Razor.xml ├── Microsoft.AspNet.Web.Optimization.1.1.3 ├── Microsoft.AspNet.Web.Optimization.1.1.3.nupkg └── lib │ └── net40 │ ├── System.Web.Optimization.dll │ └── system.web.optimization.xml ├── Microsoft.AspNet.WebApi.5.1.2 └── Microsoft.AspNet.WebApi.5.1.2.nupkg ├── Microsoft.AspNet.WebApi.Client.5.1.2 ├── Microsoft.AspNet.WebApi.Client.5.1.2.nupkg └── lib │ ├── net45 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml │ └── portable-wp8+netcore45+net45 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml ├── Microsoft.AspNet.WebApi.Core.5.1.2 ├── Content │ └── web.config.transform ├── Microsoft.AspNet.WebApi.Core.5.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Http.dll │ └── System.Web.Http.xml ├── Microsoft.AspNet.WebApi.Cors.5.1.2 ├── Microsoft.AspNet.WebApi.Cors.5.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Http.Cors.dll │ └── System.Web.Http.Cors.xml ├── Microsoft.AspNet.WebApi.HelpPage.5.1.2 ├── Content │ └── Areas │ │ └── HelpPage │ │ ├── ApiDescriptionExtensions.cs.pp │ │ ├── App_Start │ │ └── HelpPageConfig.cs.pp │ │ ├── Controllers │ │ └── HelpController.cs.pp │ │ ├── HelpPage.css.pp │ │ ├── HelpPageAreaRegistration.cs.pp │ │ ├── HelpPageConfigurationExtensions.cs.pp │ │ ├── ModelDescriptions │ │ ├── CollectionModelDescription.cs.pp │ │ ├── ComplexTypeModelDescription.cs.pp │ │ ├── DictionaryModelDescription.cs.pp │ │ ├── EnumTypeModelDescription.cs.pp │ │ ├── EnumValueDescription.cs.pp │ │ ├── IModelDocumentationProvider.cs.pp │ │ ├── KeyValuePairModelDescription.cs.pp │ │ ├── ModelDescription.cs.pp │ │ ├── ModelDescriptionGenerator.cs.pp │ │ ├── ModelNameAttribute.cs.pp │ │ ├── ModelNameHelper.cs.pp │ │ ├── ParameterAnnotation.cs.pp │ │ ├── ParameterDescription.cs.pp │ │ └── SimpleTypeModelDescription.cs.pp │ │ ├── Models │ │ └── HelpPageApiModel.cs.pp │ │ ├── SampleGeneration │ │ ├── HelpPageSampleGenerator.cs.pp │ │ ├── HelpPageSampleKey.cs.pp │ │ ├── ImageSample.cs.pp │ │ ├── InvalidSample.cs.pp │ │ ├── ObjectGenerator.cs.pp │ │ ├── SampleDirection.cs.pp │ │ └── TextSample.cs.pp │ │ ├── Views │ │ ├── Help │ │ │ ├── Api.cshtml.pp │ │ │ ├── DisplayTemplates │ │ │ │ ├── ApiGroup.cshtml.pp │ │ │ │ ├── CollectionModelDescription.cshtml.pp │ │ │ │ ├── ComplexTypeModelDescription.cshtml.pp │ │ │ │ ├── DictionaryModelDescription.cshtml.pp │ │ │ │ ├── EnumTypeModelDescription.cshtml.pp │ │ │ │ ├── HelpPageApiModel.cshtml.pp │ │ │ │ ├── ImageSample.cshtml.pp │ │ │ │ ├── InvalidSample.cshtml.pp │ │ │ │ ├── KeyValuePairModelDescription.cshtml.pp │ │ │ │ ├── ModelDescriptionLink.cshtml.pp │ │ │ │ ├── Parameters.cshtml.pp │ │ │ │ ├── Samples.cshtml.pp │ │ │ │ ├── SimpleTypeModelDescription.cshtml.pp │ │ │ │ └── TextSample.cshtml.pp │ │ │ ├── Index.cshtml.pp │ │ │ └── ResourceModel.cshtml.pp │ │ ├── Shared │ │ │ └── _Layout.cshtml.pp │ │ ├── Web.config │ │ └── _ViewStart.cshtml.pp │ │ └── XmlDocumentationProvider.cs.pp └── Microsoft.AspNet.WebApi.HelpPage.5.1.2.nupkg ├── Microsoft.AspNet.WebApi.WebHost.5.1.2 ├── Microsoft.AspNet.WebApi.WebHost.5.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Http.WebHost.dll │ └── System.Web.Http.WebHost.xml ├── Microsoft.AspNet.WebPages.3.1.2 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.WebPages.3.1.2.nupkg └── lib │ └── net45 │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ └── System.Web.WebPages.xml ├── Microsoft.Web.Infrastructure.1.0.0.0 ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── Modernizr.2.6.2 ├── Content │ └── Scripts │ │ └── modernizr-2.6.2.js ├── Modernizr.2.6.2.nupkg └── Tools │ ├── common.ps1 │ ├── install.ps1 │ └── uninstall.ps1 ├── Newtonsoft.Json.5.0.6 ├── Newtonsoft.Json.5.0.6.nupkg └── lib │ ├── net20 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net35 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net40 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net45 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── netcore45 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl4+wp7+win8 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ └── portable-net45+wp80+win8 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml ├── Respond.1.2.0 ├── Respond.1.2.0.nupkg └── content │ └── Scripts │ ├── respond.js │ └── respond.min.js ├── Twitter.Bootstrap.3.0.1.1 ├── Twitter.Bootstrap.3.0.1.1.nupkg └── readme.txt ├── WebGrease.1.5.2 ├── WebGrease.1.5.2.nupkg ├── lib │ └── WebGrease.dll └── tools │ ├── WG.exe │ ├── install.ps1 │ └── uninstall.ps1 ├── bootstrap.3.0.0 ├── Content │ ├── Content │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── Scripts │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff └── bootstrap.3.0.0.nupkg ├── bootstrap.3.0.1 ├── bootstrap.3.0.1.nupkg └── content │ ├── Content │ ├── bootstrap-theme.css │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ └── bootstrap.min.css │ ├── Scripts │ ├── bootstrap.js │ └── bootstrap.min.js │ └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── jQuery.1.10.2 ├── Content │ └── Scripts │ │ ├── jquery-1.10.2-vsdoc.js │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ └── jquery-1.10.2.min.map ├── Tools │ ├── common.ps1 │ ├── install.ps1 │ ├── jquery-1.10.2.intellisense.js │ └── uninstall.ps1 └── jQuery.1.10.2.nupkg ├── jQuery.1.9.0 ├── Content │ └── Scripts │ │ ├── jquery-1.9.0-vsdoc.js │ │ ├── jquery-1.9.0.js │ │ ├── jquery-1.9.0.min.js │ │ └── jquery-1.9.0.min.map ├── Tools │ ├── common.ps1 │ ├── install.ps1 │ ├── jquery-1.9.0.intellisense.js │ └── uninstall.ps1 └── jQuery.1.9.0.nupkg └── repositories.config /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 InStep Technologies, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MovieHunter.API/App_Data/actors.json: -------------------------------------------------------------------------------- 1 | { 2 | "actorList": 3 | [{"actorId": "1", 4 | "name": "Elijah Wood", 5 | "birthDate": "January 28, 1981", 6 | "country": "USA", 7 | "imdbLink": "http://www.imdb.com/name/nm0000704/?ref_=tt_ov_st" 8 | }, 9 | {"actorId": "2", 10 | "name": "Ian McKellen", 11 | "birthDate": "May 25, 1939", 12 | "country": "UK", 13 | "imdbLink": "http://www.imdb.com/name/nm0005212/?ref_=tt_ov_st"}, 14 | {"actorId": "3", 15 | "name": "Orlando Bloom", 16 | "birthDate": "January 13, 1977", 17 | "country": "UK", 18 | "imdbLink": "http://www.imdb.com/name/nm0089217/?ref_=nv_sr_1"}, 19 | {"actorId": "4", 20 | "name": "Viggo Mortensen", 21 | "birthDate": "October 20, 1958", 22 | "country": "USA", 23 | "imdbLink": "http://www.imdb.com/name/nm0001557/?ref_=tt_ov_st"}, 24 | {"actorId": "5", 25 | "name": "Johnny Depp", 26 | "birthDate": "June 9, 1963", 27 | "country": "USA", 28 | "imdbLink": "http://www.imdb.com/name/nm0000136/?ref_=tt_ov_st"}, 29 | {"actorId": "6", 30 | "name": "Keira Knightley", 31 | "birthDate": "March 26, 1985", 32 | "country": "UK", 33 | "imdbLink": "http://www.imdb.com/name/nm0461136/?ref_=ttfc_fc_cl_t4"} 34 | ] 35 | 36 | } -------------------------------------------------------------------------------- /MovieHunter.API/App_Data/movies.json: -------------------------------------------------------------------------------- 1 | { 2 | "movieList": [ 3 | { 4 | "movieId": "1", 5 | "title": "The Lord of the Rings: The Fellowship of the Ring", 6 | "director": "Peter Jackson", 7 | "releaseDate": "December 19, 2001", 8 | "description": "A meek hobbit of the Shire and eight companions set out on a journey to Mount Doom to destroy the One Ring and the dark lord Sauron.", 9 | "mpaa": "pg-13", 10 | "imdbLink": "http://www.imdb.com/title/tt0120737/?ref_=nv_sr_1", 11 | "imageUrl": "http://www.coverwhiz.com/content/The-Lord-Of-The-Rings-The-Fellowship-Of-The-Ring_small.jpg", 12 | "keyActors": [ 13 | { "actorId": "1" }, 14 | { "actorId": "2" }, 15 | { "actorId": "3" }, 16 | { "actorId": "4" } 17 | ] 18 | }, 19 | { 20 | "movieId": "2", 21 | "title": "The Lord of the Rings: The Two Towers", 22 | "director": "Peter Jackson", 23 | "releaseDate": "December 18, 2002", 24 | "description": "While Frodo and Sam edge closer to Mordor with the help of the shifty Gollum, the divided fellowship makes a stand against Sauron's new ally, Saruman, and his hordes of Isengard.", 25 | "mpaa": "pg-13", 26 | "imdbLink": "http://www.imdb.com/title/tt0167261/?ref_=fn_al_tt_3", 27 | "imageUrl": "http://www.coverwhiz.com/content/The-Lord-Of-The-Rings-The-Two-Towers_small.jpg", 28 | "keyActors": [ 29 | { "actorId": "1" }, 30 | { "actorId": "2" }, 31 | { "actorId": "3" }, 32 | { "actorId": "4" } 33 | ] 34 | }, 35 | { 36 | "movieId": "3", 37 | "title": "The Lord of the Rings: The Return of the King", 38 | "director": "Peter Jackson", 39 | "releaseDate": "December 17, 2003", 40 | "description": "Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.", 41 | "mpaa": "pg-13", 42 | "imdbLink": "http://www.imdb.com/title/tt0167260/?ref_=fn_al_tt_2", 43 | "imageUrl": "http://www.coverwhiz.com/content/The-Lord-Of-The-Rings-The-Return-Of-The-King_small.jpg", 44 | "keyActors": [ 45 | { "actorId": "1" }, 46 | { "actorId": "2" }, 47 | { "actorId": "3" }, 48 | { "actorId": "4" } 49 | ] 50 | }, 51 | { 52 | "movieId": "4", 53 | "title": "The Point", 54 | "director": "Fred Wolf", 55 | "releaseDate": "February 2, 1971", 56 | "description": "An animated story of an unusual kingdom in which everything and everybody is pointed - except for a young boy named Oblio. Despite his round head, Oblio has many friends. But an evil count, jealous that Oblio is more popular than his own son, says that without a pointed head, Oblio is an outlaw. Along with his faithful dog Arrow, Oblio is exiled to the Pointless Forest. There, he has many fantastic experiences (including encounters with a 3-headed man, giant bees, a tree in the leaf-selling business, and a good-humored old rock). From his adventures, Oblio learns that it is not at all necessary to be pointed to have a point in life. Music composed and performed by Harry Nilsson ('Me and My Arrow'), who also wrote the story. ", 57 | "mpaa": "nr", 58 | "imdbLink": "http://www.imdb.com/title/tt0067595/?ref_=fn_al_tt_1", 59 | "keyActors": [ ] 60 | }, 61 | { 62 | "movieId": "5", 63 | "title": "Pirates Of The Caribbean: Curse Of The Black Pearl", 64 | "director": "Gore Verbinski", 65 | "releaseDate": "July 9, 2003", 66 | "description": "Blacksmith Will Turner teams up with eccentric pirate 'Captain' Jack Sparrow to save his love, the governor's daughter, from Jack's former pirate allies, who are now undead.", 67 | "mpaa": "pg-13", 68 | "imdbLink": "http://www.imdb.com/title/tt0325980/?ref_=nm_knf_i1", 69 | "imageUrl": "http://www.coverwhiz.com/content/Pirates-Of-The-Caribbean-Curse-Of-The-Black-Pearl.jpg", 70 | "keyActors": [ 71 | { "actorId": "3" }, 72 | { "actorId": "5" }, 73 | { "actorId": "6" } 74 | ] 75 | }, 76 | { 77 | "movieId": "6", 78 | "title": "Pirates Of The Caribbean: Dead Man's Chest", 79 | "director": "Gore Verbinski", 80 | "releaseDate": "July 7, 2006", 81 | "description": "Jack Sparrow races to recover the heart of Davy Jones to avoid enslaving his soul to Jones' service, as other friends and foes seek the heart for their own agenda as well.", 82 | "mpaa": "pg-13", 83 | "imdbLink": "http://www.imdb.com/title/tt0383574/?ref_=tt_rec_tt", 84 | "imageUrl": "http://www.coverwhiz.com/content/Pirates-Of-The-Caribbean-Dead-Mans-Chest.jpg", 85 | "keyActors": [ 86 | { "actorId": "3" }, 87 | { "actorId": "5" }, 88 | { "actorId": "6" } 89 | ] 90 | } 91 | ] 92 | } 93 | -------------------------------------------------------------------------------- /MovieHunter.API/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace MovieHunter.API 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 15 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 16 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 17 | "~/Scripts/modernizr-*")); 18 | 19 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 20 | "~/Scripts/bootstrap.js", 21 | "~/Scripts/respond.js")); 22 | 23 | bundles.Add(new StyleBundle("~/Content/css").Include( 24 | "~/Content/bootstrap.css", 25 | "~/Content/site.css")); 26 | 27 | // Set EnableOptimizations to false for debugging. For more information, 28 | // visit http://go.microsoft.com/fwlink/?LinkId=301862 29 | BundleTable.EnableOptimizations = true; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /MovieHunter.API/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace MovieHunter.API 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MovieHunter.API/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace MovieHunter.API 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MovieHunter.API/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | using System.Web.Http.Cors; 6 | 7 | namespace MovieHunter.API 8 | { 9 | public static class WebApiConfig 10 | { 11 | public static void Register(HttpConfiguration config) 12 | { 13 | // Web API configuration and services 14 | 15 | // Web API routes 16 | config.MapHttpAttributeRoutes(); 17 | 18 | config.Routes.MapHttpRoute( 19 | name: "DefaultApi", 20 | routeTemplate: "api/{controller}/{id}", 21 | defaults: new { id = RouteParameter.Optional } 22 | ); 23 | 24 | // Cross-origin resource sharing 25 | // Allows acces from a domain outside of the domain the resource 26 | // originated from. 27 | config.EnableCors(new EnableCorsAttribute("*", "*", "*")); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ApiDescriptionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace MovieHunter.API.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Controllers/HelpController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using MovieHunter.API.Areas.HelpPage.ModelDescriptions; 5 | using MovieHunter.API.Areas.HelpPage.Models; 6 | 7 | namespace MovieHunter.API.Areas.HelpPage.Controllers 8 | { 9 | /// 10 | /// The controller that will handle requests for the help page. 11 | /// 12 | public class HelpController : Controller 13 | { 14 | private const string ErrorViewName = "Error"; 15 | 16 | public HelpController() 17 | : this(GlobalConfiguration.Configuration) 18 | { 19 | } 20 | 21 | public HelpController(HttpConfiguration config) 22 | { 23 | Configuration = config; 24 | } 25 | 26 | public HttpConfiguration Configuration { get; private set; } 27 | 28 | public ActionResult Index() 29 | { 30 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 31 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 32 | } 33 | 34 | public ActionResult Api(string apiId) 35 | { 36 | if (!String.IsNullOrEmpty(apiId)) 37 | { 38 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 39 | if (apiModel != null) 40 | { 41 | return View(apiModel); 42 | } 43 | } 44 | 45 | return View(ErrorViewName); 46 | } 47 | 48 | public ActionResult ResourceModel(string modelName) 49 | { 50 | if (!String.IsNullOrEmpty(modelName)) 51 | { 52 | ModelDescriptionGenerator modelDescriptionGenerator = Configuration.GetModelDescriptionGenerator(); 53 | ModelDescription modelDescription; 54 | if (modelDescriptionGenerator.GeneratedModels.TryGetValue(modelName, out modelDescription)) 55 | { 56 | return View(modelDescription); 57 | } 58 | } 59 | 60 | return View(ErrorViewName); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/HelpPage.css: -------------------------------------------------------------------------------- 1 | .help-page h1, 2 | .help-page .h1, 3 | .help-page h2, 4 | .help-page .h2, 5 | .help-page h3, 6 | .help-page .h3, 7 | #body.help-page, 8 | .help-page-table th, 9 | .help-page-table pre, 10 | .help-page-table p { 11 | font-family: "Segoe UI Light", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif; 12 | } 13 | 14 | .help-page pre.wrapped { 15 | white-space: -moz-pre-wrap; 16 | white-space: -pre-wrap; 17 | white-space: -o-pre-wrap; 18 | white-space: pre-wrap; 19 | } 20 | 21 | .help-page .warning-message-container { 22 | margin-top: 20px; 23 | padding: 0 10px; 24 | color: #525252; 25 | background: #EFDCA9; 26 | border: 1px solid #CCCCCC; 27 | } 28 | 29 | .help-page-table { 30 | width: 100%; 31 | border-collapse: collapse; 32 | text-align: left; 33 | margin: 0px 0px 20px 0px; 34 | border-top: 1px solid #D4D4D4; 35 | } 36 | 37 | .help-page-table th { 38 | text-align: left; 39 | font-weight: bold; 40 | border-bottom: 1px solid #D4D4D4; 41 | padding: 5px 6px 5px 6px; 42 | } 43 | 44 | .help-page-table td { 45 | border-bottom: 1px solid #D4D4D4; 46 | padding: 10px 8px 10px 8px; 47 | vertical-align: top; 48 | } 49 | 50 | .help-page-table pre, 51 | .help-page-table p { 52 | margin: 0px; 53 | padding: 0px; 54 | font-family: inherit; 55 | font-size: 100%; 56 | } 57 | 58 | .help-page-table tbody tr:hover td { 59 | background-color: #F3F3F3; 60 | } 61 | 62 | .help-page a:hover { 63 | background-color: transparent; 64 | } 65 | 66 | .help-page .sample-header { 67 | border: 2px solid #D4D4D4; 68 | background: #76B8DB; 69 | color: #FFFFFF; 70 | padding: 8px 15px; 71 | border-bottom: none; 72 | display: inline-block; 73 | margin: 10px 0px 0px 0px; 74 | } 75 | 76 | .help-page .sample-content { 77 | display: block; 78 | border-width: 0; 79 | padding: 15px 20px; 80 | background: #FFFFFF; 81 | border: 2px solid #D4D4D4; 82 | margin: 0px 0px 10px 0px; 83 | } 84 | 85 | .help-page .api-name { 86 | width: 40%; 87 | } 88 | 89 | .help-page .api-documentation { 90 | width: 60%; 91 | } 92 | 93 | .help-page .parameter-name { 94 | width: 20%; 95 | } 96 | 97 | .help-page .parameter-documentation { 98 | width: 40%; 99 | } 100 | 101 | .help-page .parameter-type { 102 | width: 20%; 103 | } 104 | 105 | .help-page .parameter-annotations { 106 | width: 20%; 107 | } 108 | 109 | .help-page h1, 110 | .help-page .h1 { 111 | font-size: 36px; 112 | } 113 | 114 | .help-page h2, 115 | .help-page .h2 { 116 | font-size: 24px; 117 | } 118 | 119 | .help-page h3, 120 | .help-page .h3 { 121 | font-size: 20px; 122 | } 123 | 124 | #body.help-page { 125 | font-size: 14px; 126 | line-height: 143%; 127 | color: #333; 128 | } 129 | 130 | .help-page a { 131 | color: #00abec; 132 | text-decoration: none; 133 | } 134 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/HelpPageAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace MovieHunter.API.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ComplexTypeModelDescription : ModelDescription 6 | { 7 | public ComplexTypeModelDescription() 8 | { 9 | Properties = new Collection(); 10 | } 11 | 12 | public Collection Properties { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class EnumTypeModelDescription : ModelDescription 7 | { 8 | public EnumTypeModelDescription() 9 | { 10 | Values = new Collection(); 11 | } 12 | 13 | public Collection Values { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class EnumValueDescription 4 | { 5 | public string Documentation { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class KeyValuePairModelDescription : ModelDescription 4 | { 5 | public ModelDescription KeyModelDescription { get; set; } 6 | 7 | public ModelDescription ValueModelDescription { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Describes a type model. 7 | /// 8 | public abstract class ModelDescription 9 | { 10 | public string Documentation { get; set; } 11 | 12 | public Type ModelType { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Use this attribute to change the name of the generated for a type. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)] 9 | public sealed class ModelNameAttribute : Attribute 10 | { 11 | public ModelNameAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public string Name { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 7 | { 8 | internal static class ModelNameHelper 9 | { 10 | // Modify this to provide custom model name mapping. 11 | public static string GetModelName(Type type) 12 | { 13 | ModelNameAttribute modelNameAttribute = type.GetCustomAttribute(); 14 | if (modelNameAttribute != null && !String.IsNullOrEmpty(modelNameAttribute.Name)) 15 | { 16 | return modelNameAttribute.Name; 17 | } 18 | 19 | string modelName = type.Name; 20 | if (type.IsGenericType) 21 | { 22 | // Format the generic type name to something like: GenericOfAgurment1AndArgument2 23 | Type genericType = type.GetGenericTypeDefinition(); 24 | Type[] genericArguments = type.GetGenericArguments(); 25 | string genericTypeName = genericType.Name; 26 | 27 | // Trim the generic parameter counts from the name 28 | genericTypeName = genericTypeName.Substring(0, genericTypeName.IndexOf('`')); 29 | string[] argumentTypeNames = genericArguments.Select(t => GetModelName(t)).ToArray(); 30 | modelName = String.Format(CultureInfo.InvariantCulture, "{0}Of{1}", genericTypeName, String.Join("And", argumentTypeNames)); 31 | } 32 | 33 | return modelName; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class ParameterDescription 7 | { 8 | public ParameterDescription() 9 | { 10 | Annotations = new Collection(); 11 | } 12 | 13 | public Collection Annotations { get; private set; } 14 | 15 | public string Documentation { get; set; } 16 | 17 | public string Name { get; set; } 18 | 19 | public ModelDescription TypeDescription { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Models/HelpPageApiModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Net.Http.Headers; 4 | using System.Web.Http.Description; 5 | using MovieHunter.API.Areas.HelpPage.ModelDescriptions; 6 | 7 | namespace MovieHunter.API.Areas.HelpPage.Models 8 | { 9 | /// 10 | /// The model that represents an API displayed on the help page. 11 | /// 12 | public class HelpPageApiModel 13 | { 14 | /// 15 | /// Initializes a new instance of the class. 16 | /// 17 | public HelpPageApiModel() 18 | { 19 | UriParameters = new Collection(); 20 | SampleRequests = new Dictionary(); 21 | SampleResponses = new Dictionary(); 22 | ErrorMessages = new Collection(); 23 | } 24 | 25 | /// 26 | /// Gets or sets the that describes the API. 27 | /// 28 | public ApiDescription ApiDescription { get; set; } 29 | 30 | /// 31 | /// Gets or sets the collection that describes the URI parameters for the API. 32 | /// 33 | public Collection UriParameters { get; private set; } 34 | 35 | /// 36 | /// Gets or sets the documentation for the request. 37 | /// 38 | public string RequestDocumentation { get; set; } 39 | 40 | /// 41 | /// Gets or sets the that describes the request body. 42 | /// 43 | public ModelDescription RequestModelDescription { get; set; } 44 | 45 | /// 46 | /// Gets the request body parameter descriptions. 47 | /// 48 | public IList RequestBodyParameters 49 | { 50 | get 51 | { 52 | return GetParameterDescriptions(RequestModelDescription); 53 | } 54 | } 55 | 56 | /// 57 | /// Gets or sets the that describes the resource. 58 | /// 59 | public ModelDescription ResourceDescription { get; set; } 60 | 61 | /// 62 | /// Gets the resource property descriptions. 63 | /// 64 | public IList ResourceProperties 65 | { 66 | get 67 | { 68 | return GetParameterDescriptions(ResourceDescription); 69 | } 70 | } 71 | 72 | /// 73 | /// Gets the sample requests associated with the API. 74 | /// 75 | public IDictionary SampleRequests { get; private set; } 76 | 77 | /// 78 | /// Gets the sample responses associated with the API. 79 | /// 80 | public IDictionary SampleResponses { get; private set; } 81 | 82 | /// 83 | /// Gets the error messages associated with this model. 84 | /// 85 | public Collection ErrorMessages { get; private set; } 86 | 87 | private static IList GetParameterDescriptions(ModelDescription modelDescription) 88 | { 89 | ComplexTypeModelDescription complexTypeModelDescription = modelDescription as ComplexTypeModelDescription; 90 | if (complexTypeModelDescription != null) 91 | { 92 | return complexTypeModelDescription.Properties; 93 | } 94 | 95 | CollectionModelDescription collectionModelDescription = modelDescription as CollectionModelDescription; 96 | if (collectionModelDescription != null) 97 | { 98 | complexTypeModelDescription = collectionModelDescription.ElementDescription as ComplexTypeModelDescription; 99 | if (complexTypeModelDescription != null) 100 | { 101 | return complexTypeModelDescription.Properties; 102 | } 103 | } 104 | 105 | return null; 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/SampleGeneration/ImageSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/SampleGeneration/InvalidSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace MovieHunter.API.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/SampleGeneration/TextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MovieHunter.API.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/Api.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using MovieHunter.API.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 | 11 |
12 | 19 |
20 | @Html.DisplayForModel() 21 |
22 |
23 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using MovieHunter.API.Areas.HelpPage 5 | @using MovieHunter.API.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model DictionaryModelDescription 3 | Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model EnumTypeModelDescription 3 | 4 |

Possible enumeration values:

5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (EnumValueDescription value in Model.Values) 12 | { 13 | 14 | 15 | 18 | 21 | 22 | } 23 | 24 |
NameValueDescription
@value.Name 16 |

@value.Value

17 |
19 |

@value.Documentation

20 |
-------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using MovieHunter.API.Areas.HelpPage.Models 4 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 5 | @model HelpPageApiModel 6 | 7 | @{ 8 | ApiDescription description = Model.ApiDescription; 9 | } 10 |

@description.HttpMethod.Method @description.RelativePath

11 |
12 |

@description.Documentation

13 | 14 |

Request Information

15 | 16 |

URI Parameters

17 | @Html.DisplayFor(m => m.UriParameters, "Parameters") 18 | 19 |

Body Parameters

20 | 21 |

@Model.RequestDocumentation

22 | 23 | @if (Model.RequestModelDescription != null) 24 | { 25 | @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription }) 26 | if (Model.RequestBodyParameters != null) 27 | { 28 | @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters") 29 | } 30 | } 31 | else 32 | { 33 |

None.

34 | } 35 | 36 | @if (Model.SampleRequests.Count > 0) 37 | { 38 |

Request Formats

39 | @Html.DisplayFor(m => m.SampleRequests, "Samples") 40 | } 41 | 42 |

Response Information

43 | 44 |

Resource Description

45 | 46 |

@description.ResponseDescription.Documentation

47 | 48 | @if (Model.ResourceDescription != null) 49 | { 50 | @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription }) 51 | if (Model.ResourceProperties != null) 52 | { 53 | @Html.DisplayFor(m => m.ResourceProperties, "Parameters") 54 | } 55 | } 56 | else 57 | { 58 |

None.

59 | } 60 | 61 | @if (Model.SampleResponses.Count > 0) 62 | { 63 |

Response Formats

64 | @Html.DisplayFor(m => m.SampleResponses, "Samples") 65 | } 66 | 67 |
-------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model Type 3 | @{ 4 | ModelDescription modelDescription = ViewBag.modelDescription; 5 | if (modelDescription is ComplexTypeModelDescription || modelDescription is EnumTypeModelDescription) 6 | { 7 | if (Model == typeof(Object)) 8 | { 9 | @:Object 10 | } 11 | else 12 | { 13 | @Html.ActionLink(modelDescription.Name, "ResourceModel", "Help", new { modelName = modelDescription.Name }, null) 14 | } 15 | } 16 | else if (modelDescription is CollectionModelDescription) 17 | { 18 | var collectionDescription = modelDescription as CollectionModelDescription; 19 | var elementDescription = collectionDescription.ElementDescription; 20 | @:Collection of @Html.DisplayFor(m => elementDescription.ModelType, "ModelDescriptionLink", new { modelDescription = elementDescription }) 21 | } 22 | else 23 | { 24 | @Html.DisplayFor(m => modelDescription) 25 | } 26 | } -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using System.Collections.ObjectModel 3 | @using System.Web.Http.Description 4 | @using System.Threading 5 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 6 | @model IList 7 | 8 | @if (Model.Count > 0) 9 | { 10 | 11 | 12 | 13 | 14 | 15 | @foreach (ParameterDescription parameter in Model) 16 | { 17 | ModelDescription modelDescription = parameter.TypeDescription; 18 | 19 | 20 | 23 | 26 | 39 | 40 | } 41 | 42 |
NameDescriptionTypeAdditional information
@parameter.Name 21 |

@parameter.Documentation

22 |
24 | @Html.DisplayFor(m => modelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = modelDescription }) 25 | 27 | @if (parameter.Annotations.Count > 0) 28 | { 29 | foreach (var annotation in parameter.Annotations) 30 | { 31 |

@annotation.Documentation

32 | } 33 | } 34 | else 35 | { 36 |

None.

37 | } 38 |
43 | } 44 | else 45 | { 46 |

None.

47 | } 48 | 49 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using MovieHunter.API.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using MovieHunter.API.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 | 16 |
17 |
18 |
19 |

@ViewBag.Title

20 |
21 |
22 |
23 |
24 | 32 |
33 | @foreach (var group in apiGroups) 34 | { 35 | @Html.DisplayFor(m => group, "ApiGroup") 36 | } 37 |
38 |
39 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Help/ResourceModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using MovieHunter.API.Areas.HelpPage.ModelDescriptions 3 | @model ModelDescription 4 | 5 | 6 |
7 | 14 |

@Model.Name

15 |

@Model.Documentation

16 |
17 | @Html.DisplayFor(m => Model) 18 |
19 |
20 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MovieHunter.API/Areas/HelpPage/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /MovieHunter.API/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | -------------------------------------------------------------------------------- /MovieHunter.API/Controllers/ActorsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | 8 | namespace MovieHunter.API.Controllers 9 | { 10 | public class ActorsController : ApiController 11 | { 12 | // GET api/actors 13 | public IEnumerable Get() 14 | { 15 | var actors = new Models.ActorRepository(); 16 | return actors.Retrieve(); 17 | } 18 | 19 | // GET api/actors/title 20 | public IEnumerable Get(string name) 21 | { 22 | var actors = new Models.ActorRepository(); 23 | var actorList = actors.Retrieve(); 24 | var filteredList = actorList.Where(t => t.name.Contains(name)); 25 | return filteredList; 26 | } 27 | 28 | // GET api/actors/5 29 | public Models.Actor Get(int id) 30 | { 31 | var actors = new Models.ActorRepository(); 32 | var actorList = actors.Retrieve(); 33 | var actor = actorList.FirstOrDefault(t => t.actorId == id); 34 | 35 | var movies = new Models.MovieRepository(); 36 | var movieList = movies.Retrieve(); 37 | 38 | var keyMovies = movieList.SelectMany(m => m.keyActors.Where(a => a.actorId == actor.actorId), 39 | (m,a)=>m); 40 | actor.keyMovies = keyMovies.ToList(); 41 | 42 | return actor; 43 | } 44 | 45 | // POST api/actors 46 | public void Post([FromBody]string value) 47 | { 48 | } 49 | 50 | // PUT api/actors/5 51 | public void Put(int id, [FromBody]string value) 52 | { 53 | } 54 | 55 | // DELETE api/actors/5 56 | public void Delete(int id) 57 | { 58 | } 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /MovieHunter.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace MovieHunter.API.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | ViewBag.Title = "Home Page"; 14 | 15 | return View(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MovieHunter.API/Controllers/MoviesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | 8 | namespace MovieHunter.API.Controllers 9 | { 10 | public class MoviesController : ApiController 11 | { 12 | // GET api/movies 13 | public IEnumerable Get() 14 | { 15 | var movies = new Models.MovieRepository(); 16 | return movies.Retrieve(); 17 | } 18 | 19 | // GET api/movies/title 20 | public IEnumerable Get(string title) 21 | { 22 | var movies = new Models.MovieRepository(); 23 | var movieList = movies.Retrieve(); 24 | var filteredList = movieList.Where(t => t.title.Contains(title)); 25 | return filteredList; 26 | } 27 | 28 | // GET api/movies/5 29 | public Models.Movie Get(int id) 30 | { 31 | var movies = new Models.MovieRepository(); 32 | var movieList = movies.Retrieve(); 33 | var movie = movieList.FirstOrDefault(t => t.movieId==id); 34 | 35 | var actors = new Models.ActorRepository(); 36 | var actorList = actors.Retrieve(); 37 | 38 | var populatedActorList = new List(); 39 | foreach (var item in movie.keyActors) 40 | { 41 | var actor = actorList.FirstOrDefault(a => a.actorId == item.actorId); 42 | populatedActorList.Add(actor); 43 | } 44 | movie.keyActors = populatedActorList; 45 | 46 | return movie; 47 | } 48 | 49 | // POST api/movies 50 | public void Post([FromBody]string value) 51 | { 52 | } 53 | 54 | // PUT api/movies/5 55 | public void Put(int id, [FromBody]string value) 56 | { 57 | } 58 | 59 | // DELETE api/movies/5 60 | public void Delete(int id) 61 | { 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /MovieHunter.API/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="MovieHunter.API.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /MovieHunter.API/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | 10 | namespace MovieHunter.API 11 | { 12 | public class WebApiApplication : System.Web.HttpApplication 13 | { 14 | protected void Application_Start() 15 | { 16 | AreaRegistration.RegisterAllAreas(); 17 | GlobalConfiguration.Configure(WebApiConfig.Register); 18 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 19 | RouteConfig.RegisterRoutes(RouteTable.Routes); 20 | BundleConfig.RegisterBundles(BundleTable.Bundles); 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /MovieHunter.API/Models/Actor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace MovieHunter.API.Models 7 | { 8 | public class Actor 9 | { 10 | public int actorId { get; set; } 11 | public DateTime birthDate { get; set; } 12 | public string country { get; set; } 13 | public string imdbLink { get; set; } 14 | public List keyMovies { get; set; } 15 | public string name { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /MovieHunter.API/Models/ActorRepository.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Web; 6 | 7 | namespace MovieHunter.API.Models 8 | { 9 | public class ActorRepository 10 | { 11 | public List ActorList { get; set; } 12 | 13 | public List Retrieve() 14 | { 15 | var filePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 16 | filePath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, @"App_Data\actors.json"); 17 | var json = System.IO.File.ReadAllText(filePath); 18 | var actors = JsonConvert.DeserializeObject(json); 19 | 20 | return actors.ActorList; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /MovieHunter.API/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace MovieHunter.API.Models 5 | { 6 | public class Movie 7 | { 8 | public string description { get; set; } 9 | public string director { get; set; } 10 | public string imdbLink { get; set; } 11 | public string imageUrl { get; set; } 12 | public List keyActors { get; set; } 13 | public int movieId { get; set; } 14 | public string mpaa { get; set; } 15 | public DateTime releaseDate { get; set; } 16 | public string title { get; set; } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /MovieHunter.API/Models/MovieRepository.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Web; 6 | 7 | namespace MovieHunter.API.Models 8 | { 9 | public class MovieRepository 10 | { 11 | public List MovieList { get; set; } 12 | 13 | public List Retrieve() 14 | { 15 | var filePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 16 | filePath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, @"App_Data\movies.json"); 17 | var json = System.IO.File.ReadAllText(filePath); 18 | var movies = JsonConvert.DeserializeObject(json); 19 | 20 | return movies.MovieList; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /MovieHunter.API/Project_Readme.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Your ASP.NET application 6 | 95 | 96 | 97 | 98 | 102 | 103 |
104 |
105 |

This application consists of:

106 |
    107 |
  • Help Page for documenting your Web APIs
  • 108 |
  • Theming using Bootstrap
  • 109 |
  • Authentication, if selected, shows how to register and sign in
  • 110 |
  • ASP.NET features managed using NuGet
  • 111 |
112 |
113 | 114 | 130 | 131 |
132 |

Deploy

133 | 138 |
139 | 140 |
141 |

Get help

142 | 146 |
147 |
148 | 149 | 150 | -------------------------------------------------------------------------------- /MovieHunter.API/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MovieHunter.API")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("InStep Technologies, Inc.")] 12 | [assembly: AssemblyProduct("MovieHunter.API")] 13 | [assembly: AssemblyCopyright("Copyright © InStep Technologies, Inc. 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("45065590-c946-4092-9e5e-b98309d94bf4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /MovieHunter.API/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.API/Scripts/_references.js -------------------------------------------------------------------------------- /MovieHunter.API/Scripts/respond.min.js: -------------------------------------------------------------------------------- 1 | /* NUGET: BEGIN LICENSE TEXT 2 | * 3 | * Microsoft grants you the right to use these script files for the sole 4 | * purpose of either: (i) interacting through your browser with the Microsoft 5 | * website or online service, subject to the applicable licensing or use 6 | * terms; or (ii) using the files as included with a Microsoft product subject 7 | * to that product's license terms. Microsoft reserves all other rights to the 8 | * files not expressly granted by Microsoft, whether by implication, estoppel 9 | * or otherwise. Insofar as a script file is dual licensed under GPL, 10 | * Microsoft neither took the code under GPL nor distributes it thereunder but 11 | * under the terms set out in this paragraph. All notices and licenses 12 | * below are for informational purposes only. 13 | * 14 | * NUGET: END LICENSE TEXT */ 15 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 16 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 17 | window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); 18 | 19 | /*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 20 | (function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); -------------------------------------------------------------------------------- /MovieHunter.API/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |

ASP.NET

3 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS, and JavaScript.

4 |

Learn more »

5 |
6 |
7 |
8 |

Getting started

9 |

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach 10 | a broad range of clients, including browsers and mobile devices. ASP.NET Web API 11 | is an ideal platform for building RESTful applications on the .NET Framework.

12 |

Learn more »

13 |
14 |
15 |

Get more libraries

16 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

17 |

Learn more »

18 |
19 |
20 |

Web Hosting

21 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

22 |

Learn more »

23 |
24 |
25 | -------------------------------------------------------------------------------- /MovieHunter.API/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | Error 10 | 11 | 12 |
13 |

Error.

14 |

An error occurred while processing your request.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /MovieHunter.API/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 29 |
30 | @RenderBody() 31 |
32 |
33 |

© @DateTime.Now.Year - My ASP.NET Application

34 |
35 |
36 | 37 | @Scripts.Render("~/bundles/jquery") 38 | @Scripts.Render("~/bundles/bootstrap") 39 | @RenderSection("scripts", required: false) 40 | 41 | 42 | -------------------------------------------------------------------------------- /MovieHunter.API/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /MovieHunter.API/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /MovieHunter.API/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /MovieHunter.API/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /MovieHunter.API/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /MovieHunter.API/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.API/favicon.ico -------------------------------------------------------------------------------- /MovieHunter.API/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.API/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /MovieHunter.API/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.API/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /MovieHunter.API/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.API/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /MovieHunter.API/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /MovieHunter.UI/Content/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /MovieHunter.UI/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /MovieHunter.UI/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MovieHunter.UI/app/app.js: -------------------------------------------------------------------------------- 1 | // Application definition 2 | // Configures the UI routes 3 | (function () { 4 | // Define the main module 5 | var app = angular.module("movieHunter", ["ngRoute"]); 6 | 7 | app.config(['$routeProvider', 8 | function ($routeProvider) { 9 | $routeProvider 10 | .when("/", { 11 | templateUrl: "app/welcomeView.html" 12 | }) 13 | .when("/searchByTitle", { 14 | templateUrl: "app/movieSearch/searchByTitleView.html", 15 | controller: "SearchByTitleCtrl" 16 | }) 17 | .when("/showMovieDetail/:movieId", { 18 | templateUrl: "app/movieDetail/movieDetailView.html", 19 | controller: "MovieDetailCtrl" 20 | }) 21 | .when("/searchByActor", { 22 | templateUrl: "app/movieSearch/searchByActorView.html", 23 | controller: "SearchByActorCtrl" 24 | }) 25 | .when("/showActorDetail/:actorId", { 26 | templateUrl: "app/movieDetail/actorDetailView.html", 27 | controller: "ActorDetailCtrl" 28 | }) 29 | .otherwise({ 30 | redirectTo: "/" 31 | }) 32 | }]); 33 | }()); -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieDetail/actorDetailCtrl.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular 5 | .module("movieHunter") 6 | .controller("ActorDetailCtrl", 7 | ["$scope", 8 | "$http", 9 | "$routeParams", 10 | ActorDetailCtrl]); 11 | 12 | function ActorDetailCtrl ($scope, $http, $routeParams) { 13 | $scope.actorId = $routeParams.actorId; 14 | 15 | // Callback after the promise on success 16 | var onActorRetrieveComplete = function (response) { 17 | $scope.actor = response.data; 18 | }; 19 | 20 | // Callback after the promise on error 21 | var onError = function (reason) { 22 | $scope.errorText = "Could not display the actor: " + 23 | reason.data + " - " + reason.statusText + " (" + reason.status + ")"; 24 | }; 25 | 26 | $http.get("http://localhost:1561/api/actors/" + $scope.actorId) 27 | .then(onActorRetrieveComplete, onError); 28 | 29 | } 30 | }()); -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieDetail/actorDetailView.html: -------------------------------------------------------------------------------- 1 | 
2 | 5 | 6 |
7 |
8 |
Birth Date:
9 |
{{ actor.birthDate | date}}
10 |
11 |
12 |
Country:
13 |
{{ actor.country }}
14 |
15 |
16 |
17 | 18 | Key Movies: 19 | 20 | 21 | 24 | 27 | 28 | 29 | 30 |
22 | {{ movie.title }} 23 | 25 | IMDB 26 |
31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieDetail/movieDetailCtrl.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular 5 | .module("movieHunter") 6 | .controller("MovieDetailCtrl", 7 | ["$scope", 8 | "$http", 9 | "$routeParams", 10 | MovieDetailCtrl]); 11 | 12 | function MovieDetailCtrl ($scope, $http, $routeParams) { 13 | $scope.movieId = $routeParams.movieId; 14 | 15 | // Callback after the promise on success 16 | var onMovieRetrieveComplete = function (response) { 17 | $scope.movie = response.data; 18 | }; 19 | 20 | // Callback after the promise on error 21 | var onError = function (reason) { 22 | $scope.errorText = "Could not display the movie: " + 23 | reason.data + " - " + reason.statusText + " (" + reason.status + ")"; 24 | }; 25 | 26 | $http.get("http://localhost:1561/api/movies/" + $scope.movieId) 27 | .then(onMovieRetrieveComplete, onError); 28 | } 29 | }()); -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieDetail/movieDetailView.html: -------------------------------------------------------------------------------- 1 | 
2 | 5 | 6 |
7 |
8 |
Description:
9 |
{{ movie.description }}
10 |
11 |
12 |
Director:
13 |
{{ movie.director }}
14 |
15 |
16 |
Release Date:
17 |
{{ movie.releaseDate | date}}
18 |
19 |
20 |
Rating:
21 |
{{ movie.mpaa}}
22 |
23 |
24 |
25 | 26 | Key Actors: 27 | 28 | 29 | 32 | 35 | 36 | 37 | 38 |
30 | {{ actor.name }} 31 | 33 | IMDB 34 |
39 |
40 |
41 |
-------------------------------------------------------------------------------- /MovieHunter.UI/app/movieSearch/searchByActorCtrl.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular 5 | .module("movieHunter") 6 | .controller("SearchByActorCtrl", 7 | ["$scope", 8 | "$http", 9 | SearchByActorCtrl]); 10 | 11 | function SearchByActorCtrl ($scope, $http) { 12 | 13 | $scope.actorList = []; 14 | $scope.title = "Search by Actor"; 15 | 16 | // Callback after the promise on success 17 | var onActorRetrieveComplete = function (response) { 18 | $scope.actorList = response.data; 19 | }; 20 | 21 | // Callback after the promise on error 22 | var onError = function (reason) { 23 | $scope.errorText = "Could not display the actor list: " + reason.data; 24 | }; 25 | 26 | // Asynchrous call returning a promise 27 | $http.get("http://localhost:1561/api/actors/") 28 | .then(onActorRetrieveComplete, onError); 29 | 30 | } 31 | 32 | }()); -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieSearch/searchByActorView.html: -------------------------------------------------------------------------------- 1 | 
2 |
{{title}}
3 | 4 |
5 | 6 | 7 |
8 |
Filter by:
9 |
10 |
11 | 12 |
13 |

Actors filtered by {{listFilter}}:

14 |
15 | 16 | 17 |
18 |
Name
19 |
Birth Date
20 |
Country
21 | 22 |
23 | 24 |
25 |
26 | {{ actor.name }} 27 |
28 |
{{ actor.birthDate | date}}
29 |
{{ actor.country}}
30 |
31 |
32 |
No matches found
33 |
34 | 35 |
36 |
37 | 38 | -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieSearch/searchByTitleCtrl.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular 5 | .module("movieHunter") 6 | .controller("SearchByTitleCtrl", 7 | ["$scope", 8 | "$http", 9 | SearchByTitleCtrl]); 10 | 11 | function SearchByTitleCtrl($scope, $http) { 12 | 13 | $scope.movieList = []; 14 | $scope.title = "Search by Movie Title"; 15 | $scope.showImage = false; 16 | 17 | $scope.toggleImage = function () { 18 | $scope.showImage = !$scope.showImage; 19 | }; 20 | 21 | var onMovieRetrieveComplete = function (response) { 22 | $scope.movieList = response.data; 23 | }; 24 | 25 | var onError = function (reason) { 26 | $scope.errorText = "Could not display the movie list: " + 27 | (reason.statusText ? reason.statusText : reason.description); 28 | }; 29 | 30 | $http.get("http://localhost:1561/api/movies/") 31 | .then(onMovieRetrieveComplete, onError); 32 | } 33 | }()); -------------------------------------------------------------------------------- /MovieHunter.UI/app/movieSearch/searchByTitleView.html: -------------------------------------------------------------------------------- 1 | 
2 |
{{title}}
3 | 4 |
5 |
6 |
Filter by:
7 |
8 |
9 | 10 |
11 |

Movies filtered by {{listFilter}}:

12 |
13 | 14 |
15 | 17 | 18 | 19 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 38 | 41 | 42 | 43 | 44 | 45 | 46 |
20 | 25 | TitleDirectorRelease DateRating
35 | 37 | 39 | {{ movie.title}} 40 | {{ movie.director }}{{ movie.releaseDate | date }}{{ movie.mpaa | uppercase}}
47 |
48 |
49 |
50 | -------------------------------------------------------------------------------- /MovieHunter.UI/app/welcomeView.html: -------------------------------------------------------------------------------- 1 | 
2 |
3 | Acme Product Management 4 |
5 | 6 |
7 |
8 |
Developed by:
9 |

Deborah Kurata

10 | 11 |
deborahk@insteptech.com
12 | www.bit.ly/DeborahKsBlog 13 |
14 |
15 |
Art work by:
16 |

Krysta Kurata

17 | krysta-kurata.squarespace.com/ 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /MovieHunter.UI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.UI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /MovieHunter.UI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.UI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /MovieHunter.UI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.UI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /MovieHunter.UI/images/filmhunterlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.UI/images/filmhunterlogo.png -------------------------------------------------------------------------------- /MovieHunter.UI/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | InStep Movie Hunter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /MovieHunter.UI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MovieHunter.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30723.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovieHunter.API", "MovieHunter.API\MovieHunter.API.csproj", "{4E8BCD84-23BD-4883-B3F4-5A8327C4AA46}" 7 | EndProject 8 | Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "MovieHunter.UI", "http://localhost:13582", "{B058D9DB-7201-4C4A-8EE3-BED6C276CF25}" 9 | ProjectSection(WebsiteProperties) = preProject 10 | UseIISExpress = "true" 11 | TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5.1" 12 | Debug.AspNetCompiler.VirtualPath = "/localhost_13582" 13 | Debug.AspNetCompiler.PhysicalPath = "MovieHunter.UI\" 14 | Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_13582\" 15 | Debug.AspNetCompiler.Updateable = "true" 16 | Debug.AspNetCompiler.ForceOverwrite = "true" 17 | Debug.AspNetCompiler.FixedNames = "false" 18 | Debug.AspNetCompiler.Debug = "True" 19 | Release.AspNetCompiler.VirtualPath = "/localhost_13582" 20 | Release.AspNetCompiler.PhysicalPath = "MovieHunter.UI\" 21 | Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_13582\" 22 | Release.AspNetCompiler.Updateable = "true" 23 | Release.AspNetCompiler.ForceOverwrite = "true" 24 | Release.AspNetCompiler.FixedNames = "false" 25 | Release.AspNetCompiler.Debug = "False" 26 | SlnRelativePath = "MovieHunter.UI\" 27 | EndProjectSection 28 | EndProject 29 | Global 30 | GlobalSection(TeamFoundationVersionControl) = preSolution 31 | SccNumberOfProjects = 1 32 | SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} 33 | SccTeamFoundationServer = https://deborahkurata.visualstudio.com/defaultcollection 34 | SccProjectUniqueName0 = MovieHunter.API\\MovieHunter.API.csproj 35 | SccProjectName0 = MovieHunter.API 36 | SccAuxPath0 = https://deborahkurata.visualstudio.com/defaultcollection 37 | SccLocalPath0 = MovieHunter.API 38 | SccProvider0 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} 39 | EndGlobalSection 40 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 41 | Debug|Any CPU = Debug|Any CPU 42 | Release|Any CPU = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 45 | {4E8BCD84-23BD-4883-B3F4-5A8327C4AA46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 46 | {4E8BCD84-23BD-4883-B3F4-5A8327C4AA46}.Debug|Any CPU.Build.0 = Debug|Any CPU 47 | {4E8BCD84-23BD-4883-B3F4-5A8327C4AA46}.Release|Any CPU.ActiveCfg = Release|Any CPU 48 | {4E8BCD84-23BD-4883-B3F4-5A8327C4AA46}.Release|Any CPU.Build.0 = Release|Any CPU 49 | {B058D9DB-7201-4C4A-8EE3-BED6C276CF25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 50 | {B058D9DB-7201-4C4A-8EE3-BED6C276CF25}.Debug|Any CPU.Build.0 = Debug|Any CPU 51 | {B058D9DB-7201-4C4A-8EE3-BED6C276CF25}.Release|Any CPU.ActiveCfg = Debug|Any CPU 52 | {B058D9DB-7201-4C4A-8EE3-BED6C276CF25}.Release|Any CPU.Build.0 = Debug|Any CPU 53 | EndGlobalSection 54 | GlobalSection(SolutionProperties) = preSolution 55 | HideSolutionNode = FALSE 56 | EndGlobalSection 57 | EndGlobal 58 | -------------------------------------------------------------------------------- /MovieHunter.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/MovieHunter.v12.suo -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Angular-MovieHunter-WebAPI 2 | ========================== 3 | 4 | Sample beginner Angular application using Web API. Used in my VSLive and other talks. 5 | -------------------------------------------------------------------------------- /packages/AngularJS.Core.1.2.23/AngularJS.Core.1.2.23.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/AngularJS.Core.1.2.23/AngularJS.Core.1.2.23.nupkg -------------------------------------------------------------------------------- /packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg -------------------------------------------------------------------------------- /packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Cors.5.1.2/Microsoft.AspNet.Cors.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Cors.5.1.2/Microsoft.AspNet.Cors.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Cors.5.1.2/lib/net45/System.Web.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Cors.5.1.2/lib/net45/System.Web.Cors.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.1.2/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.1.2/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.1.2/Microsoft.AspNet.Mvc.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Mvc.5.1.2/Microsoft.AspNet.Mvc.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.1.2/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Mvc.5.1.2/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.1.2/Microsoft.AspNet.Razor.3.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Razor.3.1.2/Microsoft.AspNet.Razor.3.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.1.2/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Razor.3.1.2/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.5.1.2/Microsoft.AspNet.WebApi.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.5.1.2/Microsoft.AspNet.WebApi.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.1.2/Microsoft.AspNet.WebApi.Client.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Client.5.1.2/Microsoft.AspNet.WebApi.Client.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.1.2/lib/net45/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Client.5.1.2/lib/net45/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.1.2/lib/portable-wp8+netcore45+net45/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Client.5.1.2/lib/portable-wp8+netcore45+net45/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.1.2/Content/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.1.2/Microsoft.AspNet.WebApi.Core.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Core.5.1.2/Microsoft.AspNet.WebApi.Core.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.1.2/lib/net45/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Core.5.1.2/lib/net45/System.Web.Http.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Cors.5.1.2/Microsoft.AspNet.WebApi.Cors.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Cors.5.1.2/Microsoft.AspNet.WebApi.Cors.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Cors.5.1.2/lib/net45/System.Web.Http.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.Cors.5.1.2/lib/net45/System.Web.Http.Cors.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ApiDescriptionExtensions.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Controllers/HelpController.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using $rootnamespace$.Areas.HelpPage.ModelDescriptions; 5 | using $rootnamespace$.Areas.HelpPage.Models; 6 | 7 | namespace $rootnamespace$.Areas.HelpPage.Controllers 8 | { 9 | /// 10 | /// The controller that will handle requests for the help page. 11 | /// 12 | public class HelpController : Controller 13 | { 14 | private const string ErrorViewName = "Error"; 15 | 16 | public HelpController() 17 | : this(GlobalConfiguration.Configuration) 18 | { 19 | } 20 | 21 | public HelpController(HttpConfiguration config) 22 | { 23 | Configuration = config; 24 | } 25 | 26 | public HttpConfiguration Configuration { get; private set; } 27 | 28 | public ActionResult Index() 29 | { 30 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 31 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 32 | } 33 | 34 | public ActionResult Api(string apiId) 35 | { 36 | if (!String.IsNullOrEmpty(apiId)) 37 | { 38 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 39 | if (apiModel != null) 40 | { 41 | return View(apiModel); 42 | } 43 | } 44 | 45 | return View(ErrorViewName); 46 | } 47 | 48 | public ActionResult ResourceModel(string modelName) 49 | { 50 | if (!String.IsNullOrEmpty(modelName)) 51 | { 52 | ModelDescriptionGenerator modelDescriptionGenerator = Configuration.GetModelDescriptionGenerator(); 53 | ModelDescription modelDescription; 54 | if (modelDescriptionGenerator.GeneratedModels.TryGetValue(modelName, out modelDescription)) 55 | { 56 | return View(modelDescription); 57 | } 58 | } 59 | 60 | return View(ErrorViewName); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/HelpPage.css.pp: -------------------------------------------------------------------------------- 1 | .help-page h1, 2 | .help-page .h1, 3 | .help-page h2, 4 | .help-page .h2, 5 | .help-page h3, 6 | .help-page .h3, 7 | #body.help-page, 8 | .help-page-table th, 9 | .help-page-table pre, 10 | .help-page-table p { 11 | font-family: "Segoe UI Light", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif; 12 | } 13 | 14 | .help-page pre.wrapped { 15 | white-space: -moz-pre-wrap; 16 | white-space: -pre-wrap; 17 | white-space: -o-pre-wrap; 18 | white-space: pre-wrap; 19 | } 20 | 21 | .help-page .warning-message-container { 22 | margin-top: 20px; 23 | padding: 0 10px; 24 | color: #525252; 25 | background: #EFDCA9; 26 | border: 1px solid #CCCCCC; 27 | } 28 | 29 | .help-page-table { 30 | width: 100%; 31 | border-collapse: collapse; 32 | text-align: left; 33 | margin: 0px 0px 20px 0px; 34 | border-top: 1px solid #D4D4D4; 35 | } 36 | 37 | .help-page-table th { 38 | text-align: left; 39 | font-weight: bold; 40 | border-bottom: 1px solid #D4D4D4; 41 | padding: 5px 6px 5px 6px; 42 | } 43 | 44 | .help-page-table td { 45 | border-bottom: 1px solid #D4D4D4; 46 | padding: 10px 8px 10px 8px; 47 | vertical-align: top; 48 | } 49 | 50 | .help-page-table pre, 51 | .help-page-table p { 52 | margin: 0px; 53 | padding: 0px; 54 | font-family: inherit; 55 | font-size: 100%; 56 | } 57 | 58 | .help-page-table tbody tr:hover td { 59 | background-color: #F3F3F3; 60 | } 61 | 62 | .help-page a:hover { 63 | background-color: transparent; 64 | } 65 | 66 | .help-page .sample-header { 67 | border: 2px solid #D4D4D4; 68 | background: #76B8DB; 69 | color: #FFFFFF; 70 | padding: 8px 15px; 71 | border-bottom: none; 72 | display: inline-block; 73 | margin: 10px 0px 0px 0px; 74 | } 75 | 76 | .help-page .sample-content { 77 | display: block; 78 | border-width: 0; 79 | padding: 15px 20px; 80 | background: #FFFFFF; 81 | border: 2px solid #D4D4D4; 82 | margin: 0px 0px 10px 0px; 83 | } 84 | 85 | .help-page .api-name { 86 | width: 40%; 87 | } 88 | 89 | .help-page .api-documentation { 90 | width: 60%; 91 | } 92 | 93 | .help-page .parameter-name { 94 | width: 20%; 95 | } 96 | 97 | .help-page .parameter-documentation { 98 | width: 40%; 99 | } 100 | 101 | .help-page .parameter-type { 102 | width: 20%; 103 | } 104 | 105 | .help-page .parameter-annotations { 106 | width: 20%; 107 | } 108 | 109 | .help-page h1, 110 | .help-page .h1 { 111 | font-size: 36px; 112 | } 113 | 114 | .help-page h2, 115 | .help-page .h2 { 116 | font-size: 24px; 117 | } 118 | 119 | .help-page h3, 120 | .help-page .h3 { 121 | font-size: 20px; 122 | } 123 | 124 | #body.help-page { 125 | font-size: 14px; 126 | line-height: 143%; 127 | color: #333; 128 | } 129 | 130 | .help-page a { 131 | color: #00abec; 132 | text-decoration: none; 133 | } 134 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/HelpPageAreaRegistration.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ComplexTypeModelDescription : ModelDescription 6 | { 7 | public ComplexTypeModelDescription() 8 | { 9 | Properties = new Collection(); 10 | } 11 | 12 | public Collection Properties { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class EnumTypeModelDescription : ModelDescription 7 | { 8 | public EnumTypeModelDescription() 9 | { 10 | Values = new Collection(); 11 | } 12 | 13 | public Collection Values { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class EnumValueDescription 4 | { 5 | public string Documentation { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class KeyValuePairModelDescription : ModelDescription 4 | { 5 | public ModelDescription KeyModelDescription { get; set; } 6 | 7 | public ModelDescription ValueModelDescription { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Describes a type model. 7 | /// 8 | public abstract class ModelDescription 9 | { 10 | public string Documentation { get; set; } 11 | 12 | public Type ModelType { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Use this attribute to change the name of the generated for a type. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)] 9 | public sealed class ModelNameAttribute : Attribute 10 | { 11 | public ModelNameAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public string Name { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 7 | { 8 | internal static class ModelNameHelper 9 | { 10 | // Modify this to provide custom model name mapping. 11 | public static string GetModelName(Type type) 12 | { 13 | ModelNameAttribute modelNameAttribute = type.GetCustomAttribute(); 14 | if (modelNameAttribute != null && !String.IsNullOrEmpty(modelNameAttribute.Name)) 15 | { 16 | return modelNameAttribute.Name; 17 | } 18 | 19 | string modelName = type.Name; 20 | if (type.IsGenericType) 21 | { 22 | // Format the generic type name to something like: GenericOfAgurment1AndArgument2 23 | Type genericType = type.GetGenericTypeDefinition(); 24 | Type[] genericArguments = type.GetGenericArguments(); 25 | string genericTypeName = genericType.Name; 26 | 27 | // Trim the generic parameter counts from the name 28 | genericTypeName = genericTypeName.Substring(0, genericTypeName.IndexOf('`')); 29 | string[] argumentTypeNames = genericArguments.Select(t => GetModelName(t)).ToArray(); 30 | modelName = String.Format(CultureInfo.InvariantCulture, "{0}Of{1}", genericTypeName, String.Join("And", argumentTypeNames)); 31 | } 32 | 33 | return modelName; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class ParameterDescription 7 | { 8 | public ParameterDescription() 9 | { 10 | Annotations = new Collection(); 11 | } 12 | 13 | public Collection Annotations { get; private set; } 14 | 15 | public string Documentation { get; set; } 16 | 17 | public string Name { get; set; } 18 | 19 | public ModelDescription TypeDescription { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Models/HelpPageApiModel.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Net.Http.Headers; 4 | using System.Web.Http.Description; 5 | using $rootnamespace$.Areas.HelpPage.ModelDescriptions; 6 | 7 | namespace $rootnamespace$.Areas.HelpPage.Models 8 | { 9 | /// 10 | /// The model that represents an API displayed on the help page. 11 | /// 12 | public class HelpPageApiModel 13 | { 14 | /// 15 | /// Initializes a new instance of the class. 16 | /// 17 | public HelpPageApiModel() 18 | { 19 | UriParameters = new Collection(); 20 | SampleRequests = new Dictionary(); 21 | SampleResponses = new Dictionary(); 22 | ErrorMessages = new Collection(); 23 | } 24 | 25 | /// 26 | /// Gets or sets the that describes the API. 27 | /// 28 | public ApiDescription ApiDescription { get; set; } 29 | 30 | /// 31 | /// Gets or sets the collection that describes the URI parameters for the API. 32 | /// 33 | public Collection UriParameters { get; private set; } 34 | 35 | /// 36 | /// Gets or sets the documentation for the request. 37 | /// 38 | public string RequestDocumentation { get; set; } 39 | 40 | /// 41 | /// Gets or sets the that describes the request body. 42 | /// 43 | public ModelDescription RequestModelDescription { get; set; } 44 | 45 | /// 46 | /// Gets the request body parameter descriptions. 47 | /// 48 | public IList RequestBodyParameters 49 | { 50 | get 51 | { 52 | return GetParameterDescriptions(RequestModelDescription); 53 | } 54 | } 55 | 56 | /// 57 | /// Gets or sets the that describes the resource. 58 | /// 59 | public ModelDescription ResourceDescription { get; set; } 60 | 61 | /// 62 | /// Gets the resource property descriptions. 63 | /// 64 | public IList ResourceProperties 65 | { 66 | get 67 | { 68 | return GetParameterDescriptions(ResourceDescription); 69 | } 70 | } 71 | 72 | /// 73 | /// Gets the sample requests associated with the API. 74 | /// 75 | public IDictionary SampleRequests { get; private set; } 76 | 77 | /// 78 | /// Gets the sample responses associated with the API. 79 | /// 80 | public IDictionary SampleResponses { get; private set; } 81 | 82 | /// 83 | /// Gets the error messages associated with this model. 84 | /// 85 | public Collection ErrorMessages { get; private set; } 86 | 87 | private static IList GetParameterDescriptions(ModelDescription modelDescription) 88 | { 89 | ComplexTypeModelDescription complexTypeModelDescription = modelDescription as ComplexTypeModelDescription; 90 | if (complexTypeModelDescription != null) 91 | { 92 | return complexTypeModelDescription.Properties; 93 | } 94 | 95 | CollectionModelDescription collectionModelDescription = modelDescription as CollectionModelDescription; 96 | if (collectionModelDescription != null) 97 | { 98 | complexTypeModelDescription = collectionModelDescription.ElementDescription as ComplexTypeModelDescription; 99 | if (complexTypeModelDescription != null) 100 | { 101 | return complexTypeModelDescription.Properties; 102 | } 103 | } 104 | 105 | return null; 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/SampleGeneration/ImageSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/SampleGeneration/InvalidSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/SampleGeneration/SampleDirection.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/SampleGeneration/TextSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/Api.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 | 11 |
12 | 19 |
20 | @Html.DisplayForModel() 21 |
22 |
23 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using $rootnamespace$.Areas.HelpPage 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model DictionaryModelDescription 3 | Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model EnumTypeModelDescription 3 | 4 |

Possible enumeration values:

5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (EnumValueDescription value in Model.Values) 12 | { 13 | 14 | 15 | 18 | 21 | 22 | } 23 | 24 |
NameValueDescription
@value.Name 16 |

@value.Value

17 |
19 |

@value.Documentation

20 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using $rootnamespace$.Areas.HelpPage.Models 4 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | @model HelpPageApiModel 6 | 7 | @{ 8 | ApiDescription description = Model.ApiDescription; 9 | } 10 |

@description.HttpMethod.Method @description.RelativePath

11 |
12 |

@description.Documentation

13 | 14 |

Request Information

15 | 16 |

URI Parameters

17 | @Html.DisplayFor(m => m.UriParameters, "Parameters") 18 | 19 |

Body Parameters

20 | 21 |

@Model.RequestDocumentation

22 | 23 | @if (Model.RequestModelDescription != null) 24 | { 25 | @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription }) 26 | if (Model.RequestBodyParameters != null) 27 | { 28 | @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters") 29 | } 30 | } 31 | else 32 | { 33 |

None.

34 | } 35 | 36 | @if (Model.SampleRequests.Count > 0) 37 | { 38 |

Request Formats

39 | @Html.DisplayFor(m => m.SampleRequests, "Samples") 40 | } 41 | 42 |

Response Information

43 | 44 |

Resource Description

45 | 46 |

@description.ResponseDescription.Documentation

47 | 48 | @if (Model.ResourceDescription != null) 49 | { 50 | @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription }) 51 | if (Model.ResourceProperties != null) 52 | { 53 | @Html.DisplayFor(m => m.ResourceProperties, "Parameters") 54 | } 55 | } 56 | else 57 | { 58 |

None.

59 | } 60 | 61 | @if (Model.SampleResponses.Count > 0) 62 | { 63 |

Response Formats

64 | @Html.DisplayFor(m => m.SampleResponses, "Samples") 65 | } 66 | 67 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model Type 3 | @{ 4 | ModelDescription modelDescription = ViewBag.modelDescription; 5 | if (modelDescription is ComplexTypeModelDescription || modelDescription is EnumTypeModelDescription) 6 | { 7 | if (Model == typeof(Object)) 8 | { 9 | @:Object 10 | } 11 | else 12 | { 13 | @Html.ActionLink(modelDescription.Name, "ResourceModel", "Help", new { modelName = modelDescription.Name }, null) 14 | } 15 | } 16 | else if (modelDescription is CollectionModelDescription) 17 | { 18 | var collectionDescription = modelDescription as CollectionModelDescription; 19 | var elementDescription = collectionDescription.ElementDescription; 20 | @:Collection of @Html.DisplayFor(m => elementDescription.ModelType, "ModelDescriptionLink", new { modelDescription = elementDescription }) 21 | } 22 | else 23 | { 24 | @Html.DisplayFor(m => modelDescription) 25 | } 26 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using System.Collections.ObjectModel 3 | @using System.Web.Http.Description 4 | @using System.Threading 5 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 6 | @model IList 7 | 8 | @if (Model.Count > 0) 9 | { 10 | 11 | 12 | 13 | 14 | 15 | @foreach (ParameterDescription parameter in Model) 16 | { 17 | ModelDescription modelDescription = parameter.TypeDescription; 18 | 19 | 20 | 23 | 26 | 39 | 40 | } 41 | 42 |
NameDescriptionTypeAdditional information
@parameter.Name 21 |

@parameter.Documentation

22 |
24 | @Html.DisplayFor(m => modelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = modelDescription }) 25 | 27 | @if (parameter.Annotations.Count > 0) 28 | { 29 | foreach (var annotation in parameter.Annotations) 30 | { 31 |

@annotation.Documentation

32 | } 33 | } 34 | else 35 | { 36 |

None.

37 | } 38 |
43 | } 44 | else 45 | { 46 |

None.

47 | } 48 | 49 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/Index.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 | 16 |
17 |
18 |
19 |

@ViewBag.Title

20 |
21 |
22 |
23 |
24 | 32 |
33 | @foreach (var group in apiGroups) 34 | { 35 | @Html.DisplayFor(m => group, "ApiGroup") 36 | } 37 |
38 |
39 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Help/ResourceModel.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 3 | @model ModelDescription 4 | 5 | 6 |
7 | 14 |

@Model.Name

15 |

@Model.Documentation

16 |
17 | @Html.DisplayFor(m => Model) 18 |
19 |
20 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Shared/_Layout.cshtml.pp: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Content/Areas/HelpPage/Views/_ViewStart.cshtml.pp: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages. 3 | Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Microsoft.AspNet.WebApi.HelpPage.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.HelpPage.5.1.2/Microsoft.AspNet.WebApi.HelpPage.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.WebHost.5.1.2/Microsoft.AspNet.WebApi.WebHost.5.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.WebHost.5.1.2/Microsoft.AspNet.WebApi.WebHost.5.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.WebHost.5.1.2/lib/net45/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebApi.WebHost.5.1.2/lib/net45/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/Microsoft.AspNet.WebPages.3.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebPages.3.1.2/Microsoft.AspNet.WebPages.3.1.2.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.Deployment.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | System.Web.WebPages.Deployment 5 | 6 | 7 | 8 | Provides a registration point for pre-application start code for Web Pages deployment. 9 | 10 | 11 | Registers pre-application start code for Web Pages deployment. 12 | 13 | 14 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides methods that are used to get deployment information about the Web application. 15 | 16 | 17 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly path for the Web Pages deployment. 18 | The assembly path for the Web Pages deployment. 19 | The Web Pages version. 20 | 21 | 22 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version from the given binary path. 23 | The Web Pages version. 24 | The binary path for the Web Pages. 25 | 26 | 27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the assembly references from the given path regardless of the Web Pages version. 28 | The dictionary containing the assembly references of the Web Pages and its version. 29 | The path to the Web Pages application. 30 | 31 | 32 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the maximum version of the Web Pages loaded assemblies. 33 | The maximum version of the Web Pages loaded assemblies. 34 | 35 | 36 | Gets the Web Pages version from the given path. 37 | The Web Pages version. 38 | The path of the root directory for the application. 39 | 40 | 41 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the Web Pages version using the configuration settings with the specified path. 42 | The Web Pages version. 43 | The path to the application settings. 44 | 45 | 46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the assemblies for this Web Pages deployment. 47 | A list containing the assemblies for this Web Pages deployment. 48 | 49 | 50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is enabled. 51 | true if the Web Pages deployment is enabled; otherwise, false. 52 | The path to the Web Pages deployment. 53 | 54 | 55 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Indicates whether the Web Pages deployment is explicitly disabled. 56 | true if the Web Pages deployment is explicitly disabled; otherwise, false. 57 | The path to the Web Pages deployment. 58 | 59 | 60 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.AspNet.WebPages.3.1.2/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 2 | try { 3 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 4 | } 5 | catch { 6 | # _references.js file not found 7 | return 8 | } 9 | 10 | if ($referencesFileProjectItem -eq $null) { 11 | # _references.js file not found 12 | return 13 | } 14 | 15 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 16 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 17 | 18 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 19 | # File has no existing matching reference line 20 | # Add the full reference line to the beginning of the file 21 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 22 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 23 | } 24 | else { 25 | # Loop through file and replace old file name with new file name 26 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 27 | } 28 | 29 | # Copy over the new _references.js file 30 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 31 | Remove-Item $referencesTempFilePath -Force 32 | } 33 | 34 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 35 | try { 36 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 37 | } 38 | catch { 39 | # _references.js file not found 40 | return 41 | } 42 | 43 | if ($referencesFileProjectItem -eq $null) { 44 | return 45 | } 46 | 47 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 48 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 49 | 50 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 51 | # Delete the line referencing the file 52 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 53 | 54 | # Copy over the new _references.js file 55 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 56 | Remove-Item $referencesTempFilePath -Force 57 | } 58 | } 59 | 60 | # Extract the version number from the file in the package's content\scripts folder 61 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 62 | $modernizrFileName = Join-Path $packageScriptsFolder "modernizr-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 63 | $modernizrFileNameRegEx = "modernizr-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 64 | $modernizrFileName -match $modernizrFileNameRegEx 65 | $ver = $matches[1] 66 | 67 | # Get the project item for the scripts folder 68 | try { 69 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 70 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 71 | } 72 | catch { 73 | # No Scripts folder 74 | Write-Host "No scripts folder found" 75 | } -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/Newtonsoft.Json.5.0.6.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/Newtonsoft.Json.5.0.6.nupkg -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.5.0.6/lib/portable-net45+wp80+win8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Newtonsoft.Json.5.0.6/lib/portable-net45+wp80+win8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Respond.1.2.0/Respond.1.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Respond.1.2.0/Respond.1.2.0.nupkg -------------------------------------------------------------------------------- /packages/Respond.1.2.0/content/Scripts/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 3 | window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='­';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); 4 | 5 | /*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 6 | (function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); -------------------------------------------------------------------------------- /packages/Twitter.Bootstrap.3.0.1.1/Twitter.Bootstrap.3.0.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/Twitter.Bootstrap.3.0.1.1/Twitter.Bootstrap.3.0.1.1.nupkg -------------------------------------------------------------------------------- /packages/Twitter.Bootstrap.3.0.1.1/readme.txt: -------------------------------------------------------------------------------- 1 | Twitter.Bootstrap is moving! 2 | 3 | v3.0.1 will be the last release of Bootstrap under the Twitter.Bootstrap namespace. With new projects moving forward, you should install Bootstrap directly from the Bootstrap namespace maintained by Outercurve https://www.nuget.org/packages/Bootstrap/ 4 | For existing projects, you already have the new Bootstrap package installed by upgrading to this release. 5 | 6 | After Migration the folder structure of the bootstrap files will be as follows 7 | - Application Root 8 | - Content 9 | ---- css files such as bootstrap.css 10 | - fonts 11 | ---- all fonts files 12 | - Scripts 13 | ---- all script files such as bootstrap.js 14 | 15 | This move does not affect the Twitter.Bootstrap.MVC package or the Twitter.Bootstrap.Less package. Those packages will continue to be maintained with each new bootstrap release. Visit github (https://github.com/sirkirby/twitter-bootstrap-nuget) for more info. 16 | 17 | Any questions or issues? Ask me on twitter @sirkirby or visit http://chriskirby.net/bootstrap-nuget-package-moving-to-outercurve/ -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/lib/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/WebGrease.1.5.2/lib/WebGrease.dll -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/tools/WG.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/WebGrease.1.5.2/tools/WG.exe -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # Return a relative path with reference to root as Uri object 4 | # $rootPath - root path 5 | # $relativePath - relative path 6 | # $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine() 7 | Function GetRelativeUri($rootPath, $relativePath, $appendToRelativePath) 8 | { 9 | if($rootPath -eq $null) 10 | { 11 | return $null 12 | } 13 | 14 | if($relativePath -eq $null) 15 | { 16 | return $null 17 | } 18 | 19 | $rootUri = new-object system.Uri($rootPath) 20 | $targetPath = $relativePath 21 | 22 | # If appendToRelativePath is provided then use it 23 | if($appendToRelativePath -ne $null) 24 | { 25 | $targetPath = [io.path]::Combine($relativePath, $appendToRelativePath) 26 | } 27 | 28 | $targetUri = new-object system.Uri($targetPath) 29 | $relativeUri = $rootUri.MakeRelativeUri($targetUri) 30 | 31 | return $relativeUri 32 | } 33 | 34 | # Visual Studio execution done via NuGet Package Manager 35 | Function VSExecution($installPath, $package, $project) 36 | { 37 | #$project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) 38 | 39 | # Get the msbuild version of the project and add the import 40 | $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 41 | 42 | # add a property for us to be able to reference the path where the package was installed 43 | $relativePackageUri = GetRelativeUri $project.FullName $installPath"\lib" 44 | 45 | $msbuild.Xml.AddProperty("WebGreaseLibPath", $relativePackageUri.ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar)) 46 | 47 | # save the project 48 | $project.Save() 49 | } 50 | 51 | # Command line execution done by any external tool (For example, NuGetUpdater) 52 | # $package - package id 53 | # $project - parameter value is path to Project file in this case. 54 | Function CommandLineExecution($installPath, $package, $project) 55 | { 56 | [Reflection.Assembly]::LoadWithPartialName("Microsoft.Build") 57 | [Reflection.Assembly]::LoadWithPartialName("System.Xml") 58 | [Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") 59 | 60 | # Get the msbuild version of the project and add the import 61 | $projXDoc = [System.Xml.Linq.XDocument]::Load($project) 62 | 63 | $defaultNameSpace = $projXDoc.Root.GetDefaultNamespace() 64 | 65 | $propertyGroup = [System.Xml.Linq.XName]::Get("PropertyGroup", $defaultNameSpace.NamespaceName) 66 | $webGreaseBuildLocation = [System.Xml.Linq.XName]::Get("WebGreaseLibPath", $defaultNameSpace.NamespaceName) 67 | 68 | # add a property for us to be able to reference the path where the package was installed 69 | $relativePackageUri = GetRelativeUri $project.FullName $installPath"\lib" 70 | 71 | $propGroupElement = $projXDoc.Root.Elements($propertyGroup) | Select-Object -First 1 72 | IF ($propGroupElement -ne $null) 73 | { 74 | $newElement = new-object System.Xml.Linq.XElement($webGreaseBuildLocation, $relativePackageUri.ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar)) 75 | $propGroupElement.Add($newElement) 76 | } 77 | 78 | # save the project 79 | $projXDoc.Save($project) 80 | } 81 | 82 | 83 | IF ($project -is [system.string]) 84 | { 85 | CommandLineExecution $installPath $package $project 86 | } 87 | ELSE 88 | { 89 | VSExecution $installPath $package $project 90 | } 91 | -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # Visual Studio execution done via NuGet Package Manager 4 | Function VSExecution($toolsPath, $project) 5 | { 6 | 7 | 8 | $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) 9 | 10 | # Get the msbuild version of the project and add the import 11 | $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 12 | 13 | # now remove our property that points to this package path, "WebGreaseLibPath" 14 | foreach ($property in $msbuild.Properties) 15 | { 16 | if ($property.Name -eq "WebGreaseLibPath") 17 | { 18 | $propertyToRemove = $property 19 | } 20 | } 21 | 22 | if ($propertyToRemove -ne $null) 23 | { 24 | $propertyToRemove.Project.RemoveProperty($propertyToRemove) 25 | $project.Save() 26 | } 27 | 28 | $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty) 29 | } 30 | 31 | # Command line execution done by any external tool (For example, NuGetUpdater) 32 | # $project - parameter value is path to Project file in this case. 33 | Function CommandLineExecution($toolsPath, $project) 34 | { 35 | [Reflection.Assembly]::LoadWithPartialName("System.Xml") 36 | [Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") 37 | 38 | 39 | 40 | $projXDoc = [System.Xml.Linq.XDocument]::Load($project) 41 | $defaultNameSpace = $projXDoc.Root.GetDefaultNamespace() 42 | $xmlReader = $projXDoc.CreateReader() 43 | $namespaceManager = new-object System.Xml.XmlNamespaceManager($xmlReader.NameTable) 44 | $namespaceManager.AddNamespace("my", $defaultNameSpace.NamespaceName) 45 | 46 | $msnRfPackageElement = [System.Xml.XPath.Extensions]::XPathSelectElement($projXDoc.Root, "//my:WebGreaseLibPath", $namespaceManager) 47 | if($msnRfPackageElement -ne $null) 48 | { 49 | $msnRfPackageElement.Remove() 50 | } 51 | 52 | # save the project 53 | $projXDoc.Save($project) 54 | } 55 | 56 | IF ($project -is [system.string]) 57 | { 58 | CommandLineExecution $toolsPath $project 59 | } 60 | ELSE 61 | { 62 | VSExecution $toolsPath $project 63 | } 64 | -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.0/Content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.0.1/bootstrap.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.1/bootstrap.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/bootstrap.3.0.1/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function Get-Checksum($file) { 2 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 3 | 4 | $fileInfo = Get-Item $file 5 | trap { ; 6 | continue } $stream = $fileInfo.OpenRead() 7 | if ($? -eq $false) { 8 | # Couldn't open file for reading 9 | return $null 10 | } 11 | 12 | $bytes = $cryptoProvider.ComputeHash($stream) 13 | $checksum = '' 14 | foreach ($byte in $bytes) { 15 | $checksum += $byte.ToString('x2') 16 | } 17 | 18 | $stream.Close() | Out-Null 19 | 20 | return $checksum 21 | } 22 | 23 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 24 | try { 25 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 26 | } 27 | catch { 28 | # _references.js file not found 29 | return 30 | } 31 | 32 | if ($referencesFileProjectItem -eq $null) { 33 | # _references.js file not found 34 | return 35 | } 36 | 37 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 38 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 39 | 40 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 41 | # File has no existing matching reference line 42 | # Add the full reference line to the beginning of the file 43 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /packages/jQuery.1.9.0/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function Get-Checksum($file) { 2 | $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" 3 | 4 | $fileInfo = Get-Item $file 5 | trap { ; 6 | continue } $stream = $fileInfo.OpenRead() 7 | if ($? -eq $false) { 8 | # Couldn't open file for reading 9 | return $null 10 | } 11 | 12 | $bytes = $cryptoProvider.ComputeHash($stream) 13 | $checksum = '' 14 | foreach ($byte in $bytes) { 15 | $checksum += $byte.ToString('x2') 16 | } 17 | 18 | $stream.Close() | Out-Null 19 | 20 | return $checksum 21 | } 22 | 23 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 24 | try { 25 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 26 | } 27 | catch { 28 | # _references.js file not found 29 | return 30 | } 31 | 32 | if ($referencesFileProjectItem -eq $null) { 33 | # _references.js file not found 34 | return 35 | } 36 | 37 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 38 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 39 | 40 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 41 | # File has no existing matching reference line 42 | # Add the full reference line to the beginning of the file 43 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /packages/jQuery.1.9.0/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /packages/jQuery.1.9.0/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /packages/jQuery.1.9.0/jQuery.1.9.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeborahK/Angular-MovieHunter-WebAPI/cee5343f434559740fb50fd7768bcc0162f1a370/packages/jQuery.1.9.0/jQuery.1.9.0.nupkg -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------