Commits

Nick Hodges committed 1241aaf

Changed directory name to CustomConstructor

  • Participants
  • Parent commits 6107e8d

Comments (0)

Files changed (60)

DependencyInjection/Intro/CustomConstructor/ConstructorInjection.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/CustomConstructor.dpr

+program CustomConstructor;
+
+{$APPTYPE CONSOLE}
+
+{$R *.res}
+
+uses
+  System.SysUtils,
+  uDoOrderProcessing in 'uDoOrderProcessing.pas';
+
+begin
+  try
+    DoOrderProcessing;
+    ReadLn;
+  except
+    on E: Exception do
+      Writeln(E.ClassName, ': ', E.Message);
+  end;
+end.

DependencyInjection/Intro/CustomConstructor/CustomConstructor.dproj

+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+		<PropertyGroup>
+			<ProjectGuid>{9B0D5783-03AD-47F5-8337-35E51637D9AD}</ProjectGuid>
+			<ProjectVersion>13.4</ProjectVersion>
+			<FrameworkType>None</FrameworkType>
+			<MainSource>CustomConstructor.dpr</MainSource>
+			<Base>True</Base>
+			<Config Condition="'$(Config)'==''">Debug</Config>
+			<Platform Condition="'$(Platform)'==''">Win32</Platform>
+			<TargetedPlatforms>1</TargetedPlatforms>
+			<AppType>Console</AppType>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+			<Base_Win64>true</Base_Win64>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
+			<Base_Win32>true</Base_Win32>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+			<Cfg_1>true</Cfg_1>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
+			<Cfg_1_Win32>true</Cfg_1_Win32>
+			<CfgParent>Cfg_1</CfgParent>
+			<Cfg_1>true</Cfg_1>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+			<Cfg_2>true</Cfg_2>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_UsePackage>bindcompfmx;fmx;rtl;dbrtl;IndySystem;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;DataSnapCommon;DataSnapClient;DataSnapServer;DataSnapProviderClient;xmlrtl;ibxpress;DbxCommonDriver;IndyProtocols;DBXMySQLDriver;dbxcds;bindengine;FMXTee;soaprtl;DBXOracleDriver;dsnap;DBXInformixDriver;IndyCore;fmxase;CloudService;FmxTeeUI;DBXFirebirdDriver;inet;fmxobj;inetdbxpress;DBXSybaseASADriver;fmxdae;dbexpress;DataSnapIndy10ServerTransport;IPIndyImpl;$(DCC_UsePackage)</DCC_UsePackage>
+			<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
+			<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
+			<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
+			<DCC_N>false</DCC_N>
+			<DCC_S>false</DCC_S>
+			<DCC_F>false</DCC_F>
+			<DCC_K>false</DCC_K>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base_Win64)'!=''">
+			<DCC_UsePackage>TeeDB;vclib;Tee;DBXOdbcDriver;DBXSybaseASEDriver;vclimg;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;websnap;vclribbon;VclSmp;vcl;DataSnapConnectors;DBXMSSQLDriver;dsnapcon;vclx;webdsnap;adortl;$(DCC_UsePackage)</DCC_UsePackage>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base_Win32)'!=''">
+			<DCC_UsePackage>vcldbx;frx16;TeeDB;Rave100VCL;vclib;Tee;inetdbbde;DBXOdbcDriver;svnui;DBXSybaseASEDriver;vclimg;frxDB16;intrawebdb_120_160;fmi;fs16;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;Intraweb_120_160;DBXDb2Driver;websnap;vclribbon;frxe16;VclSmp;fsDB16;vcl;DataSnapConnectors;DBXMSSQLDriver;CodeSiteExpressPkg;dsnapcon;vclx;webdsnap;svn;bdertl;adortl;$(DCC_UsePackage)</DCC_UsePackage>
+			<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+			<VerInfo_Locale>1033</VerInfo_Locale>
+			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_1)'!=''">
+			<DCC_UnitSearchPath>$(SPRINGSOURCE)\Core\DI;$(SPRINGSOURCE)\System;$(SPRINGSOURCE)\System\Collections;$(SPRINGSOURCE)\System\Reflection;$(SPRINGSOURCE)\System\Utils;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+			<Manifest_File>None</Manifest_File>
+			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
+			<VerInfo_Locale>1033</VerInfo_Locale>
+			<DCC_Define>DEBUG;CONSOLEAPP;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+			<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
+			<DCC_RemoteDebug>true</DCC_RemoteDebug>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
+			<DCC_RemoteDebug>false</DCC_RemoteDebug>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+			<DCC_DebugInformation>false</DCC_DebugInformation>
+		</PropertyGroup>
+		<ItemGroup>
+			<DelphiCompile Include="$(MainSource)">
+				<MainSource>MainSource</MainSource>
+			</DelphiCompile>
+			<DCCReference Include="uDoOrderProcessing.pas"/>
+			<BuildConfiguration Include="Release">
+				<Key>Cfg_2</Key>
+				<CfgParent>Base</CfgParent>
+			</BuildConfiguration>
+			<BuildConfiguration Include="Base">
+				<Key>Base</Key>
+			</BuildConfiguration>
+			<BuildConfiguration Include="Debug">
+				<Key>Cfg_1</Key>
+				<CfgParent>Base</CfgParent>
+			</BuildConfiguration>
+		</ItemGroup>
+		<ProjectExtensions>
+			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
+			<Borland.ProjectType/>
+			<BorlandProject>
+				<Delphi.Personality>
+					<VersionInfo>
+						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
+						<VersionInfo Name="MajorVer">1</VersionInfo>
+						<VersionInfo Name="MinorVer">0</VersionInfo>
+						<VersionInfo Name="Release">0</VersionInfo>
+						<VersionInfo Name="Build">0</VersionInfo>
+						<VersionInfo Name="Debug">False</VersionInfo>
+						<VersionInfo Name="PreRelease">False</VersionInfo>
+						<VersionInfo Name="Special">False</VersionInfo>
+						<VersionInfo Name="Private">False</VersionInfo>
+						<VersionInfo Name="DLL">False</VersionInfo>
+						<VersionInfo Name="Locale">1033</VersionInfo>
+						<VersionInfo Name="CodePage">1252</VersionInfo>
+					</VersionInfo>
+					<VersionInfoKeys>
+						<VersionInfoKeys Name="CompanyName"/>
+						<VersionInfoKeys Name="FileDescription"/>
+						<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+						<VersionInfoKeys Name="InternalName"/>
+						<VersionInfoKeys Name="LegalCopyright"/>
+						<VersionInfoKeys Name="LegalTrademarks"/>
+						<VersionInfoKeys Name="OriginalFilename"/>
+						<VersionInfoKeys Name="ProductName"/>
+						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+						<VersionInfoKeys Name="Comments"/>
+					</VersionInfoKeys>
+					<Source>
+						<Source Name="MainSource">CustomConstructor.dpr</Source>
+					</Source>
+					<Excluded_Packages>
+						<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+						<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+					</Excluded_Packages>
+				</Delphi.Personality>
+				<Deployment/>
+				<Platforms>
+					<Platform value="Win64">False</Platform>
+					<Platform value="OSX32">False</Platform>
+					<Platform value="Win32">True</Platform>
+				</Platforms>
+				<UnitTesting>
+					<TestProjectName>C:\Code\NickDemoCode\DependencyInjection\Intro\StartingOut\Test\StartingOutTests.dproj</TestProjectName>
+				</UnitTesting>
+			</BorlandProject>
+			<ProjectFileVersion>12</ProjectFileVersion>
+		</ProjectExtensions>
+		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
+		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+	</Project>

