diff options
Diffstat (limited to 'src/app/Cmpp298.Assignment3.Domain')
4 files changed, 97 insertions, 0 deletions
diff --git a/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs b/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs new file mode 100644 index 0000000..d7bfe18 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Domain/AmountEntrySpecification.cs @@ -0,0 +1,9 @@ +using System.Text.RegularExpressions;
+
+namespace Cmpp298.Assignment3.Domain {
+ public class AmountEntrySpecification : ISpecification< string > {
+ public bool IsSatisfiedBy( string input ) {
+ return Regex.IsMatch( input, @"(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)" );
+ }
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Domain/Cmpp298.Assignment3.Domain.csproj b/src/app/Cmpp298.Assignment3.Domain/Cmpp298.Assignment3.Domain.csproj new file mode 100644 index 0000000..35e09f9 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Domain/Cmpp298.Assignment3.Domain.csproj @@ -0,0 +1,48 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C11B2649-751A-4F49-B28D-AB36A8213674}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Cmpp298.Assignment3.Domain</RootNamespace>
+ <AssemblyName>Cmpp298.Assignment3.Domain</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AmountEntrySpecification.cs" />
+ <Compile Include="ISpecification.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Domain/ISpecification.cs b/src/app/Cmpp298.Assignment3.Domain/ISpecification.cs new file mode 100644 index 0000000..3de13bd --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Domain/ISpecification.cs @@ -0,0 +1,5 @@ +namespace Cmpp298.Assignment3.Domain {
+ internal interface ISpecification< T > {
+ bool IsSatisfiedBy( T item );
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Domain/Properties/AssemblyInfo.cs b/src/app/Cmpp298.Assignment3.Domain/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a28526c --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Domain/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("Cmpp298.Assignment3.Domain")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Cmpp298.Assignment3.Domain")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[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("16058903-5893-4699-8a08-4bfb99649482")]
+
+// 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")]
|
