Skip to content

Commit b526a83

Browse files
committed
- initial commit
0 parents  commit b526a83

12 files changed

Lines changed: 334 additions & 0 deletions

.gitignore

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
.vs
2+
3+
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
4+
[Bb]in/
5+
[Oo]bj/
6+
[Dd]eployment
7+
.vs
8+
9+
# mstest test results
10+
TestResults
11+
12+
## Ignore Visual Studio temporary files, build results, and
13+
## files generated by popular Visual Studio add-ons.
14+
15+
# User-specific files
16+
*.suo
17+
*.user
18+
*.sln.docstates
19+
20+
# Build results
21+
[Dd]ebug/
22+
[Rr]elease/
23+
x64/
24+
*_i.c
25+
*_p.c
26+
*.ilk
27+
*.meta
28+
*.obj
29+
*.pch
30+
*.pdb
31+
*.pgc
32+
*.pgd
33+
*.rsp
34+
*.sbr
35+
*.tlb
36+
*.tli
37+
*.tlh
38+
*.tmp
39+
*.log
40+
*.vspscc
41+
*.vssscc
42+
.builds
43+
44+
# Visual C++ cache files
45+
ipch/
46+
*.aps
47+
*.ncb
48+
*.opensdf
49+
*.sdf
50+
51+
# Visual Studio profiler
52+
*.psess
53+
*.vsp
54+
*.vspx
55+
56+
# Guidance Automation Toolkit
57+
*.gpState
58+
59+
# ReSharper is a .NET coding add-in
60+
_ReSharper*/
61+
*.[Rr]e[Ss]harper
62+
*.DotSettings.user
63+
*.DotSettings
64+
65+
# NCrunch
66+
*.ncrunch*
67+
.*crunch*.local.xml
68+
69+
# Installshield output folder
70+
[Ee]xpress
71+
72+
# DocProject is a documentation generator add-in
73+
DocProject/buildhelp/
74+
DocProject/Help/*.HxT
75+
DocProject/Help/*.HxC
76+
DocProject/Help/*.hhc
77+
DocProject/Help/*.hhk
78+
DocProject/Help/*.hhp
79+
DocProject/Help/Html2
80+
DocProject/Help/html
81+
82+
# Click-Once directory
83+
publish
84+
85+
# Publish Web Output
86+
*.Publish.xml
87+
88+
# NuGet Packages Directory
89+
packages
90+
91+
# Windows Azure Build Output
92+
csx
93+
*.build.csdef
94+
95+
# Windows Store app package directory
96+
AppPackages/
97+
98+
# Others
99+
[Bb]in
100+
[Oo]bj
101+
sql
102+
TestResults
103+
[Tt]est[Rr]esult*
104+
*.Cache
105+
ClientBin
106+
[Ss]tyle[Cc]op.*
107+
~$*
108+
*.dbmdl
109+
Generated_Code #added for RIA/Silverlight projects
110+
111+
# Backup & report files from converting an old project file to a newer
112+
# Visual Studio version. Backup files are not needed, because we have git ;-)
113+
_UpgradeReport_Files/
114+
Backup*/
115+
UpgradeLog*.XML

.media/logo.png

17.9 KB
Loading

LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2018, Eben Roux
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
14+
Neither the name of the Shuttle organization nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Shuttle.Core.Specification
2+
3+
Provides simple specifications.
4+
5+
Visit the [documentation site](http://shuttle.github.io/shuttle-core/).

Shuttle.Core.Specification.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27130.2010
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shuttle.Core.Specification", "Shuttle.Core.Specification\Shuttle.Core.Specification.csproj", "{2C09F3E7-3198-4AAA-9F58-9D260B218B54}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E0F9B25B-801B-4679-9A46-9BFDB6CF54D7}"
9+
ProjectSection(SolutionItems) = preProject
10+
LICENSE = LICENSE
11+
README.md = README.md
12+
EndProjectSection
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{2C09F3E7-3198-4AAA-9F58-9D260B218B54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{2C09F3E7-3198-4AAA-9F58-9D260B218B54}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{2C09F3E7-3198-4AAA-9F58-9D260B218B54}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{2C09F3E7-3198-4AAA-9F58-9D260B218B54}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {4325ECF7-BFC5-4E00-A90C-C6AD4E284C85}
30+
EndGlobalSection
31+
EndGlobal
14 KB
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ShuttleTasksPath Condition="'$(ShuttleTasksPath)' == ''">Shuttle.MSBuild.dll</ShuttleTasksPath>
5+
</PropertyGroup>
6+
7+
<UsingTask AssemblyFile="$(ShuttleTasksPath)" TaskName="Shuttle.MSBuild.Prompt" />
8+
<UsingTask AssemblyFile="$(ShuttleTasksPath)" TaskName="Shuttle.MSBuild.RegexFindAndReplace" />
9+
<UsingTask AssemblyFile="$(ShuttleTasksPath)" TaskName="Shuttle.MSBuild.SetNugetPackageVersions" />
10+
<UsingTask AssemblyFile="$(ShuttleTasksPath)" TaskName="Shuttle.MSBuild.Zip" />
11+
</Project>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Deploy" ToolsVersion="4.0">
2+
<PropertyGroup>
3+
<DeploymentFolder>deployment</DeploymentFolder>
4+
<PackageName>Shuttle.Core.Specification</PackageName>
5+
<PackageSource Condition="$(PackageSource) == ''">https://www.nuget.org</PackageSource>
6+
</PropertyGroup>
7+
8+
<Import Project="Shuttle.MSBuild.targets" />
9+
10+
<ItemGroup>
11+
<ProjectReference Include="..\$(PackageName).csproj" />
12+
</ItemGroup>
13+
14+
<Target Name="Build">
15+
<MSBuild Projects="@(ProjectReference)" Targets="Rebuild" Properties="Configuration=Debug;Platform=AnyCPU"/>
16+
<MSBuild Projects="@(ProjectReference)" Targets="Rebuild" Properties="Configuration=Release;Platform=AnyCPU"/>
17+
</Target>
18+
19+
<Target Name="SemanticVersion">
20+
<Prompt Text="Enter semantic version:" Condition="$(SemanticVersion) == ''">
21+
<Output TaskParameter="UserInput" PropertyName="SemanticVersion" />
22+
</Prompt>
23+
24+
<Error Text="Please enter a version number." Condition="$(SemanticVersion) == ''" />
25+
26+
<ItemGroup>
27+
<AssemblyInfoFiles Include="..\Properties\AssemblyInfo.cs" />
28+
</ItemGroup>
29+
30+
<RegexFindAndReplace Files="@(AssemblyInfoFiles)" FindExpression="AssemblyInformationalVersion\s*\(\s*&quot;.*&quot;\s*\)" ReplacementText="AssemblyInformationalVersion(&quot;$(SemanticVersion)&quot;)" />
31+
<RegexFindAndReplace Files="@(AssemblyInfoFiles)" FindExpression="AssemblyVersion\s*\(\s*&quot;.*&quot;\s*\)" ReplacementText="AssemblyVersion(&quot;$(SemanticVersion).0&quot;)" />
32+
</Target>
33+
34+
<Target Name="Deploy" DependsOnTargets="SemanticVersion">
35+
<MSBuild
36+
Projects="$(MSBuildProjectFile)"
37+
Targets="Package"
38+
Properties="SemanticVersion=$(SemanticVersion)"
39+
/>
40+
41+
<Exec Command="nuget push $(DeploymentFolder)\nuget\$(PackageName).$(SemanticVersion).nupkg -source $(PackageSource)" />
42+
<Exec Command="git commit -a -m &quot;- v$(SemanticVersion)&quot;" />
43+
<Exec Command="git push" />
44+
</Target>
45+
46+
<Target Name="Package" DependsOnTargets="SemanticVersion;Build">
47+
<ItemGroup>
48+
<NugetBinaries Include="..\bin\debug\**\$(PackageName).dll" />
49+
</ItemGroup>
50+
51+
<Copy SourceFiles="package.nuspec" DestinationFolder="$(DeploymentFolder)\nuget\" SkipUnchangedFiles="false" />
52+
<Copy SourceFiles="@(NugetBinaries)" DestinationFolder="$(DeploymentFolder)\nuget\lib\%(RecursiveDir)" SkipUnchangedFiles="false" />
53+
54+
<RegexFindAndReplace Files="$(DeploymentFolder)\nuget\package.nuspec" FindExpression="\{semver\}" ReplacementText="$(SemanticVersion)" />
55+
<RegexFindAndReplace Files="$(DeploymentFolder)\nuget\package.nuspec" FindExpression="\{year\}" ReplacementText="$([System.DateTime]::Now.ToString(`yyyy`))" />
56+
<SetNugetPackageVersions Files="$(DeploymentFolder)\nuget\package.nuspec" ProjectFile="..\$(PackageName).csproj" />
57+
58+
<Exec Command="nuget pack $(DeploymentFolder)\nuget\package.nuspec -OutputDirectory $(DeploymentFolder)\nuget -NoPackageAnalysis" />
59+
60+
<MakeDir Directories="$(NugetPackageSourceFolder)" Condition="$(NugetPackageSourceFolder) != ''" />
61+
62+
<Copy
63+
SourceFiles="$(DeploymentFolder)\nuget\$(PackageName).$(SemanticVersion).nupkg"
64+
DestinationFolder="$(NugetPackageSourceFolder)"
65+
SkipUnchangedFiles="false"
66+
Condition="$(NugetPackageSourceFolder) != ''" />
67+
</Target>
68+
</Project>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>Shuttle.Core.Specification</id>
5+
<version>{semver}</version>
6+
<authors>Eben Roux</authors>
7+
<owners>Eben Roux</owners>
8+
<licenseUrl>https://github.com/shuttle/Shuttle.Core.Specification/raw/master/LICENSE</licenseUrl>
9+
<projectUrl>https://github.com/shuttle/Shuttle.Core.Specification</projectUrl>
10+
<iconUrl>https://raw.githubusercontent.com/Shuttle/Shuttle.Core.Specification/master/.media/logo.png</iconUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Simple specification mechanism.</description>
13+
<releaseNotes/>
14+
<copyright>Copyright (c) {year}, Eben Roux</copyright>
15+
<tags>shuttle</tags>
16+
</metadata>
17+
</package>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace Shuttle.Core.Specification
2+
{
3+
public interface ISpecification<in T>
4+
{
5+
bool IsSatisfiedBy(T candidate);
6+
}
7+
}

0 commit comments

Comments
 (0)