DependencyInjection/Intro/CustomConstructor/FieldInjection.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/IsolateInterfaces.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/MovingToInterfaces.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/StartingOut.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/ConstructorInjectionTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/CustomConstructorTests.dpr

+program CustomConstructorTests;
+{
+
+  Delphi DUnit Test Project
+  -------------------------
+  This project contains the DUnit test framework and the GUI/Console test runners.
+  Add "CONSOLE_TESTRUNNER" to the conditional defines entry in the project options
+  to use the console test runner.  Otherwise the GUI test runner will be used by
+  default.
+
+}
+
+{$IFDEF CONSOLE_TESTRUNNER}
+{$APPTYPE CONSOLE}
+{$ENDIF}
+
+uses
+  Forms,
+  TestFramework,
+  GUITestRunner,
+  TextTestRunner,
+  TestuOrderEntry in 'TestuOrderEntry.pas',
+  TestuOrderValidator in 'TestuOrderValidator.pas',
+  uOrder in '..\uOrder.pas',
+  uOrderMocks in 'uOrderMocks.pas',
+  TestuOrderProcessor in 'TestuOrderProcessor.pas',
+  uOrderProcessor in '..\uOrderProcessor.pas',
+  uOrderInterfaces in '..\uOrderInterfaces.pas',
+  uServiceLocator in '..\uServiceLocator.pas';
+
+{R *.RES}
+
+begin
+  Application.Initialize;
+  if IsConsole then
+    with TextTestRunner.RunRegisteredTests do
+      Free
+  else
+    GUITestRunner.RunRegisteredTests;
+end.
+

DependencyInjection/Intro/CustomConstructor/Test/CustomConstructorTests.dproj

+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+		<PropertyGroup>
+			<ProjectGuid>{D4570AAA-4872-45EF-BE39-917A72A52F17}</ProjectGuid>
+			<ProjectVersion>13.4</ProjectVersion>
+			<FrameworkType>VCL</FrameworkType>
+			<Base>True</Base>
+			<Config Condition="'$(Config)'==''">Debug</Config>
+			<Platform Condition="'$(Platform)'==''">Win32</Platform>
+			<TargetedPlatforms>1</TargetedPlatforms>
+			<AppType>Application</AppType>
+			<MainSource>CustomConstructorTests.dpr</MainSource>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+			<Base_Win64>true</Base_Win64>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
+			<Base_Win32>true</Base_Win32>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+			<Cfg_1>true</Cfg_1>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
+			<Cfg_1_Win32>true</Cfg_1_Win32>
+			<CfgParent>Cfg_1</CfgParent>
+			<Cfg_1>true</Cfg_1>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+			<Cfg_2>true</Cfg_2>
+			<CfgParent>Base</CfgParent>
+			<Base>true</Base>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_UnitSearchPath>$(BDS)\Source\DUnit\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+			<DCC_UsePackage>bindcompfmx;fmx;rtl;dbrtl;IndySystem;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;DataSnapCommon;DataSnapClient;DataSnapServer;DataSnapProviderClient;xmlrtl;ibxpress;DbxCommonDriver;IndyProtocols;DBXMySQLDriver;dbxcds;bindengine;FMXTee;soaprtl;DBXOracleDriver;dsnap;DBXInformixDriver;IndyCore;fmxase;CloudService;FmxTeeUI;DBXFirebirdDriver;inet;fmxobj;inetdbxpress;DBXSybaseASADriver;fmxdae;dbexpress;DataSnapIndy10ServerTransport;IPIndyImpl;$(DCC_UsePackage)</DCC_UsePackage>
+			<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
+			<DCC_Define>_CONSOLE_TESTRUNNER;$(DCC_Define)</DCC_Define>
+			<DCC_DcuOutput>.</DCC_DcuOutput>
+			<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
+			<DCC_N>false</DCC_N>
+			<DCC_S>false</DCC_S>
+			<DCC_F>false</DCC_F>
+			<DCC_K>false</DCC_K>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base_Win64)'!=''">
+			<DCC_UsePackage>TeeDB;vclib;Tee;DBXOdbcDriver;DBXSybaseASEDriver;vclimg;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;websnap;vclribbon;VclSmp;vcl;DataSnapConnectors;DBXMSSQLDriver;dsnapcon;vclx;webdsnap;adortl;$(DCC_UsePackage)</DCC_UsePackage>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Base_Win32)'!=''">
+			<DCC_UsePackage>vcldbx;frx16;TeeDB;Rave100VCL;vclib;Tee;inetdbbde;DBXOdbcDriver;svnui;DBXSybaseASEDriver;vclimg;frxDB16;intrawebdb_120_160;fmi;fs16;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;Intraweb_120_160;DBXDb2Driver;websnap;vclribbon;frxe16;VclSmp;fsDB16;vcl;DataSnapConnectors;DBXMSSQLDriver;CodeSiteExpressPkg;dsnapcon;vclx;webdsnap;svn;bdertl;adortl;$(DCC_UsePackage)</DCC_UsePackage>
+			<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+			<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+			<VerInfo_Locale>1033</VerInfo_Locale>
+			<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_1)'!=''">
+			<Manifest_File>None</Manifest_File>
+			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
+			<DCC_UnitSearchPath>$(SPRINGSOURCE)\Core\DI;$(SPRINGSOURCE)\System;$(SPRINGSOURCE)\System\Collections;$(SPRINGSOURCE)\System\Reflection;$(SPRINGSOURCE)\System\Utils;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
+			<VerInfo_Locale>1033</VerInfo_Locale>
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+			<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
+			<DCC_RemoteDebug>true</DCC_RemoteDebug>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
+			<DCC_RemoteDebug>false</DCC_RemoteDebug>
+		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+			<DCC_DebugInformation>false</DCC_DebugInformation>
+		</PropertyGroup>
+		<ItemGroup>
+			<DelphiCompile Include="$(MainSource)">
+				<MainSource>MainSource</MainSource>
+			</DelphiCompile>
+			<DCCReference Include="TestuOrderEntry.pas"/>
+			<DCCReference Include="TestuOrderValidator.pas"/>
+			<DCCReference Include="..\uOrder.pas"/>
+			<DCCReference Include="uOrderMocks.pas"/>
+			<DCCReference Include="TestuOrderProcessor.pas"/>
+			<DCCReference Include="..\uOrderProcessor.pas"/>
+			<DCCReference Include="..\uOrderInterfaces.pas"/>
+			<DCCReference Include="..\uServiceLocator.pas"/>
+			<BuildConfiguration Include="Release">
+				<Key>Cfg_2</Key>
+				<CfgParent>Base</CfgParent>
+			</BuildConfiguration>
+			<BuildConfiguration Include="Base">
+				<Key>Base</Key>
+			</BuildConfiguration>
+			<BuildConfiguration Include="Debug">
+				<Key>Cfg_1</Key>
+				<CfgParent>Base</CfgParent>
+			</BuildConfiguration>
+		</ItemGroup>
+		<ProjectExtensions>
+			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
+			<Borland.ProjectType/>
+			<BorlandProject>
+				<Delphi.Personality>
+					<VersionInfo>
+						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
+						<VersionInfo Name="MajorVer">1</VersionInfo>
+						<VersionInfo Name="MinorVer">0</VersionInfo>
+						<VersionInfo Name="Release">0</VersionInfo>
+						<VersionInfo Name="Build">0</VersionInfo>
+						<VersionInfo Name="Debug">False</VersionInfo>
+						<VersionInfo Name="PreRelease">False</VersionInfo>
+						<VersionInfo Name="Special">False</VersionInfo>
+						<VersionInfo Name="Private">False</VersionInfo>
+						<VersionInfo Name="DLL">False</VersionInfo>
+						<VersionInfo Name="Locale">1033</VersionInfo>
+						<VersionInfo Name="CodePage">1252</VersionInfo>
+					</VersionInfo>
+					<VersionInfoKeys>
+						<VersionInfoKeys Name="CompanyName"/>
+						<VersionInfoKeys Name="FileDescription"/>
+						<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+						<VersionInfoKeys Name="InternalName"/>
+						<VersionInfoKeys Name="LegalCopyright"/>
+						<VersionInfoKeys Name="LegalTrademarks"/>
+						<VersionInfoKeys Name="OriginalFilename"/>
+						<VersionInfoKeys Name="ProductName"/>
+						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+						<VersionInfoKeys Name="Comments"/>
+					</VersionInfoKeys>
+					<Source>
+						<Source Name="MainSource">CustomConstructorTests.dpr</Source>
+					</Source>
+					<Excluded_Packages>
+						<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+						<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+					</Excluded_Packages>
+				</Delphi.Personality>
+				<Deployment/>
+				<Platforms>
+					<Platform value="Win64">False</Platform>
+					<Platform value="OSX32">False</Platform>
+					<Platform value="Win32">True</Platform>
+				</Platforms>
+				<UnitTesting>
+					<TestFramework>DUnit / Delphi Win32</TestFramework>
+					<TestRunner>GUI</TestRunner>
+					<SourceProjectName>C:\Code\NickDemoCode\DependencyInjection\Intro\StartingOut\StartingOut.dproj</SourceProjectName>
+					<TestProjectName/>
+				</UnitTesting>
+			</BorlandProject>
+			<ProjectFileVersion>12</ProjectFileVersion>
+		</ProjectExtensions>
+		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
+		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+	</Project>

