From 9d2f1b16166c100c962554989dde9a8d214f0417 Mon Sep 17 00:00:00 2001 From: Gary McLean Hall Date: Wed, 4 Apr 2018 15:33:00 +0100 Subject: [PATCH 1/3] Updated readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f5a218..0f0eaf3 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,10 @@ git clone --recursive git@github.com:AdaptiveCode/AdaptiveCode.git ## Submodule Repositories - [Chapter 1](https://www.github.com/AdaptiveCode/Chapter1) -- Chapter 2 (No sample code) - [Chapter 3](https://www.github.com/AdaptiveCode/Chapter3) - [Chapter 4](https://www.github.com/AdaptiveCode/Chapter4) - [Chapter 5 and 6](https://www.github.com/AdaptiveCode/Chapter5and6) - [Chapter 7](https://www.github.com/AdaptiveCode/Chapter7) -- Chapter 8 (Sample code in progress) - [Chapter 9](https://www.github.com/AdaptiveCode/Chapter9) - [Chapter 10](https://www.github.com/AdaptiveCode/Chapter10) @@ -30,4 +28,4 @@ git clone --recursive git@github.com:AdaptiveCode/AdaptiveCode.git - _Chapter 7:_ [![Build status](https://ci.appveyor.com/api/projects/status/b1laab6l6f48wb8h?svg=true)](https://ci.appveyor.com/project/garymcleanhall/chapter7) - _Chapter 8:_ Sample code in progress - _Chapter 9:_ [![Build status](https://ci.appveyor.com/api/projects/status/ixfhnhqxrcv3htg5?svg=true)](https://ci.appveyor.com/project/garymcleanhall/chapter9) -- _Chapter 10:_ [![Build status](https://ci.appveyor.com/api/projects/status/03m2llu5k3ojxv0p?svg=true)](https://ci.appveyor.com/project/garymcleanhall/chapter10) \ No newline at end of file +- _Chapter 10:_ [![Build status](https://ci.appveyor.com/api/projects/status/03m2llu5k3ojxv0p?svg=true)](https://ci.appveyor.com/project/garymcleanhall/chapter10) From 9a687b7cc65c535b0f12e264318b93a1dee08e14 Mon Sep 17 00:00:00 2001 From: Gary McLean Hall Date: Mon, 6 May 2019 16:20:25 +0100 Subject: [PATCH 2/3] Added example structure of the Entourage Anti-Pattern --- .gitignore | 2 + Chapter11/.vs/config/applicationhost.config | 1035 +++++++++++++++++ Chapter11/Domain/Domain.csproj | 59 + Chapter11/Domain/IUserRepository.cs | 9 + Chapter11/Domain/Properties/AssemblyInfo.cs | 36 + Chapter11/Domain/User.cs | 15 + Chapter11/Domain/UserRepository.cs | 20 + Chapter11/Domain/packages.config | 5 + Chapter11/EntourageAntiPattern.sln | 37 + .../App_Start/RouteConfig.cs | 23 + .../Controllers/AccountController.cs | 21 + .../EntourageAntiPattern.csproj | 171 +++ Chapter11/EntourageAntiPattern/Global.asax | 1 + Chapter11/EntourageAntiPattern/Global.asax.cs | 16 + .../ManualConstructionControllerFactory.cs | 45 + .../Properties/AssemblyInfo.cs | 35 + .../EntourageAntiPattern/Views/web.config | 42 + .../EntourageAntiPattern/Web.Debug.config | 30 + .../EntourageAntiPattern/Web.Release.config | 31 + Chapter11/EntourageAntiPattern/Web.config | 43 + .../EntourageAntiPattern/packages.config | 10 + Chapter11/Services/ISecurityService.cs | 9 + Chapter11/Services/Properties/AssemblyInfo.cs | 36 + Chapter11/Services/SecurityService.cs | 22 + Chapter11/Services/Services.csproj | 55 + 25 files changed, 1808 insertions(+) create mode 100644 Chapter11/.vs/config/applicationhost.config create mode 100644 Chapter11/Domain/Domain.csproj create mode 100644 Chapter11/Domain/IUserRepository.cs create mode 100644 Chapter11/Domain/Properties/AssemblyInfo.cs create mode 100644 Chapter11/Domain/User.cs create mode 100644 Chapter11/Domain/UserRepository.cs create mode 100644 Chapter11/Domain/packages.config create mode 100644 Chapter11/EntourageAntiPattern.sln create mode 100644 Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs create mode 100644 Chapter11/EntourageAntiPattern/Controllers/AccountController.cs create mode 100644 Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj create mode 100644 Chapter11/EntourageAntiPattern/Global.asax create mode 100644 Chapter11/EntourageAntiPattern/Global.asax.cs create mode 100644 Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs create mode 100644 Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs create mode 100644 Chapter11/EntourageAntiPattern/Views/web.config create mode 100644 Chapter11/EntourageAntiPattern/Web.Debug.config create mode 100644 Chapter11/EntourageAntiPattern/Web.Release.config create mode 100644 Chapter11/EntourageAntiPattern/Web.config create mode 100644 Chapter11/EntourageAntiPattern/packages.config create mode 100644 Chapter11/Services/ISecurityService.cs create mode 100644 Chapter11/Services/Properties/AssemblyInfo.cs create mode 100644 Chapter11/Services/SecurityService.cs create mode 100644 Chapter11/Services/Services.csproj diff --git a/.gitignore b/.gitignore index 7cd7946..197fe4e 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,5 @@ UpgradeLog*.htm FakesAssemblies/ builds/ + +.vs/ diff --git a/Chapter11/.vs/config/applicationhost.config b/Chapter11/.vs/config/applicationhost.config new file mode 100644 index 0000000..ab10bd5 --- /dev/null +++ b/Chapter11/.vs/config/applicationhost.config @@ -0,0 +1,1035 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Chapter11/Domain/Domain.csproj b/Chapter11/Domain/Domain.csproj new file mode 100644 index 0000000..6470a9f --- /dev/null +++ b/Chapter11/Domain/Domain.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Library + Properties + Domain + Domain + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\source\repos\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll + + + ..\..\..\..\source\repos\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/Domain/IUserRepository.cs b/Chapter11/Domain/IUserRepository.cs new file mode 100644 index 0000000..dac5bcd --- /dev/null +++ b/Chapter11/Domain/IUserRepository.cs @@ -0,0 +1,9 @@ +using System; + +namespace Domain +{ + public interface IUserRepository + { + User GetByID(Guid userID); + } +} diff --git a/Chapter11/Domain/Properties/AssemblyInfo.cs b/Chapter11/Domain/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5cde6e3 --- /dev/null +++ b/Chapter11/Domain/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Domain")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Domain")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("eb255bc0-db8c-428f-8ef4-be7f4526df4f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/Domain/User.cs b/Chapter11/Domain/User.cs new file mode 100644 index 0000000..93f1f31 --- /dev/null +++ b/Chapter11/Domain/User.cs @@ -0,0 +1,15 @@ +using System; + +namespace Domain +{ + public class User + { + public Guid ID { get; } + + public string Password { get; set; } + + // + // Actual domain entity behavior... + // + } +} \ No newline at end of file diff --git a/Chapter11/Domain/UserRepository.cs b/Chapter11/Domain/UserRepository.cs new file mode 100644 index 0000000..96abbea --- /dev/null +++ b/Chapter11/Domain/UserRepository.cs @@ -0,0 +1,20 @@ +using NHibernate; +using System; + +namespace Domain +{ + public class UserRepository : IUserRepository + { + private readonly ISession session; + + public UserRepository(ISession session) + { + this.session = session; + } + + public User GetByID(Guid userID) + { + return this.session.Get(userID); + } + } +} diff --git a/Chapter11/Domain/packages.config b/Chapter11/Domain/packages.config new file mode 100644 index 0000000..524cb14 --- /dev/null +++ b/Chapter11/Domain/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern.sln b/Chapter11/EntourageAntiPattern.sln new file mode 100644 index 0000000..1b8b95e --- /dev/null +++ b/Chapter11/EntourageAntiPattern.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.421 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntourageAntiPattern", "EntourageAntiPattern\EntourageAntiPattern.csproj", "{ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Services", "Services\Services.csproj", "{64B810A0-1179-4394-9DA6-F041ED33D591}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Release|Any CPU.Build.0 = Release|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Release|Any CPU.Build.0 = Release|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F3CA288C-C175-4270-87A5-1D01ADB096FA} + EndGlobalSection +EndGlobal diff --git a/Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs b/Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs new file mode 100644 index 0000000..ed89098 --- /dev/null +++ b/Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace EntourageAntiPattern +{ + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); + } + } +} diff --git a/Chapter11/EntourageAntiPattern/Controllers/AccountController.cs b/Chapter11/EntourageAntiPattern/Controllers/AccountController.cs new file mode 100644 index 0000000..6301b86 --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Controllers/AccountController.cs @@ -0,0 +1,21 @@ +using Services; +using System; +using System.Web.Mvc; + +namespace EntourageAntiPattern.Controllers +{ + public class AccountController : Controller + { + private readonly ISecurityService securityService; + + public AccountController(ISecurityService securityService) + { + this.securityService = securityService; + } + + public void ChangePassword(Guid userID, string password) + { + this.securityService.ChangeUsersPassword(userID, password); + } + } +} \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj b/Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj new file mode 100644 index 0000000..1223acf --- /dev/null +++ b/Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj @@ -0,0 +1,171 @@ + + + + + Debug + AnyCPU + + + 2.0 + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + EntourageAntiPattern + EntourageAntiPattern + v4.7.2 + true + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + true + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll + + + + ..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll + + + + + + + + + + + + + + + + + + + + + ..\packages\Microsoft.AspNet.Razor.3.2.4\lib\net45\System.Web.Razor.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.Deployment.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.Razor.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Helpers.dll + + + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + ..\packages\Microsoft.AspNet.Mvc.5.2.4\lib\net45\System.Web.Mvc.dll + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + + + + + + + + + + + Global.asax + + + + + + + + + Web.config + + + Web.config + + + + + + + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + {64B810A0-1179-4394-9DA6-F041ED33D591} + Services + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 56624 + / + http://localhost:56624/ + False + False + + + False + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern/Global.asax b/Chapter11/EntourageAntiPattern/Global.asax new file mode 100644 index 0000000..38edddd --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="EntourageAntiPattern.MvcApplication" Language="C#" %> diff --git a/Chapter11/EntourageAntiPattern/Global.asax.cs b/Chapter11/EntourageAntiPattern/Global.asax.cs new file mode 100644 index 0000000..eb1b0cb --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Global.asax.cs @@ -0,0 +1,16 @@ +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace EntourageAntiPattern +{ + public class MvcApplication : HttpApplication + { + protected void Application_Start() + { + ControllerBuilder.Current.SetControllerFactory(typeof(ManualConstructionControllerFactory)); + AreaRegistration.RegisterAllAreas(); + RouteConfig.RegisterRoutes(RouteTable.Routes); + } + } +} diff --git a/Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs b/Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs new file mode 100644 index 0000000..01f2a6b --- /dev/null +++ b/Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs @@ -0,0 +1,45 @@ +using System; +using System.Web.Mvc; +using System.Web.Routing; +using System.Web.SessionState; +using Domain; +using EntourageAntiPattern.Controllers; +using NHibernate; +using NHibernate.Cfg; +using Services; + +namespace EntourageAntiPattern +{ + public class ManualConstructionControllerFactory : IControllerFactory + { + private readonly ISession session; + + public ManualConstructionControllerFactory() + { + var config = new Configuration(); + var sessionFactory = config.BuildSessionFactory(); + this.session = sessionFactory.OpenSession(); + } + + public IController CreateController(RequestContext requestContext, string controllerName) + { + switch (controllerName) + { + case "AccountController": + return new AccountController(new SecurityService(new UserRepository(this.session))); + default: + throw new NotSupportedException($"The controller `{controllerName}` has not been configured"); + } + } + + public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName) + { + return SessionStateBehavior.Default; + } + + public void ReleaseController(IController controller) + { + (controller as IDisposable)?.Dispose(); + } + } +} \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs b/Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fdbc9af --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("EntourageAntiPattern")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("EntourageAntiPattern")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("adcb3c9f-b8b7-43f9-9c37-a31fdc6e7bd0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/EntourageAntiPattern/Views/web.config b/Chapter11/EntourageAntiPattern/Views/web.config new file mode 100644 index 0000000..547d360 --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Views/web.config @@ -0,0 +1,42 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Chapter11/EntourageAntiPattern/Web.Debug.config b/Chapter11/EntourageAntiPattern/Web.Debug.config new file mode 100644 index 0000000..fae9cfe --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern/Web.Release.config b/Chapter11/EntourageAntiPattern/Web.Release.config new file mode 100644 index 0000000..da6e960 --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/EntourageAntiPattern/Web.config b/Chapter11/EntourageAntiPattern/Web.config new file mode 100644 index 0000000..8ab3a1a --- /dev/null +++ b/Chapter11/EntourageAntiPattern/Web.config @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Chapter11/EntourageAntiPattern/packages.config b/Chapter11/EntourageAntiPattern/packages.config new file mode 100644 index 0000000..3e97703 --- /dev/null +++ b/Chapter11/EntourageAntiPattern/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/Services/ISecurityService.cs b/Chapter11/Services/ISecurityService.cs new file mode 100644 index 0000000..c935409 --- /dev/null +++ b/Chapter11/Services/ISecurityService.cs @@ -0,0 +1,9 @@ +using System; + +namespace Services +{ + public interface ISecurityService + { + void ChangeUsersPassword(Guid userID, string newPassword); + } +} diff --git a/Chapter11/Services/Properties/AssemblyInfo.cs b/Chapter11/Services/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..126d20d --- /dev/null +++ b/Chapter11/Services/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Services")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Services")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("64b810a0-1179-4394-9da6-f041ed33d591")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/Services/SecurityService.cs b/Chapter11/Services/SecurityService.cs new file mode 100644 index 0000000..80e9eea --- /dev/null +++ b/Chapter11/Services/SecurityService.cs @@ -0,0 +1,22 @@ +using Domain; +using System; + +namespace Services +{ + public class SecurityService : ISecurityService + { + private IUserRepository userRepository; + + public SecurityService(IUserRepository userRepository) + { + this.userRepository = userRepository; + } + + + public void ChangeUsersPassword(Guid userID, string newPassword) + { + var user = this.userRepository.GetByID(userID); + user.Password = newPassword; + } + } +} diff --git a/Chapter11/Services/Services.csproj b/Chapter11/Services/Services.csproj new file mode 100644 index 0000000..4d31d0d --- /dev/null +++ b/Chapter11/Services/Services.csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {64B810A0-1179-4394-9DA6-F041ED33D591} + Library + Properties + Services + Services + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + + \ No newline at end of file From ea9b909bb821de1d9d5d06a75159dd9cbdc572c0 Mon Sep 17 00:00:00 2001 From: Gary McLean Hall Date: Mon, 6 May 2019 16:29:48 +0100 Subject: [PATCH 3/3] Added example structure of the Stairway Pattern --- .../Domain/Domain.csproj | 0 .../Domain/IUserRepository.cs | 0 .../Domain/Properties/AssemblyInfo.cs | 0 .../{ => EntourageAntiPattern}/Domain/User.cs | 0 .../Domain/UserRepository.cs | 0 .../Domain/packages.config | 0 .../EntourageAntiPattern.sln | 0 .../App_Start/RouteConfig.cs | 0 .../Controllers/AccountController.cs | 0 .../EntourageAntiPattern.csproj | 0 .../{ => EntourageAntiPattern}/Global.asax | 0 .../{ => EntourageAntiPattern}/Global.asax.cs | 0 .../ManualConstructionControllerFactory.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../Views/web.config | 0 .../Web.Debug.config | 0 .../Web.Release.config | 0 .../{ => EntourageAntiPattern}/Web.config | 0 .../packages.config | 0 .../Services/ISecurityService.cs | 0 .../Services/Properties/AssemblyInfo.cs | 0 .../Services/SecurityService.cs | 0 .../Services/Services.csproj | 0 .../Domain.NHibernate.csproj | 63 ++++++ .../Properties/AssemblyInfo.cs | 36 ++++ .../Domain.NHibernate/UserRepository.cs | 20 ++ .../Domain.NHibernate/packages.config | 5 + .../StairwayPattern/Domain/Domain.csproj | 58 ++++++ .../StairwayPattern/Domain/IUserRepository.cs | 9 + .../Domain/Properties/AssemblyInfo.cs | 36 ++++ Chapter11/StairwayPattern/Domain/User.cs | 15 ++ .../StairwayPattern/Domain/packages.config | 5 + .../Properties/AssemblyInfo.cs | 36 ++++ .../SecurityService.cs | 22 +++ .../Services.Implementations.csproj | 58 ++++++ .../Services/ISecurityService.cs | 9 + .../Services/Properties/AssemblyInfo.cs | 36 ++++ .../StairwayPattern/Services/Services.csproj | 54 ++++++ Chapter11/StairwayPattern/StairwayPattern.sln | 49 +++++ .../StairwayPattern/App_Start/RouteConfig.cs | 23 +++ .../Controllers/AccountController.cs | 21 ++ .../StairwayPattern/Global.asax | 1 + .../StairwayPattern/Global.asax.cs | 16 ++ .../ManualConstructionControllerFactory.cs | 45 +++++ .../Properties/AssemblyInfo.cs | 35 ++++ .../StairwayPattern/StairwayPattern.csproj | 179 ++++++++++++++++++ .../StairwayPattern/Views/web.config | 42 ++++ .../StairwayPattern/Web.Debug.config | 30 +++ .../StairwayPattern/Web.Release.config | 31 +++ .../StairwayPattern/Web.config | 43 +++++ .../StairwayPattern/packages.config | 10 + 51 files changed, 987 insertions(+) rename Chapter11/{ => EntourageAntiPattern}/Domain/Domain.csproj (100%) rename Chapter11/{ => EntourageAntiPattern}/Domain/IUserRepository.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Domain/Properties/AssemblyInfo.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Domain/User.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Domain/UserRepository.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Domain/packages.config (100%) rename Chapter11/{ => EntourageAntiPattern}/EntourageAntiPattern.sln (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/App_Start/RouteConfig.cs (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Controllers/AccountController.cs (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/EntourageAntiPattern.csproj (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Global.asax (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Global.asax.cs (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/ManualConstructionControllerFactory.cs (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Properties/AssemblyInfo.cs (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Views/web.config (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Web.Debug.config (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Web.Release.config (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/Web.config (100%) rename Chapter11/EntourageAntiPattern/{ => EntourageAntiPattern}/packages.config (100%) rename Chapter11/{ => EntourageAntiPattern}/Services/ISecurityService.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Services/Properties/AssemblyInfo.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Services/SecurityService.cs (100%) rename Chapter11/{ => EntourageAntiPattern}/Services/Services.csproj (100%) create mode 100644 Chapter11/StairwayPattern/Domain.NHibernate/Domain.NHibernate.csproj create mode 100644 Chapter11/StairwayPattern/Domain.NHibernate/Properties/AssemblyInfo.cs create mode 100644 Chapter11/StairwayPattern/Domain.NHibernate/UserRepository.cs create mode 100644 Chapter11/StairwayPattern/Domain.NHibernate/packages.config create mode 100644 Chapter11/StairwayPattern/Domain/Domain.csproj create mode 100644 Chapter11/StairwayPattern/Domain/IUserRepository.cs create mode 100644 Chapter11/StairwayPattern/Domain/Properties/AssemblyInfo.cs create mode 100644 Chapter11/StairwayPattern/Domain/User.cs create mode 100644 Chapter11/StairwayPattern/Domain/packages.config create mode 100644 Chapter11/StairwayPattern/Services.Implementations/Properties/AssemblyInfo.cs create mode 100644 Chapter11/StairwayPattern/Services.Implementations/SecurityService.cs create mode 100644 Chapter11/StairwayPattern/Services.Implementations/Services.Implementations.csproj create mode 100644 Chapter11/StairwayPattern/Services/ISecurityService.cs create mode 100644 Chapter11/StairwayPattern/Services/Properties/AssemblyInfo.cs create mode 100644 Chapter11/StairwayPattern/Services/Services.csproj create mode 100644 Chapter11/StairwayPattern/StairwayPattern.sln create mode 100644 Chapter11/StairwayPattern/StairwayPattern/App_Start/RouteConfig.cs create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Controllers/AccountController.cs create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Global.asax create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Global.asax.cs create mode 100644 Chapter11/StairwayPattern/StairwayPattern/ManualConstructionControllerFactory.cs create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Properties/AssemblyInfo.cs create mode 100644 Chapter11/StairwayPattern/StairwayPattern/StairwayPattern.csproj create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Views/web.config create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Web.Debug.config create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Web.Release.config create mode 100644 Chapter11/StairwayPattern/StairwayPattern/Web.config create mode 100644 Chapter11/StairwayPattern/StairwayPattern/packages.config diff --git a/Chapter11/Domain/Domain.csproj b/Chapter11/EntourageAntiPattern/Domain/Domain.csproj similarity index 100% rename from Chapter11/Domain/Domain.csproj rename to Chapter11/EntourageAntiPattern/Domain/Domain.csproj diff --git a/Chapter11/Domain/IUserRepository.cs b/Chapter11/EntourageAntiPattern/Domain/IUserRepository.cs similarity index 100% rename from Chapter11/Domain/IUserRepository.cs rename to Chapter11/EntourageAntiPattern/Domain/IUserRepository.cs diff --git a/Chapter11/Domain/Properties/AssemblyInfo.cs b/Chapter11/EntourageAntiPattern/Domain/Properties/AssemblyInfo.cs similarity index 100% rename from Chapter11/Domain/Properties/AssemblyInfo.cs rename to Chapter11/EntourageAntiPattern/Domain/Properties/AssemblyInfo.cs diff --git a/Chapter11/Domain/User.cs b/Chapter11/EntourageAntiPattern/Domain/User.cs similarity index 100% rename from Chapter11/Domain/User.cs rename to Chapter11/EntourageAntiPattern/Domain/User.cs diff --git a/Chapter11/Domain/UserRepository.cs b/Chapter11/EntourageAntiPattern/Domain/UserRepository.cs similarity index 100% rename from Chapter11/Domain/UserRepository.cs rename to Chapter11/EntourageAntiPattern/Domain/UserRepository.cs diff --git a/Chapter11/Domain/packages.config b/Chapter11/EntourageAntiPattern/Domain/packages.config similarity index 100% rename from Chapter11/Domain/packages.config rename to Chapter11/EntourageAntiPattern/Domain/packages.config diff --git a/Chapter11/EntourageAntiPattern.sln b/Chapter11/EntourageAntiPattern/EntourageAntiPattern.sln similarity index 100% rename from Chapter11/EntourageAntiPattern.sln rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern.sln diff --git a/Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/App_Start/RouteConfig.cs similarity index 100% rename from Chapter11/EntourageAntiPattern/App_Start/RouteConfig.cs rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/App_Start/RouteConfig.cs diff --git a/Chapter11/EntourageAntiPattern/Controllers/AccountController.cs b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Controllers/AccountController.cs similarity index 100% rename from Chapter11/EntourageAntiPattern/Controllers/AccountController.cs rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Controllers/AccountController.cs diff --git a/Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/EntourageAntiPattern.csproj similarity index 100% rename from Chapter11/EntourageAntiPattern/EntourageAntiPattern.csproj rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/EntourageAntiPattern.csproj diff --git a/Chapter11/EntourageAntiPattern/Global.asax b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Global.asax similarity index 100% rename from Chapter11/EntourageAntiPattern/Global.asax rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Global.asax diff --git a/Chapter11/EntourageAntiPattern/Global.asax.cs b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Global.asax.cs similarity index 100% rename from Chapter11/EntourageAntiPattern/Global.asax.cs rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Global.asax.cs diff --git a/Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/ManualConstructionControllerFactory.cs similarity index 100% rename from Chapter11/EntourageAntiPattern/ManualConstructionControllerFactory.cs rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/ManualConstructionControllerFactory.cs diff --git a/Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Properties/AssemblyInfo.cs similarity index 100% rename from Chapter11/EntourageAntiPattern/Properties/AssemblyInfo.cs rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Properties/AssemblyInfo.cs diff --git a/Chapter11/EntourageAntiPattern/Views/web.config b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Views/web.config similarity index 100% rename from Chapter11/EntourageAntiPattern/Views/web.config rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Views/web.config diff --git a/Chapter11/EntourageAntiPattern/Web.Debug.config b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.Debug.config similarity index 100% rename from Chapter11/EntourageAntiPattern/Web.Debug.config rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.Debug.config diff --git a/Chapter11/EntourageAntiPattern/Web.Release.config b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.Release.config similarity index 100% rename from Chapter11/EntourageAntiPattern/Web.Release.config rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.Release.config diff --git a/Chapter11/EntourageAntiPattern/Web.config b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.config similarity index 100% rename from Chapter11/EntourageAntiPattern/Web.config rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/Web.config diff --git a/Chapter11/EntourageAntiPattern/packages.config b/Chapter11/EntourageAntiPattern/EntourageAntiPattern/packages.config similarity index 100% rename from Chapter11/EntourageAntiPattern/packages.config rename to Chapter11/EntourageAntiPattern/EntourageAntiPattern/packages.config diff --git a/Chapter11/Services/ISecurityService.cs b/Chapter11/EntourageAntiPattern/Services/ISecurityService.cs similarity index 100% rename from Chapter11/Services/ISecurityService.cs rename to Chapter11/EntourageAntiPattern/Services/ISecurityService.cs diff --git a/Chapter11/Services/Properties/AssemblyInfo.cs b/Chapter11/EntourageAntiPattern/Services/Properties/AssemblyInfo.cs similarity index 100% rename from Chapter11/Services/Properties/AssemblyInfo.cs rename to Chapter11/EntourageAntiPattern/Services/Properties/AssemblyInfo.cs diff --git a/Chapter11/Services/SecurityService.cs b/Chapter11/EntourageAntiPattern/Services/SecurityService.cs similarity index 100% rename from Chapter11/Services/SecurityService.cs rename to Chapter11/EntourageAntiPattern/Services/SecurityService.cs diff --git a/Chapter11/Services/Services.csproj b/Chapter11/EntourageAntiPattern/Services/Services.csproj similarity index 100% rename from Chapter11/Services/Services.csproj rename to Chapter11/EntourageAntiPattern/Services/Services.csproj diff --git a/Chapter11/StairwayPattern/Domain.NHibernate/Domain.NHibernate.csproj b/Chapter11/StairwayPattern/Domain.NHibernate/Domain.NHibernate.csproj new file mode 100644 index 0000000..01519ca --- /dev/null +++ b/Chapter11/StairwayPattern/Domain.NHibernate/Domain.NHibernate.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB} + Library + Properties + Domain.NHibernate + Domain.NHibernate + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll + + + ..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll + + + + + + + + + + + + + + + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Domain.NHibernate/Properties/AssemblyInfo.cs b/Chapter11/StairwayPattern/Domain.NHibernate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9e8c561 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain.NHibernate/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Domain.NHibernate")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Domain.NHibernate")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5fdde261-af9c-4135-b9ae-d8e3609c3fbb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/StairwayPattern/Domain.NHibernate/UserRepository.cs b/Chapter11/StairwayPattern/Domain.NHibernate/UserRepository.cs new file mode 100644 index 0000000..e5510e2 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain.NHibernate/UserRepository.cs @@ -0,0 +1,20 @@ +using NHibernate; +using System; + +namespace Domain.NHibernate +{ + public class UserRepository : IUserRepository + { + private readonly ISession session; + + public UserRepository(ISession session) + { + this.session = session; + } + + public User GetByID(Guid userID) + { + return this.session.Get(userID); + } + } +} diff --git a/Chapter11/StairwayPattern/Domain.NHibernate/packages.config b/Chapter11/StairwayPattern/Domain.NHibernate/packages.config new file mode 100644 index 0000000..524cb14 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain.NHibernate/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Domain/Domain.csproj b/Chapter11/StairwayPattern/Domain/Domain.csproj new file mode 100644 index 0000000..6325e0d --- /dev/null +++ b/Chapter11/StairwayPattern/Domain/Domain.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Library + Properties + Domain + Domain + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\source\repos\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll + + + ..\..\..\..\source\repos\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Domain/IUserRepository.cs b/Chapter11/StairwayPattern/Domain/IUserRepository.cs new file mode 100644 index 0000000..dac5bcd --- /dev/null +++ b/Chapter11/StairwayPattern/Domain/IUserRepository.cs @@ -0,0 +1,9 @@ +using System; + +namespace Domain +{ + public interface IUserRepository + { + User GetByID(Guid userID); + } +} diff --git a/Chapter11/StairwayPattern/Domain/Properties/AssemblyInfo.cs b/Chapter11/StairwayPattern/Domain/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5cde6e3 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Domain")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Domain")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("eb255bc0-db8c-428f-8ef4-be7f4526df4f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/StairwayPattern/Domain/User.cs b/Chapter11/StairwayPattern/Domain/User.cs new file mode 100644 index 0000000..93f1f31 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain/User.cs @@ -0,0 +1,15 @@ +using System; + +namespace Domain +{ + public class User + { + public Guid ID { get; } + + public string Password { get; set; } + + // + // Actual domain entity behavior... + // + } +} \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Domain/packages.config b/Chapter11/StairwayPattern/Domain/packages.config new file mode 100644 index 0000000..524cb14 --- /dev/null +++ b/Chapter11/StairwayPattern/Domain/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Services.Implementations/Properties/AssemblyInfo.cs b/Chapter11/StairwayPattern/Services.Implementations/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8467e14 --- /dev/null +++ b/Chapter11/StairwayPattern/Services.Implementations/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Services.Implementations")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Services.Implementations")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("857b5a40-9bf7-4993-a070-c60c4d697ce3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/StairwayPattern/Services.Implementations/SecurityService.cs b/Chapter11/StairwayPattern/Services.Implementations/SecurityService.cs new file mode 100644 index 0000000..0c86cde --- /dev/null +++ b/Chapter11/StairwayPattern/Services.Implementations/SecurityService.cs @@ -0,0 +1,22 @@ +using Domain; +using System; + +namespace Services.Implementations +{ + public class SecurityService : ISecurityService + { + private readonly IUserRepository userRepository; + + public SecurityService(IUserRepository userRepository) + { + this.userRepository = userRepository; + } + + + public void ChangeUsersPassword(Guid userID, string newPassword) + { + var user = this.userRepository.GetByID(userID); + user.Password = newPassword; + } + } +} diff --git a/Chapter11/StairwayPattern/Services.Implementations/Services.Implementations.csproj b/Chapter11/StairwayPattern/Services.Implementations/Services.Implementations.csproj new file mode 100644 index 0000000..f7860c5 --- /dev/null +++ b/Chapter11/StairwayPattern/Services.Implementations/Services.Implementations.csproj @@ -0,0 +1,58 @@ + + + + + Debug + AnyCPU + {857B5A40-9BF7-4993-A070-C60C4D697CE3} + Library + Properties + Services.Implementations + Services.Implementations + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + {64B810A0-1179-4394-9DA6-F041ED33D591} + Services + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/Services/ISecurityService.cs b/Chapter11/StairwayPattern/Services/ISecurityService.cs new file mode 100644 index 0000000..c935409 --- /dev/null +++ b/Chapter11/StairwayPattern/Services/ISecurityService.cs @@ -0,0 +1,9 @@ +using System; + +namespace Services +{ + public interface ISecurityService + { + void ChangeUsersPassword(Guid userID, string newPassword); + } +} diff --git a/Chapter11/StairwayPattern/Services/Properties/AssemblyInfo.cs b/Chapter11/StairwayPattern/Services/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..126d20d --- /dev/null +++ b/Chapter11/StairwayPattern/Services/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Services")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Services")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("64b810a0-1179-4394-9da6-f041ed33d591")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/StairwayPattern/Services/Services.csproj b/Chapter11/StairwayPattern/Services/Services.csproj new file mode 100644 index 0000000..1ffb642 --- /dev/null +++ b/Chapter11/StairwayPattern/Services/Services.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {64B810A0-1179-4394-9DA6-F041ED33D591} + Library + Properties + Services + Services + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern.sln b/Chapter11/StairwayPattern/StairwayPattern.sln new file mode 100644 index 0000000..de139db --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.421 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StairwayPattern", "StairwayPattern\StairwayPattern.csproj", "{ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Services", "Services\Services.csproj", "{64B810A0-1179-4394-9DA6-F041ED33D591}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Services.Implementations", "Services.Implementations\Services.Implementations.csproj", "{857B5A40-9BF7-4993-A070-C60C4D697CE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain.NHibernate", "Domain.NHibernate\Domain.NHibernate.csproj", "{5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0}.Release|Any CPU.Build.0 = Release|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64B810A0-1179-4394-9DA6-F041ED33D591}.Release|Any CPU.Build.0 = Release|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F}.Release|Any CPU.Build.0 = Release|Any CPU + {857B5A40-9BF7-4993-A070-C60C4D697CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {857B5A40-9BF7-4993-A070-C60C4D697CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {857B5A40-9BF7-4993-A070-C60C4D697CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {857B5A40-9BF7-4993-A070-C60C4D697CE3}.Release|Any CPU.Build.0 = Release|Any CPU + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F3CA288C-C175-4270-87A5-1D01ADB096FA} + EndGlobalSection +EndGlobal diff --git a/Chapter11/StairwayPattern/StairwayPattern/App_Start/RouteConfig.cs b/Chapter11/StairwayPattern/StairwayPattern/App_Start/RouteConfig.cs new file mode 100644 index 0000000..2720261 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/App_Start/RouteConfig.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace StairwayPattern +{ + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); + } + } +} diff --git a/Chapter11/StairwayPattern/StairwayPattern/Controllers/AccountController.cs b/Chapter11/StairwayPattern/StairwayPattern/Controllers/AccountController.cs new file mode 100644 index 0000000..4a9b512 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Controllers/AccountController.cs @@ -0,0 +1,21 @@ +using Services; +using System; +using System.Web.Mvc; + +namespace StairwayPattern.Controllers +{ + public class AccountController : Controller + { + private readonly ISecurityService securityService; + + public AccountController(ISecurityService securityService) + { + this.securityService = securityService; + } + + public void ChangePassword(Guid userID, string password) + { + this.securityService.ChangeUsersPassword(userID, password); + } + } +} \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern/Global.asax b/Chapter11/StairwayPattern/StairwayPattern/Global.asax new file mode 100644 index 0000000..38edddd --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="EntourageAntiPattern.MvcApplication" Language="C#" %> diff --git a/Chapter11/StairwayPattern/StairwayPattern/Global.asax.cs b/Chapter11/StairwayPattern/StairwayPattern/Global.asax.cs new file mode 100644 index 0000000..d5b63b8 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Global.asax.cs @@ -0,0 +1,16 @@ +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace StairwayPattern +{ + public class MvcApplication : HttpApplication + { + protected void Application_Start() + { + ControllerBuilder.Current.SetControllerFactory(typeof(ManualConstructionControllerFactory)); + AreaRegistration.RegisterAllAreas(); + RouteConfig.RegisterRoutes(RouteTable.Routes); + } + } +} diff --git a/Chapter11/StairwayPattern/StairwayPattern/ManualConstructionControllerFactory.cs b/Chapter11/StairwayPattern/StairwayPattern/ManualConstructionControllerFactory.cs new file mode 100644 index 0000000..e7be50b --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/ManualConstructionControllerFactory.cs @@ -0,0 +1,45 @@ +using NHibernate; +using NHibernate.Cfg; +using StairwayPattern.Controllers; +using System; +using System.Web.Mvc; +using System.Web.Routing; +using System.Web.SessionState; +using Domain.NHibernate; +using Services.Implementations; + +namespace StairwayPattern +{ + public class ManualConstructionControllerFactory : IControllerFactory + { + private readonly ISession session; + + public ManualConstructionControllerFactory() + { + var config = new Configuration(); + var sessionFactory = config.BuildSessionFactory(); + this.session = sessionFactory.OpenSession(); + } + + public IController CreateController(RequestContext requestContext, string controllerName) + { + switch (controllerName) + { + case "AccountController": + return new AccountController(new SecurityService(new UserRepository(this.session))); + default: + throw new NotSupportedException($"The controller `{controllerName}` has not been configured"); + } + } + + public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName) + { + return SessionStateBehavior.Default; + } + + public void ReleaseController(IController controller) + { + (controller as IDisposable)?.Dispose(); + } + } +} \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern/Properties/AssemblyInfo.cs b/Chapter11/StairwayPattern/StairwayPattern/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1a9681a --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("StairwayPattern")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("StairwayPattern")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("adcb3c9f-b8b7-43f9-9c37-a31fdc6e7bd0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Chapter11/StairwayPattern/StairwayPattern/StairwayPattern.csproj b/Chapter11/StairwayPattern/StairwayPattern/StairwayPattern.csproj new file mode 100644 index 0000000..769746b --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/StairwayPattern.csproj @@ -0,0 +1,179 @@ + + + + + Debug + AnyCPU + + + 2.0 + {ADCB3C9F-B8B7-43F9-9C37-A31FDC6E7BD0} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + StairwayPattern + StairwayPattern + v4.7.2 + true + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + true + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll + + + + ..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll + + + + + + + + + + + + + + + + + + + + + ..\packages\Microsoft.AspNet.Razor.3.2.4\lib\net45\System.Web.Razor.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.Deployment.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Webpages.Razor.dll + + + ..\packages\Microsoft.AspNet.Webpages.3.2.4\lib\net45\System.Web.Helpers.dll + + + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + ..\packages\Microsoft.AspNet.Mvc.5.2.4\lib\net45\System.Web.Mvc.dll + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + + + + + + + + + + + Global.asax + + + + + + + + + Web.config + + + Web.config + + + + + + + + + {5FDDE261-AF9C-4135-B9AE-D8E3609C3FBB} + Domain.NHibernate + + + {EB255BC0-DB8C-428F-8EF4-BE7F4526DF4F} + Domain + + + {857B5A40-9BF7-4993-A070-C60C4D697CE3} + Services.Implementations + + + {64B810A0-1179-4394-9DA6-F041ED33D591} + Services + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 56624 + / + http://localhost:56624/ + False + False + + + False + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern/Views/web.config b/Chapter11/StairwayPattern/StairwayPattern/Views/web.config new file mode 100644 index 0000000..547d360 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Views/web.config @@ -0,0 +1,42 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Chapter11/StairwayPattern/StairwayPattern/Web.Debug.config b/Chapter11/StairwayPattern/StairwayPattern/Web.Debug.config new file mode 100644 index 0000000..fae9cfe --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern/Web.Release.config b/Chapter11/StairwayPattern/StairwayPattern/Web.Release.config new file mode 100644 index 0000000..da6e960 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Chapter11/StairwayPattern/StairwayPattern/Web.config b/Chapter11/StairwayPattern/StairwayPattern/Web.config new file mode 100644 index 0000000..8ab3a1a --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/Web.config @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Chapter11/StairwayPattern/StairwayPattern/packages.config b/Chapter11/StairwayPattern/StairwayPattern/packages.config new file mode 100644 index 0000000..3e97703 --- /dev/null +++ b/Chapter11/StairwayPattern/StairwayPattern/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file