Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
19f1827
port to .NET 4.0
Shamar Jul 31, 2012
acce77a
added environment variables to profile nunit in 4.0 with ncover 1.5.8…
bards-release-manager Aug 1, 2012
e546b98
Merge pull request #9 from Shamar/devel
Shamar Aug 1, 2012
99269e0
fix build on mono with 4.0 profile
Shamar Aug 2, 2012
f43fe62
initial configuration for API documentation
Shamar Aug 3, 2012
ee75a5a
increased documentation
Shamar Aug 3, 2012
bb06137
modified Epic.API.shfbproj
Shamar Aug 6, 2012
30434bd
Merge branch 'sandcastle' of github.com:Shamar/Epic.NET into sandcastle
Shamar Aug 6, 2012
e8b6939
reduced size of SpecificationBase signature
Shamar Aug 6, 2012
4894ae9
improved SpecificationBase design
Shamar Aug 6, 2012
fbd0338
fix build and improved doc
Shamar Aug 6, 2012
e59debe
fix menu in website.xsl
Shamar Aug 6, 2012
580d5b2
completed sandcastle tuning
Shamar Aug 7, 2012
4644973
fixed some nant issues
Shamar Aug 7, 2012
de3d2ef
some more fix to continuous.build
Shamar Aug 7, 2012
2f6410a
Better logs into continuous.nant
Shamar Aug 8, 2012
2fbbaf9
Merge pull request #10 from Shamar/sandcastle
Shamar Aug 8, 2012
3cf7a2b
improved documentation
Shamar Aug 8, 2012
11f969d
improved documentation and get rid of some warnings
Shamar Aug 9, 2012
343583b
improved documentation
Shamar Aug 9, 2012
7422c3d
some more doc
Shamar Aug 10, 2012
09ec8f3
Merge branch 'devel' of https://github.com/Shamar/Epic.NET into devel
Shamar Aug 10, 2012
344fe6c
some more documentation
Shamar Aug 10, 2012
fba5125
improved doc
Shamar Aug 12, 2012
5eb1562
disabled <style> call in RunNUnit.include to calculate missing method…
Shamar Aug 12, 2012
1ffdfe0
completed documentation
Shamar Aug 12, 2012
e5b4932
removed the duplicated Selection class
Shamar Aug 12, 2012
9b6a023
typo
Shamar Aug 13, 2012
c499157
documented namespaces
Shamar Aug 13, 2012
35018d8
Treat Warning As Errors in all Epic's csproj
Shamar Aug 13, 2012
7d6cdd2
introduced in Documentation Epic.Prelude
Shamar Aug 13, 2012
766a573
removed a mono warning abut documentation
Shamar Aug 15, 2012
d26275e
added more info into manual for Epic.Prelude
Shamar Aug 15, 2012
2bed295
introduced manual generation in continuous.build
Shamar Aug 15, 2012
37e1e55
more on visitors
Shamar Aug 15, 2012
09c9273
updated xsl, css doc and continuous.build
Shamar Aug 16, 2012
2dbe724
fix typo
Shamar Aug 17, 2012
e5024af
Update website.xsl to fix script paths.
Shamar Aug 17, 2012
e41ef60
more info on Epic.Prelude
Shamar Aug 17, 2012
e19888f
small fixes to Epic.API documentation
Shamar Aug 17, 2012
fd8775d
update links in Epic.Core manual
Shamar Aug 17, 2012
e627ef6
Update Documentation/en-US/c10_epic-prelude.txt
Shamar Aug 18, 2012
49e5619
try to workaround the broken CI
Shamar Aug 18, 2012
de2e19a
Update Tools/NantScripts/Properties.include
Shamar Aug 18, 2012
caa7204
Added to Properties.include nunit2.path (to be removed)
Shamar Aug 18, 2012
f8710a5
Update Tools/NantScripts/RunNUnit.include
Shamar Aug 18, 2012
594f3bd
added VisitableExceptions
Shamar Aug 18, 2012
402f4d0
Merge branch 'devel' of github.com:bards/Epic.NET into devel
Shamar Aug 18, 2012
541cb59
Update Tools/NantScripts/RunNUnit.include
Shamar Aug 19, 2012
1155b02
Update Tools/NantScripts/Properties.include
Shamar Aug 20, 2012
b4071ee
Update Tools/NantScripts/RunNUnit.include
Shamar Aug 20, 2012
e4c1363
initial draft (to carefully verify the modified Epic.Query.Linq.UnitT…
Shamar Aug 22, 2012
d9e8fda
some more code to reflect upon...
Shamar Aug 22, 2012
76d2b7e
fix most tests (coverage still to complete) and removed ExpressionFor…
Shamar Aug 23, 2012
5c89373
fixed coverage
Shamar Aug 23, 2012
05b0c71
introduced EchoingVisitor and visitor results covariance
Shamar Aug 23, 2012
0789b4f
improved UnvisitableWrapper (to fulfill IVisitable implementations an…
Shamar Aug 23, 2012
dad9cec
improved visitor API and documentation
Shamar Aug 23, 2012
18a75c0
try to fix footnotes in manual
Shamar Aug 23, 2012
bbfd408
fix footnotes
Shamar Aug 24, 2012
8769a14
improved Challenge00's exceptions
Shamar Aug 25, 2012
a038c23
improved Challenge00's documentation
Shamar Aug 25, 2012
c495bf8
some more exceptions in DDDSample
Shamar Aug 25, 2012
2eb7bff
english exception message
Shamar Aug 26, 2012
a2cce01
fix documentation warnings on Mono
Shamar Aug 26, 2012
eefe914
covered EnglishExceptionsMessages
Shamar Aug 26, 2012
ec920e9
get rid of some warnings in mono
Shamar Aug 26, 2012
5480a88
improved API of CompositeVisitor<TResult>.VisitableBase to be more in…
Shamar Aug 26, 2012
6f0484d
fix build
Shamar Aug 26, 2012
7b01c88
fix tests path
Shamar Aug 26, 2012
57dbb47
fix coverage
Shamar Aug 26, 2012
b274c0d
fix coverage of DDDSample and moved EchoingVisitor in a Visitors name…
Shamar Aug 26, 2012
95560a4
Epic.Visitors namespace documented
Shamar Aug 26, 2012
57ec6d9
rename OfType in Variant
Shamar Aug 27, 2012
da88455
typo in documentation
Shamar Aug 27, 2012
3271abe
completed Epic.Prelude documentation
Shamar Aug 27, 2012
9cd004a
reduced ExpressionsInspector surface in favour of EchoingVisitor
Shamar Aug 27, 2012
46e393b
fix typos
Shamar Aug 27, 2012
795eb7a
fix more typo
Shamar Aug 27, 2012
4e17bd2
fix some doc
Shamar Aug 28, 2012
5e62cfd
completed coverage of UnvisitableExtensions
Shamar Aug 28, 2012
8f4fee2
improved doc
Shamar Aug 28, 2012
aefd8a3
improved doc again
Shamar Aug 28, 2012
d9dfdc2
fix to sample code in UnvisitableExtensions
Shamar Aug 28, 2012
9683b77
fix typo
Shamar Aug 28, 2012
1181438
little typos in doc
Shamar Aug 30, 2012
53983e9
another typo
Shamar Aug 30, 2012
54aa12c
no-cache for documentation
Shamar Sep 1, 2012
094beb4
merge
Amarillide Sep 2, 2012
a7e09ee
fixed some docs
Shamar Sep 3, 2012
567db47
Merge branch 'devel' of ../Epic-bards into devel
Shamar Sep 3, 2012
7debffd
fixed a subtle bug in Searchable and ISearch
Shamar Sep 7, 2012
071efe2
typo
Shamar Sep 7, 2012
0af695b
All expressions in Epic.Query derives Relational.AlgebraicExpression
Shamar Sep 13, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Thumbs.db
*.lib
*.sbr
*.sdf
*_bkp
ipch/
obj/
[Bb]in
Expand All @@ -45,3 +46,6 @@ _ReSharper*/
#Subversion files
.svn

Documentation/Epic.API.shfbproj_*


3 changes: 3 additions & 0 deletions 3rdParties/NUnit/nunit-console-x86.exe.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
</startup>

<runtime>
<!-- We need this so test exceptions don't crash NUnit -->
Expand Down
3 changes: 3 additions & 0 deletions 3rdParties/NUnit/nunit-console.exe.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
</startup>

<runtime>
<!-- We need this so test exceptions don't crash NUnit -->
Expand Down
7 changes: 6 additions & 1 deletion Challenges/Challenge00.DDDSample/All.nunit
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<NUnitProject>
<Settings activeconfig="Debug" />
<Config name="Debug" binpathtype="Auto">
<assembly path="../../build/tests/Debug/Challenge00.DDDSample.ACME.UnitTests.dll" />
<assembly path="../../build/tests/Debug/Challenge00.DDDSample.Default.UnitTests.dll" />
<assembly path="../../build/tests/Debug/Challenge00.DDDSample.UnitTests.dll" />
</Config>
<Config name="Release" binpathtype="Auto" />
<Config name="Release" binpathtype="Auto" >
<assembly path="../../build/tests/Release/Challenge00.DDDSample.ACME.UnitTests.dll" />
<assembly path="../../build/tests/Release/Challenge00.DDDSample.Default.UnitTests.dll" />
<assembly path="../../build/tests/Release/Challenge00.DDDSample.UnitTests.dll" />
</Config>
</NUnitProject>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,35 +9,40 @@
<OutputType>Library</OutputType>
<RootNamespace>Challenge00.DDDSample.ACME</RootNamespace>
<AssemblyName>Challenge00.DDDSample.ACME</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Optimize>False</Optimize>
<OutputPath>..\..\..\build\bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<ConsolePause>False</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<Optimize>False</Optimize>
<OutputPath>..\..\..\build\bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<ConsolePause>False</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Epic.Prelude">
<HintPath>..\..\..\build\bin\Debug\Epic.Prelude.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="..\..\..\Code\EpicInfo.cs">
<Link>EpicInfo.cs</Link>
</Compile>
<Compile Include="Format.cs" />
<Compile Include="ItalianExceptionsFormatter.cs" />
<Compile Include="IEmployee.cs" />
<Compile Include="EnglishExceptionsFormatter.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
//
// EnglishExceptionsFormatter.cs
//
// Author:
// Giacomo Tesio <giacomo@tesio.it>
//
// Copyright (c) 2010-2012 Giacomo Tesio
//
// This file is part of Epic.NET.
//
// Epic.NET is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Epic.NET is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
using System;
using Epic;

namespace Challenge00.DDDSample.ACME
{
public sealed class ReturnMessages : CompositeVisitor<string>.VisitorBase, IVisitor<string, Exception>
{
public ReturnMessages(CompositeVisitor<string> composition)
: base(composition)
{
}

public string Visit(Exception target, IVisitContext context)
{
return target.Message;
}
}

public sealed class ConstantMessage : CompositeVisitor<string>.VisitorBase, IVisitor<string, Exception>
{
private readonly string _msg;
public ConstantMessage(CompositeVisitor<string> composition, string message)
: base(composition)
{
_msg = message;
}

protected override IVisitor<string, TExpression> AsVisitor<TExpression> (TExpression target)
{
IVisitor<string, TExpression> visitor = base.AsVisitor (target);

if(null == visitor || typeof(TExpression).Assembly.Equals(typeof(Challenge00.DDDSample.Cargo.ICargo).Assembly))
return null;

return visitor;
}

public string Visit(Exception target, IVisitContext context)
{
return _msg;
}
}

public sealed class InnerDomainExceptionUnwrap : CompositeVisitor<string>.VisitorBase, IVisitor<string, Exception>
{
public InnerDomainExceptionUnwrap(CompositeVisitor<string> composition)
: base(composition)
{
}

protected override IVisitor<string, TExpression> AsVisitor<TExpression> (TExpression target)
{
IVisitor<string, TExpression> visitor = base.AsVisitor (target);

if(null == visitor || typeof(TExpression).Assembly.Equals(typeof(Challenge00.DDDSample.Cargo.ICargo).Assembly))
return null;

return visitor;
}

public string Visit(Exception target, IVisitContext context)
{
if(null == target.InnerException)
{
return ContinueVisit(target, context);
}
else
{
return VisitInner(target.InnerException, context);
}
}
}

public sealed class EnglishExceptionsFormatter : CompositeVisitorBase<string, Exception>
{
public EnglishExceptionsFormatter ()
: base("EnglishExceptionsMessages")
{
new ReturnMessages(this);
new ConstantMessage(this, "An unexpected error occurred. Please contact the administrator.");
new InnerDomainExceptionUnwrap(this);
new Format<Location.WrongLocationException>(this,
e => e.Message.Substring(0, e.Message.LastIndexOf("\r\n")));
}

protected override IVisitContext InitializeVisitContext (Exception target, IVisitContext context)
{
return context;
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
//
// Format.cs
//
// Author:
// Giacomo Tesio <giacomo@tesio.it>
//
// Copyright (c) 2010-2012 Giacomo Tesio
//
// This file is part of Epic.NET.
//
// Epic.NET is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Epic.NET is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
using System;
using Epic;
namespace Challenge00.DDDSample.ACME
{
public sealed class Format<TException> : CompositeVisitor<string>.VisitorBase, IVisitor<string, TException>
where TException : Exception
{
private readonly Func<TException, string> _format;
private readonly Func<TException, bool> _acceptanceRule;
public Format(CompositeVisitor<string> composition, Func<TException, string> format)
: this(composition, format, e => true)
{
}

public Format(CompositeVisitor<string> composition, Func<TException, string> format, Func<TException, bool> acceptanceRule)
: base(composition)
{
if (null == format)
throw new ArgumentNullException("format");
if (null == acceptanceRule)
throw new ArgumentNullException("acceptanceRule");
_format = format;
_acceptanceRule = acceptanceRule;
}

protected override IVisitor<string, TExpression> AsVisitor<TExpression>(TExpression target)
{
IVisitor<string, TExpression> visitor = base.AsVisitor(target);

if (null == visitor || !_acceptanceRule(target as TException))
return null;

return visitor;
}

#region IVisitor implementation
public string Visit(TException target, IVisitContext context)
{
return _format(target);
}
#endregion
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// ItalianExceptionsFormatter.cs
//
// Author:
// Giacomo Tesio <giacomo@tesio.it>
//
// Copyright (c) 2010-2012 Giacomo Tesio
//
// This file is part of Epic.NET.
//
// Epic.NET is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Epic.NET is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
using System;
using Epic;

namespace Challenge00.DDDSample.ACME
{
public sealed class ItalianExceptionsFormatter : CompositeVisitorBase<string, Exception>
{
public ItalianExceptionsFormatter()
: base("ItalianExceptionsFormatter")
{
new ConstantMessage(this, "Si � verificato un errore imprevisto. Contattare l'amministratore del sistema.");
new InnerDomainExceptionUnwrap(this);
new Format<Location.WrongLocationException>(this,
e => string.Format("Non � possibile effettuare l'operazione, perch� la localit� fornita ({0}) non coincide con quella prevista ({1}).", e.ActualLocation, e.ExpectedLocation));
new Format<Voyage.VoyageCompletedException>(this,
e => string.Format("Il viaggio '{0}' ha gi� raggiunto la propria destinazione.", e.Voyage));
new Format<Cargo.AlreadyClaimedException>(this,
e => string.Format("Non � possibile effettuare l'operazione perch� il cargo '{0}' � gi� stato ritirato.", e.Cargo));
new Format<Cargo.RoutingException>(this,
e => string.Format("Non � possibile effettuare l'operazione perch� il cargo '{0}' � stato diretto su un percorso sbagliato.", e.Cargo),
e => e.RoutingStatus == Challenge00.DDDSample.Cargo.RoutingStatus.Misrouted);
new Format<Cargo.RoutingException>(this,
e => string.Format("Non � possibile effettuare l'operazione perch� non � ancora stato assegnato un percorso al cargo '{0}'.", e.Cargo),
e => e.RoutingStatus == Challenge00.DDDSample.Cargo.RoutingStatus.NotRouted);
new Format<Cargo.RoutingException>(this,
e => "Si � verificato un errore imprevisto. Contattare l'amministratore del sistema.",
e => e.RoutingStatus == Challenge00.DDDSample.Cargo.RoutingStatus.Routed);
}

protected override IVisitContext InitializeVisitContext (Exception target, IVisitContext context)
{
return context;
}
}
}

Loading