DependencyInjection/Intro/CustomConstructor/Test/FieldInjectionTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/IsolateInterfaceTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/MovingToInterfacesTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/StartingOutTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/TestuOrderEntry.pas

+unit TestuOrderEntry;
+{
+
+  Delphi DUnit Test Case
+  ----------------------
+  This unit contains a skeleton test case class generated by the Test Case Wizard.
+  Modify the generated code to correctly setup and call the methods from the unit 
+  being tested.
+
+}
+
+interface
+
+uses
+  TestFramework, uOrder, uOrderInterfaces;
+
+type
+  // Test methods for class TOrderEntry
+
+  TestTOrderEntry = class(TTestCase)
+  strict private
+    FOrderEntry: IOrderEntry;
+  public
+    procedure SetUp; override;
+    procedure TearDown; override;
+  published
+    procedure TestEnterOrderIntoDatabase;
+  end;
+
+implementation
+
+uses
+      uServiceLocator
+    ;
+
+procedure TestTOrderEntry.SetUp;
+begin
+  ServiceLocator.Build;
+  FOrderEntry := ServiceLocator.Resolve<IOrderEntry>;
+end;
+
+procedure TestTOrderEntry.TearDown;
+begin
+
+end;
+
+procedure TestTOrderEntry.TestEnterOrderIntoDatabase;
+var
+  aOrder: TOrder;
+begin
+  // TODO: Setup method call parameters
+  aOrder := TOrder.Create;
+  try
+    Check(FOrderEntry.EnterOrderIntoDatabase(aOrder));
+  finally
+    aOrder.Free;
+  end;
+  // TODO: Validate method results
+end;
+
+initialization
+  // Register any test cases with the test runner
+  RegisterTest(TestTOrderEntry.Suite);
+end.
+

DependencyInjection/Intro/CustomConstructor/Test/TestuOrderProcessor.pas

+unit TestuOrderProcessor;
+{
+
+  Delphi DUnit Test Case
+  ----------------------
+  This unit contains a skeleton test case class generated by the Test Case Wizard.
+  Modify the generated code to correctly setup and call the methods from the unit 
+  being tested.
+
+}
+
+interface
+
+uses
+  TestFramework, uOrder, uOrderInterfaces;
+
+type
+  // Test methods for class TOrderProcessor
+
+  TestTOrderProcessor = class(TTestCase)
+  strict private
+    FOrderProcessor: IOrderProcessor;
+  published
+    procedure TestProcessOrder;
+  end;
+
+implementation
+
+uses
+  uOrderMocks,
+  uOrderProcessor,
+  uServiceLocator;
+
+procedure TestTOrderProcessor.TestProcessOrder;
+var
+  aOrder: TOrder;
+begin
+  ServiceLocator.Build;
+  // TODO: Setup method call parameters
+  FOrderProcessor := ServiceLocator.Resolve<IOrderProcessor>;//TOrderProcessor.Create;//(ServiceLocator.Resolve<IOrderValidator>, ServiceLocator.Resolve<IOrderEntry>);
+  aOrder := TOrder.Create;
+  try
+    Check(FOrderProcessor.ProcessOrder(aOrder));
+  finally
+    aOrder.Free;
+  end;
+  // TODO: Validate method results
+end;
+
+initialization
+  // Register any test cases with the test runner
+  RegisterTest(TestTOrderProcessor.Suite);
+end.
+

DependencyInjection/Intro/CustomConstructor/Test/TestuOrderValidator.pas

+unit TestuOrderValidator;
+{
+
+  Delphi DUnit Test Case
+  ----------------------
+  This unit contains a skeleton test case class generated by the Test Case Wizard.
+  Modify the generated code to correctly setup and call the methods from the unit 
+  being tested.
+
+}
+
+interface
+
+uses
+  TestFramework, uOrder, uOrderInterfaces;
+
+type
+  // Test methods for class TOrderValidator
+
+  TestTOrderValidator = class(TTestCase)
+  strict private
+    FOrderValidator: IOrderValidator;
+  public
+    procedure SetUp; override;
+    procedure TearDown; override;
+  published
+    procedure TestValidateOrder;
+  end;
+
+implementation
+
+uses
+      uServiceLocator
+    ;
+
+procedure TestTOrderValidator.SetUp;
+begin
+  ServiceLocator.Build;
+  FOrderValidator := ServiceLocator.Resolve<IOrderValidator>;
+end;
+
+procedure TestTOrderValidator.TearDown;
+begin
+
+end;
+
+procedure TestTOrderValidator.TestValidateOrder;
+var
+  ReturnValue: Boolean;
+  aOrder: TOrder;
+begin
+  // TODO: Setup method call parameters  \
+  aOrder := TOrder.Create;
+  try
+    ReturnValue := FOrderValidator.ValidateOrder(aOrder);
+    Check(ReturnValue);
+  finally
+    aOrder.Free;
+  end;
+  // TODO: Validate method results
+end;
+
+initialization
+  // Register any test cases with the test runner
+  RegisterTest(TestTOrderValidator.Suite);
+end.
+

DependencyInjection/Intro/CustomConstructor/Test/UseContainerTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/UseMocksTests.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/Test/Win32/Debug/dunit.ini

+[GUITestRunner Config]
+AutoSave=1
+Left=200
+Top=200
+Width=1087
+Height=504
+Maximized=0
+UseRegistry=0
+ResultsPanel.Height=174
+ErrorMessage.Height=75
+ErrorMessage.Visible=1
+FailureList.ColumnWidth[0]=120
+FailureList.ColumnWidth[1]=344
+FailureList.ColumnWidth[2]=200
+FailureList.ColumnWidth[3]=395
+HideTestNodesOnOpen=0
+BreakOnFailures=0
+FailOnNoChecksExecuted=0
+FailOnMemoryLeaked=0
+IgnoreSetUpTearDownLeaks=0
+ReportMemoryLeakTypes=0
+SelectTestedNode=1
+WarnOnFailTestOverride=0
+PopupX=350
+PopupY=30
+

DependencyInjection/Intro/CustomConstructor/Test/uOrderMocks.pas

+unit uOrderMocks;
+
+interface
+
+
+implementation
+
+uses
+      uServiceLocator
+    , uOrder
+    , uOrderInterfaces
+    ;
+
+
+type
+  TMockOrderEntry = class(TInterfacedObject, IOrderEntry)
+    function EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
+  end;
+
+  TMockOrderValidator = class(TInterfacedObject, IOrderValidator)
+    function ValidateOrder(aOrder: TOrder): Boolean;
+  end;
+
+{ TMockOrderEntry }
+
+function TMockOrderEntry.EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
+begin
+  Result := True;
+end;
+
+{ TMockOrderValidator }
+
+function TMockOrderValidator.ValidateOrder(aOrder: TOrder): Boolean;
+begin
+  Result := True;
+end;
+
+initialization
+  ServiceLocator.RegisterComponent<TMockOrderEntry>.Implements<IOrderEntry>;
+  ServiceLocator.RegisterComponent<TMockOrderValidator>.Implements<IOrderValidator>;
+
+end.

DependencyInjection/Intro/CustomConstructor/UseContainer.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/UseMocks.res

Binary file added.

DependencyInjection/Intro/CustomConstructor/uDoOrderProcessing.pas

+unit uDoOrderProcessing;
+
+interface
+
+procedure DoOrderProcessing;
+
+implementation
+
+uses
+        uOrder
+      , uServiceLocator
+      , uOrderInterfaces
+      , uOrderValidator
+      , uOrderEntry
+      , uOrderProcessor
+      ;
+
+procedure DoOrderProcessing;
+var
+  Order: TOrder;
+  OrderProcessor: IOrderProcessor;
+begin
+  ServiceLocator.Build;
+  Order := TOrder.Create;
+  try
+    OrderProcessor := ServiceLocator.Resolve<IOrderProcessor>;
+    if OrderProcessor.ProcessOrder(Order) then
+    begin
+      WriteLn('Order successfully processed....');
+    end;
+  finally
+    Order.Free;
+  end;
+end;
+
+end.

DependencyInjection/Intro/CustomConstructor/uOrder.pas

+unit uOrder;
+
+interface
+
+type
+  TOrder = class
+
+  end;
+
+implementation
+
+end.

DependencyInjection/Intro/CustomConstructor/uOrderEntry.pas

+unit uOrderEntry;
+
+interface
+
+implementation
+
+uses
+    uOrder, uOrderInterfaces, uServiceLocator;
+
+type
+
+  TOrderEntry = class(TInterfacedObject, IOrderEntry)
+    function EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
+  end;
+
+{ TOrderEntry }
+
+function TOrderEntry.EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
+begin
+  Result := aOrder <> nil;
+  {$IFDEF CONSOLEAPP}
+    WriteLn('Entering order into the database....');
+  {$ENDIF}
+end;
+
+initialization
+  ServiceLocator.RegisterComponent<TOrderEntry>.Implements<IOrderEntry>('OEProd');
+
+end.

DependencyInjection/Intro/CustomConstructor/uOrderInterfaces.pas

+unit uOrderInterfaces;
+
+interface
+
+uses
+     uOrder;
+
+type
+  IOrderValidator = interface
+  ['{6D0F52B4-A96F-4C96-97A4-DE45324FDE1B}']
+    function ValidateOrder(aOrder: TOrder): Boolean;
+  end;
+
+  IOrderEntry = interface
+  ['{8D272909-3324-4849-A128-C85E249520CD}']
+    function EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
+  end;
+
+  IOrderProcessor = interface
+  ['{978361F2-65F0-49F7-A00C-964C05683682}']
+    function ProcessOrder(aOrder: TOrder): Boolean;
+  end;
+
+implementation
+
+end.

DependencyInjection/Intro/CustomConstructor/uOrderProcessor.pas

+unit uOrderProcessor;
+
+interface
+
+implementation
+
+uses
+     uOrder, uOrderInterfaces, uServiceLocator;
+
+type
+  TOrderProcessor = class(TInterfacedObject, IOrderProcessor)
+  private
+    [Injection]
+    FOrderValidator: IOrderValidator;
+    [Injection]
+    FOrderEntry: IOrderEntry;
+  public
+    constructor Create(aOrderValidator: IOrderValidator; aOrderEntry: IOrderEntry);
+    function ProcessOrder(aOrder: TOrder): Boolean;
+  end;
+
+
+{ TOrderProcessor }
+
+constructor TOrderProcessor.Create(aOrderValidator: IOrderValidator; aOrderEntry: IOrderEntry);
+begin
+  FOrderValidator := aOrderValidator;
+  FOrderEntry := aOrderEntry;
+end;
+
+function TOrderProcessor.ProcessOrder(aOrder: TOrder): Boolean;
+var
+  OrderIsValid: Boolean;
+begin
+  Result := False;
+  OrderIsValid := FOrderValidator.ValidateOrder(aOrder);
+  if OrderIsValid then
+  begin
+    Result := FOrderEntry.EnterOrderIntoDatabase(aOrder);
+  end;
+
+  {$IFDEF CONSOLEAPP}
+    WriteLn('Order has been processed....');
+  {$ENDIF}
+end;
+
+initialization
+  ServiceLocator.RegisterComponent<TOrderProcessor>.Implements<IOrderProcessor>.DelegateTo(
+    function: TOrderProcessor
+    begin
+      Result := TOrderProcessor.Create(ServiceLocator.Resolve<IOrderValidator>, ServiceLocator.Resolve<IOrderEntry>);
+    end
+  );
+
+end.

DependencyInjection/Intro/CustomConstructor/uOrderValidator.pas

+unit uOrderValidator;
+
+interface
+
+implementation
+
+uses
+     uOrder
+   , uOrderInterfaces
+   , uServiceLocator;
+
+type
+
+  TOrderValidator = class(TInterfacedObject, IOrderValidator)
+    function ValidateOrder(aOrder: TOrder): Boolean;
+  end;
+
+
+{ TOrderValidator }
+
+function TOrderValidator.ValidateOrder(aOrder: TOrder): Boolean;
+begin
+  Result := aOrder <> nil;
+  {$IFDEF CONSOLEAPP}
+    WriteLn('Validating Order....');
+  {$ENDIF}
+end;
+
+initialization
+  ServiceLocator.RegisterComponent<TOrderValidator>.Implements<IOrderValidator>('OVProd');
+
+end.

DependencyInjection/Intro/CustomConstructor/uServiceLocator.pas

+unit uServiceLocator;
+
+interface
+
+uses
+        Spring.DI
+      ;
+
+  function ServiceLocator: TContainer;
+
+implementation
+
+var
+  FContainer: TContainer;
+
+function ServiceLocator: TContainer;
+begin
+  if FContainer = nil then
+  begin
+    FContainer := TContainer.Create;
+  end;
+  Result := FContainer;
+end;
+
+
+end.

DependencyInjection/Intro/FieldInjection/ConstructorInjection.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/CustomConstructor.dpr

-program CustomConstructor;
-
-{$APPTYPE CONSOLE}
-
-{$R *.res}
-
-uses
-  System.SysUtils,
-  uDoOrderProcessing in 'uDoOrderProcessing.pas';
-
-begin
-  try
-    DoOrderProcessing;
-    ReadLn;
-  except
-    on E: Exception do
-      Writeln(E.ClassName, ': ', E.Message);
-  end;
-end.

DependencyInjection/Intro/FieldInjection/CustomConstructor.dproj

-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-		<PropertyGroup>
-			<ProjectGuid>{9B0D5783-03AD-47F5-8337-35E51637D9AD}</ProjectGuid>
-			<ProjectVersion>13.4</ProjectVersion>
-			<FrameworkType>None</FrameworkType>
-			<MainSource>CustomConstructor.dpr</MainSource>
-			<Base>True</Base>
-			<Config Condition="'$(Config)'==''">Debug</Config>
-			<Platform Condition="'$(Platform)'==''">Win32</Platform>
-			<TargetedPlatforms>1</TargetedPlatforms>
-			<AppType>Console</AppType>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
-			<Base_Win64>true</Base_Win64>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
-			<Base_Win32>true</Base_Win32>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
-			<Cfg_1>true</Cfg_1>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
-			<Cfg_1_Win32>true</Cfg_1_Win32>
-			<CfgParent>Cfg_1</CfgParent>
-			<Cfg_1>true</Cfg_1>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
-			<Cfg_2>true</Cfg_2>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base)'!=''">
-			<DCC_UsePackage>bindcompfmx;fmx;rtl;dbrtl;IndySystem;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;DataSnapCommon;DataSnapClient;DataSnapServer;DataSnapProviderClient;xmlrtl;ibxpress;DbxCommonDriver;IndyProtocols;DBXMySQLDriver;dbxcds;bindengine;FMXTee;soaprtl;DBXOracleDriver;dsnap;DBXInformixDriver;IndyCore;fmxase;CloudService;FmxTeeUI;DBXFirebirdDriver;inet;fmxobj;inetdbxpress;DBXSybaseASADriver;fmxdae;dbexpress;DataSnapIndy10ServerTransport;IPIndyImpl;$(DCC_UsePackage)</DCC_UsePackage>
-			<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
-			<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
-			<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-			<DCC_E>false</DCC_E>
-			<DCC_N>false</DCC_N>
-			<DCC_S>false</DCC_S>
-			<DCC_F>false</DCC_F>
-			<DCC_K>false</DCC_K>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base_Win64)'!=''">
-			<DCC_UsePackage>TeeDB;vclib;Tee;DBXOdbcDriver;DBXSybaseASEDriver;vclimg;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;websnap;vclribbon;VclSmp;vcl;DataSnapConnectors;DBXMSSQLDriver;dsnapcon;vclx;webdsnap;adortl;$(DCC_UsePackage)</DCC_UsePackage>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base_Win32)'!=''">
-			<DCC_UsePackage>vcldbx;frx16;TeeDB;Rave100VCL;vclib;Tee;inetdbbde;DBXOdbcDriver;svnui;DBXSybaseASEDriver;vclimg;frxDB16;intrawebdb_120_160;fmi;fs16;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;Intraweb_120_160;DBXDb2Driver;websnap;vclribbon;frxe16;VclSmp;fsDB16;vcl;DataSnapConnectors;DBXMSSQLDriver;CodeSiteExpressPkg;dsnapcon;vclx;webdsnap;svn;bdertl;adortl;$(DCC_UsePackage)</DCC_UsePackage>
-			<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
-			<VerInfo_Locale>1033</VerInfo_Locale>
-			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_UnitSearchPath>$(SPRINGSOURCE)\Core\DI;$(SPRINGSOURCE)\System;$(SPRINGSOURCE)\System\Collections;$(SPRINGSOURCE)\System\Reflection;$(SPRINGSOURCE)\System\Utils;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<Manifest_File>None</Manifest_File>
-			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
-			<VerInfo_Locale>1033</VerInfo_Locale>
-			<DCC_Define>DEBUG;CONSOLEAPP;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-			<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
-			<DCC_RemoteDebug>true</DCC_RemoteDebug>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
-			<DCC_RemoteDebug>false</DCC_RemoteDebug>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
-			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
-			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
-			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
-			<DCC_DebugInformation>false</DCC_DebugInformation>
-		</PropertyGroup>
-		<ItemGroup>
-			<DelphiCompile Include="$(MainSource)">
-				<MainSource>MainSource</MainSource>
-			</DelphiCompile>
-			<DCCReference Include="uDoOrderProcessing.pas"/>
-			<BuildConfiguration Include="Release">
-				<Key>Cfg_2</Key>
-				<CfgParent>Base</CfgParent>
-			</BuildConfiguration>
-			<BuildConfiguration Include="Base">
-				<Key>Base</Key>
-			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
-				<Key>Cfg_1</Key>
-				<CfgParent>Base</CfgParent>
-			</BuildConfiguration>
-		</ItemGroup>
-		<ProjectExtensions>
-			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
-			<BorlandProject>
-				<Delphi.Personality>
-					<VersionInfo>
-						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
-						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
-						<VersionInfo Name="MajorVer">1</VersionInfo>
-						<VersionInfo Name="MinorVer">0</VersionInfo>
-						<VersionInfo Name="Release">0</VersionInfo>
-						<VersionInfo Name="Build">0</VersionInfo>
-						<VersionInfo Name="Debug">False</VersionInfo>
-						<VersionInfo Name="PreRelease">False</VersionInfo>
-						<VersionInfo Name="Special">False</VersionInfo>
-						<VersionInfo Name="Private">False</VersionInfo>
-						<VersionInfo Name="DLL">False</VersionInfo>
-						<VersionInfo Name="Locale">1033</VersionInfo>
-						<VersionInfo Name="CodePage">1252</VersionInfo>
-					</VersionInfo>
-					<VersionInfoKeys>
-						<VersionInfoKeys Name="CompanyName"/>
-						<VersionInfoKeys Name="FileDescription"/>
-						<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
-						<VersionInfoKeys Name="InternalName"/>
-						<VersionInfoKeys Name="LegalCopyright"/>
-						<VersionInfoKeys Name="LegalTrademarks"/>
-						<VersionInfoKeys Name="OriginalFilename"/>
-						<VersionInfoKeys Name="ProductName"/>
-						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
-						<VersionInfoKeys Name="Comments"/>
-					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">CustomConstructor.dpr</Source>
-					</Source>
-					<Excluded_Packages>
-						<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-						<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
-					</Excluded_Packages>
-				</Delphi.Personality>
-				<Deployment/>
-				<Platforms>
-					<Platform value="Win64">False</Platform>
-					<Platform value="OSX32">False</Platform>
-					<Platform value="Win32">True</Platform>
-				</Platforms>
-				<UnitTesting>
-					<TestProjectName>C:\Code\NickDemoCode\DependencyInjection\Intro\StartingOut\Test\StartingOutTests.dproj</TestProjectName>
-				</UnitTesting>
-			</BorlandProject>
-			<ProjectFileVersion>12</ProjectFileVersion>
-		</ProjectExtensions>
-		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
-		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
-	</Project>

DependencyInjection/Intro/FieldInjection/FieldInjection.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/IsolateInterfaces.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/MovingToInterfaces.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/StartingOut.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/ConstructorInjectionTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/CustomConstructorTests.dpr

-program CustomConstructorTests;
-{
-
-  Delphi DUnit Test Project
-  -------------------------
-  This project contains the DUnit test framework and the GUI/Console test runners.
-  Add "CONSOLE_TESTRUNNER" to the conditional defines entry in the project options
-  to use the console test runner.  Otherwise the GUI test runner will be used by
-  default.
-
-}
-
-{$IFDEF CONSOLE_TESTRUNNER}
-{$APPTYPE CONSOLE}
-{$ENDIF}
-
-uses
-  Forms,
-  TestFramework,
-  GUITestRunner,
-  TextTestRunner,
-  TestuOrderEntry in 'TestuOrderEntry.pas',
-  TestuOrderValidator in 'TestuOrderValidator.pas',
-  uOrder in '..\uOrder.pas',
-  uOrderMocks in 'uOrderMocks.pas',
-  TestuOrderProcessor in 'TestuOrderProcessor.pas',
-  uOrderProcessor in '..\uOrderProcessor.pas',
-  uOrderInterfaces in '..\uOrderInterfaces.pas',
-  uServiceLocator in '..\uServiceLocator.pas';
-
-{R *.RES}
-
-begin
-  Application.Initialize;
-  if IsConsole then
-    with TextTestRunner.RunRegisteredTests do
-      Free
-  else
-    GUITestRunner.RunRegisteredTests;
-end.
-

DependencyInjection/Intro/FieldInjection/Test/CustomConstructorTests.dproj

-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-		<PropertyGroup>
-			<ProjectGuid>{D4570AAA-4872-45EF-BE39-917A72A52F17}</ProjectGuid>
-			<ProjectVersion>13.4</ProjectVersion>
-			<FrameworkType>VCL</FrameworkType>
-			<Base>True</Base>
-			<Config Condition="'$(Config)'==''">Debug</Config>
-			<Platform Condition="'$(Platform)'==''">Win32</Platform>
-			<TargetedPlatforms>1</TargetedPlatforms>
-			<AppType>Application</AppType>
-			<MainSource>CustomConstructorTests.dpr</MainSource>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
-			<Base_Win64>true</Base_Win64>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
-			<Base_Win32>true</Base_Win32>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
-			<Cfg_1>true</Cfg_1>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
-			<Cfg_1_Win32>true</Cfg_1_Win32>
-			<CfgParent>Cfg_1</CfgParent>
-			<Cfg_1>true</Cfg_1>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
-			<Cfg_2>true</Cfg_2>
-			<CfgParent>Base</CfgParent>
-			<Base>true</Base>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base)'!=''">
-			<DCC_UnitSearchPath>$(BDS)\Source\DUnit\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UsePackage>bindcompfmx;fmx;rtl;dbrtl;IndySystem;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;DataSnapCommon;DataSnapClient;DataSnapServer;DataSnapProviderClient;xmlrtl;ibxpress;DbxCommonDriver;IndyProtocols;DBXMySQLDriver;dbxcds;bindengine;FMXTee;soaprtl;DBXOracleDriver;dsnap;DBXInformixDriver;IndyCore;fmxase;CloudService;FmxTeeUI;DBXFirebirdDriver;inet;fmxobj;inetdbxpress;DBXSybaseASADriver;fmxdae;dbexpress;DataSnapIndy10ServerTransport;IPIndyImpl;$(DCC_UsePackage)</DCC_UsePackage>
-			<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
-			<DCC_Define>_CONSOLE_TESTRUNNER;$(DCC_Define)</DCC_Define>
-			<DCC_DcuOutput>.</DCC_DcuOutput>
-			<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-			<DCC_E>false</DCC_E>
-			<DCC_N>false</DCC_N>
-			<DCC_S>false</DCC_S>
-			<DCC_F>false</DCC_F>
-			<DCC_K>false</DCC_K>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base_Win64)'!=''">
-			<DCC_UsePackage>TeeDB;vclib;Tee;DBXOdbcDriver;DBXSybaseASEDriver;vclimg;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;websnap;vclribbon;VclSmp;vcl;DataSnapConnectors;DBXMSSQLDriver;dsnapcon;vclx;webdsnap;adortl;$(DCC_UsePackage)</DCC_UsePackage>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Base_Win32)'!=''">
-			<DCC_UsePackage>vcldbx;frx16;TeeDB;Rave100VCL;vclib;Tee;inetdbbde;DBXOdbcDriver;svnui;DBXSybaseASEDriver;vclimg;frxDB16;intrawebdb_120_160;fmi;fs16;TeeUI;vclactnband;vcldb;vcldsnap;bindcompvcl;vclie;vcltouch;Intraweb_120_160;DBXDb2Driver;websnap;vclribbon;frxe16;VclSmp;fsDB16;vcl;DataSnapConnectors;DBXMSSQLDriver;CodeSiteExpressPkg;dsnapcon;vclx;webdsnap;svn;bdertl;adortl;$(DCC_UsePackage)</DCC_UsePackage>
-			<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-			<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
-			<VerInfo_Locale>1033</VerInfo_Locale>
-			<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
-			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<Manifest_File>None</Manifest_File>
-			<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
-			<DCC_UnitSearchPath>$(SPRINGSOURCE)\Core\DI;$(SPRINGSOURCE)\System;$(SPRINGSOURCE)\System\Collections;$(SPRINGSOURCE)\System\Reflection;$(SPRINGSOURCE)\System\Utils;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<VerInfo_Locale>1033</VerInfo_Locale>
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-			<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
-			<DCC_RemoteDebug>true</DCC_RemoteDebug>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
-			<DCC_RemoteDebug>false</DCC_RemoteDebug>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
-			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
-			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
-			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
-			<DCC_DebugInformation>false</DCC_DebugInformation>
-		</PropertyGroup>
-		<ItemGroup>
-			<DelphiCompile Include="$(MainSource)">
-				<MainSource>MainSource</MainSource>
-			</DelphiCompile>
-			<DCCReference Include="TestuOrderEntry.pas"/>
-			<DCCReference Include="TestuOrderValidator.pas"/>
-			<DCCReference Include="..\uOrder.pas"/>
-			<DCCReference Include="uOrderMocks.pas"/>
-			<DCCReference Include="TestuOrderProcessor.pas"/>
-			<DCCReference Include="..\uOrderProcessor.pas"/>
-			<DCCReference Include="..\uOrderInterfaces.pas"/>
-			<DCCReference Include="..\uServiceLocator.pas"/>
-			<BuildConfiguration Include="Release">
-				<Key>Cfg_2</Key>
-				<CfgParent>Base</CfgParent>
-			</BuildConfiguration>
-			<BuildConfiguration Include="Base">
-				<Key>Base</Key>
-			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
-				<Key>Cfg_1</Key>
-				<CfgParent>Base</CfgParent>
-			</BuildConfiguration>
-		</ItemGroup>
-		<ProjectExtensions>
-			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
-			<BorlandProject>
-				<Delphi.Personality>
-					<VersionInfo>
-						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
-						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
-						<VersionInfo Name="MajorVer">1</VersionInfo>
-						<VersionInfo Name="MinorVer">0</VersionInfo>
-						<VersionInfo Name="Release">0</VersionInfo>
-						<VersionInfo Name="Build">0</VersionInfo>
-						<VersionInfo Name="Debug">False</VersionInfo>
-						<VersionInfo Name="PreRelease">False</VersionInfo>
-						<VersionInfo Name="Special">False</VersionInfo>
-						<VersionInfo Name="Private">False</VersionInfo>
-						<VersionInfo Name="DLL">False</VersionInfo>
-						<VersionInfo Name="Locale">1033</VersionInfo>
-						<VersionInfo Name="CodePage">1252</VersionInfo>
-					</VersionInfo>
-					<VersionInfoKeys>
-						<VersionInfoKeys Name="CompanyName"/>
-						<VersionInfoKeys Name="FileDescription"/>
-						<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
-						<VersionInfoKeys Name="InternalName"/>
-						<VersionInfoKeys Name="LegalCopyright"/>
-						<VersionInfoKeys Name="LegalTrademarks"/>
-						<VersionInfoKeys Name="OriginalFilename"/>
-						<VersionInfoKeys Name="ProductName"/>
-						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
-						<VersionInfoKeys Name="Comments"/>
-					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">CustomConstructorTests.dpr</Source>
-					</Source>
-					<Excluded_Packages>
-						<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-						<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
-					</Excluded_Packages>
-				</Delphi.Personality>
-				<Deployment/>
-				<Platforms>
-					<Platform value="Win64">False</Platform>
-					<Platform value="OSX32">False</Platform>
-					<Platform value="Win32">True</Platform>
-				</Platforms>
-				<UnitTesting>
-					<TestFramework>DUnit / Delphi Win32</TestFramework>
-					<TestRunner>GUI</TestRunner>
-					<SourceProjectName>C:\Code\NickDemoCode\DependencyInjection\Intro\StartingOut\StartingOut.dproj</SourceProjectName>
-					<TestProjectName/>
-				</UnitTesting>
-			</BorlandProject>
-			<ProjectFileVersion>12</ProjectFileVersion>
-		</ProjectExtensions>
-		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
-		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
-	</Project>

DependencyInjection/Intro/FieldInjection/Test/FieldInjectionTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/IsolateInterfaceTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/MovingToInterfacesTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/StartingOutTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/TestuOrderEntry.pas

-unit TestuOrderEntry;
-{
-
-  Delphi DUnit Test Case
-  ----------------------
-  This unit contains a skeleton test case class generated by the Test Case Wizard.
-  Modify the generated code to correctly setup and call the methods from the unit 
-  being tested.
-
-}
-
-interface
-
-uses
-  TestFramework, uOrder, uOrderInterfaces;
-
-type
-  // Test methods for class TOrderEntry
-
-  TestTOrderEntry = class(TTestCase)
-  strict private
-    FOrderEntry: IOrderEntry;
-  public
-    procedure SetUp; override;
-    procedure TearDown; override;
-  published
-    procedure TestEnterOrderIntoDatabase;
-  end;
-
-implementation
-
-uses
-      uServiceLocator
-    ;
-
-procedure TestTOrderEntry.SetUp;
-begin
-  ServiceLocator.Build;
-  FOrderEntry := ServiceLocator.Resolve<IOrderEntry>;
-end;
-
-procedure TestTOrderEntry.TearDown;
-begin
-
-end;
-
-procedure TestTOrderEntry.TestEnterOrderIntoDatabase;
-var
-  aOrder: TOrder;
-begin
-  // TODO: Setup method call parameters
-  aOrder := TOrder.Create;
-  try
-    Check(FOrderEntry.EnterOrderIntoDatabase(aOrder));
-  finally
-    aOrder.Free;
-  end;
-  // TODO: Validate method results
-end;
-
-initialization
-  // Register any test cases with the test runner
-  RegisterTest(TestTOrderEntry.Suite);
-end.
-

DependencyInjection/Intro/FieldInjection/Test/TestuOrderProcessor.pas

-unit TestuOrderProcessor;
-{
-
-  Delphi DUnit Test Case
-  ----------------------
-  This unit contains a skeleton test case class generated by the Test Case Wizard.
-  Modify the generated code to correctly setup and call the methods from the unit 
-  being tested.
-
-}
-
-interface
-
-uses
-  TestFramework, uOrder, uOrderInterfaces;
-
-type
-  // Test methods for class TOrderProcessor
-
-  TestTOrderProcessor = class(TTestCase)
-  strict private
-    FOrderProcessor: IOrderProcessor;
-  published
-    procedure TestProcessOrder;
-  end;
-
-implementation
-
-uses
-  uOrderMocks,
-  uOrderProcessor,
-  uServiceLocator;
-
-procedure TestTOrderProcessor.TestProcessOrder;
-var
-  aOrder: TOrder;
-begin
-  ServiceLocator.Build;
-  // TODO: Setup method call parameters
-  FOrderProcessor := ServiceLocator.Resolve<IOrderProcessor>;//TOrderProcessor.Create;//(ServiceLocator.Resolve<IOrderValidator>, ServiceLocator.Resolve<IOrderEntry>);
-  aOrder := TOrder.Create;
-  try
-    Check(FOrderProcessor.ProcessOrder(aOrder));
-  finally
-    aOrder.Free;
-  end;
-  // TODO: Validate method results
-end;
-
-initialization
-  // Register any test cases with the test runner
-  RegisterTest(TestTOrderProcessor.Suite);
-end.
-

DependencyInjection/Intro/FieldInjection/Test/TestuOrderValidator.pas

-unit TestuOrderValidator;
-{
-
-  Delphi DUnit Test Case
-  ----------------------
-  This unit contains a skeleton test case class generated by the Test Case Wizard.
-  Modify the generated code to correctly setup and call the methods from the unit 
-  being tested.
-
-}
-
-interface
-
-uses
-  TestFramework, uOrder, uOrderInterfaces;
-
-type
-  // Test methods for class TOrderValidator
-
-  TestTOrderValidator = class(TTestCase)
-  strict private
-    FOrderValidator: IOrderValidator;
-  public
-    procedure SetUp; override;
-    procedure TearDown; override;
-  published
-    procedure TestValidateOrder;
-  end;
-
-implementation
-
-uses
-      uServiceLocator
-    ;
-
-procedure TestTOrderValidator.SetUp;
-begin
-  ServiceLocator.Build;
-  FOrderValidator := ServiceLocator.Resolve<IOrderValidator>;
-end;
-
-procedure TestTOrderValidator.TearDown;
-begin
-
-end;
-
-procedure TestTOrderValidator.TestValidateOrder;
-var
-  ReturnValue: Boolean;
-  aOrder: TOrder;
-begin
-  // TODO: Setup method call parameters  \
-  aOrder := TOrder.Create;
-  try
-    ReturnValue := FOrderValidator.ValidateOrder(aOrder);
-    Check(ReturnValue);
-  finally
-    aOrder.Free;
-  end;
-  // TODO: Validate method results
-end;
-
-initialization
-  // Register any test cases with the test runner
-  RegisterTest(TestTOrderValidator.Suite);
-end.
-

DependencyInjection/Intro/FieldInjection/Test/UseContainerTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/UseMocksTests.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/Test/Win32/Debug/dunit.ini

-[GUITestRunner Config]
-AutoSave=1
-Left=200
-Top=200
-Width=1087
-Height=504
-Maximized=0
-UseRegistry=0
-ResultsPanel.Height=174
-ErrorMessage.Height=75
-ErrorMessage.Visible=1
-FailureList.ColumnWidth[0]=120
-FailureList.ColumnWidth[1]=344
-FailureList.ColumnWidth[2]=200
-FailureList.ColumnWidth[3]=395
-HideTestNodesOnOpen=0
-BreakOnFailures=0
-FailOnNoChecksExecuted=0
-FailOnMemoryLeaked=0
-IgnoreSetUpTearDownLeaks=0
-ReportMemoryLeakTypes=0
-SelectTestedNode=1
-WarnOnFailTestOverride=0
-PopupX=350
-PopupY=30
-

DependencyInjection/Intro/FieldInjection/Test/uOrderMocks.pas

-unit uOrderMocks;
-
-interface
-
-
-implementation
-
-uses
-      uServiceLocator
-    , uOrder
-    , uOrderInterfaces
-    ;
-
-
-type
-  TMockOrderEntry = class(TInterfacedObject, IOrderEntry)
-    function EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
-  end;
-
-  TMockOrderValidator = class(TInterfacedObject, IOrderValidator)
-    function ValidateOrder(aOrder: TOrder): Boolean;
-  end;
-
-{ TMockOrderEntry }
-
-function TMockOrderEntry.EnterOrderIntoDatabase(aOrder: TOrder): Boolean;
-begin
-  Result := True;
-end;
-
-{ TMockOrderValidator }
-
-function TMockOrderValidator.ValidateOrder(aOrder: TOrder): Boolean;
-begin
-  Result := True;
-end;
-
-initialization
-  ServiceLocator.RegisterComponent<TMockOrderEntry>.Implements<IOrderEntry>;
-  ServiceLocator.RegisterComponent<TMockOrderValidator>.Implements<IOrderValidator>;
-
-end.

DependencyInjection/Intro/FieldInjection/UseContainer.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/UseMocks.res

Binary file removed.

DependencyInjection/Intro/FieldInjection/uDoOrderProcessing.pas

-unit uDoOrderProcessing;
-
-interface
-
-procedure DoOrderProcessing;
-
-implementation
-
-uses
-        uOrder
-      , uServiceLocator
-      , uOrderInterfaces
-      , uOrderValidator
-      , uOrderEntry
-      , uOrderProcessor
-      ;
-
-procedure DoOrderProcessing;
-var
-  Order: TOrder;
-  OrderProcessor: IOrderProcessor;
-begin
-  ServiceLocator.Build;
-  Order := TOrder.Create;
-  try
-    OrderProcessor := ServiceLocator.Resolve<IOrderProcessor>;
-    if OrderProcessor.ProcessOrder(Order) then
-    begin
-      WriteLn('Order successfully processed....');
-    end;
-  finally
-    Order.Free;
-  end;
-end;
-
-end.

DependencyInjection/Intro/FieldInjection/uOrder.pas

-unit uOrder;
-
-interface
-
-type
-  TOrder = class