Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I haven't finished implementing yet. This code just explores the idea from an API construction point of view, however there is no substance behind the methods.
- Loading branch information
0 parents
commit 27011c3
Showing
14 changed files
with
604 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,22 @@ | |||
# Auto detect text files and perform LF normalization | |||
* text=auto | |||
|
|||
# Custom for Visual Studio | |||
*.cs diff=csharp | |||
*.sln merge=union | |||
*.csproj merge=union | |||
*.vbproj merge=union | |||
*.fsproj merge=union | |||
*.dbproj merge=union | |||
|
|||
# Standard to msysgit | |||
*.doc diff=astextplain | |||
*.DOC diff=astextplain | |||
*.docx diff=astextplain | |||
*.DOCX diff=astextplain | |||
*.dot diff=astextplain | |||
*.DOT diff=astextplain | |||
*.pdf diff=astextplain | |||
*.PDF diff=astextplain | |||
*.rtf diff=astextplain | |||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,163 @@ | |||
################# | |||
## Eclipse | |||
################# | |||
|
|||
*.pydevproject | |||
.project | |||
.metadata | |||
bin/ | |||
tmp/ | |||
*.tmp | |||
*.bak | |||
*.swp | |||
*~.nib | |||
local.properties | |||
.classpath | |||
.settings/ | |||
.loadpath | |||
|
|||
# External tool builders | |||
.externalToolBuilders/ | |||
|
|||
# Locally stored "Eclipse launch configurations" | |||
*.launch | |||
|
|||
# CDT-specific | |||
.cproject | |||
|
|||
# PDT-specific | |||
.buildpath | |||
|
|||
|
|||
################# | |||
## Visual Studio | |||
################# | |||
|
|||
## Ignore Visual Studio temporary files, build results, and | |||
## files generated by popular Visual Studio add-ons. | |||
|
|||
# User-specific files | |||
*.suo | |||
*.user | |||
*.sln.docstates | |||
|
|||
# Build results | |||
[Dd]ebug/ | |||
[Rr]elease/ | |||
*_i.c | |||
*_p.c | |||
*.ilk | |||
*.meta | |||
*.obj | |||
*.pch | |||
*.pdb | |||
*.pgc | |||
*.pgd | |||
*.rsp | |||
*.sbr | |||
*.tlb | |||
*.tli | |||
*.tlh | |||
*.tmp | |||
*.vspscc | |||
.builds | |||
*.dotCover | |||
|
|||
## TODO: If you have NuGet Package Restore enabled, uncomment this | |||
#packages/ | |||
|
|||
# Visual C++ cache files | |||
ipch/ | |||
*.aps | |||
*.ncb | |||
*.opensdf | |||
*.sdf | |||
|
|||
# Visual Studio profiler | |||
*.psess | |||
*.vsp | |||
|
|||
# ReSharper is a .NET coding add-in | |||
_ReSharper* | |||
|
|||
# Installshield output folder | |||
[Ee]xpress | |||
|
|||
# DocProject is a documentation generator add-in | |||
DocProject/buildhelp/ | |||
DocProject/Help/*.HxT | |||
DocProject/Help/*.HxC | |||
DocProject/Help/*.hhc | |||
DocProject/Help/*.hhk | |||
DocProject/Help/*.hhp | |||
DocProject/Help/Html2 | |||
DocProject/Help/html | |||
|
|||
# Click-Once directory | |||
publish | |||
|
|||
# Others | |||
[Bb]in | |||
[Oo]bj | |||
sql | |||
TestResults | |||
*.Cache | |||
ClientBin | |||
stylecop.* | |||
~$* | |||
*.dbmdl | |||
Generated_Code #added for RIA/Silverlight projects | |||
|
|||
# Backup & report files from converting an old project file to a newer | |||
# Visual Studio version. Backup files are not needed, because we have git ;-) | |||
_UpgradeReport_Files/ | |||
Backup*/ | |||
UpgradeLog*.XML | |||
|
|||
|
|||
|
|||
############ | |||
## Windows | |||
############ | |||
|
|||
# Windows image file caches | |||
Thumbs.db | |||
|
|||
# Folder config file | |||
Desktop.ini | |||
|
|||
|
|||
############# | |||
## Python | |||
############# | |||
|
|||
*.py[co] | |||
|
|||
# Packages | |||
*.egg | |||
*.egg-info | |||
dist | |||
build | |||
eggs | |||
parts | |||
bin | |||
var | |||
sdist | |||
develop-eggs | |||
.installed.cfg | |||
|
|||
# Installer logs | |||
pip-log.txt | |||
|
|||
# Unit test / coverage reports | |||
.coverage | |||
.tox | |||
|
|||
#Translations | |||
*.mo | |||
|
|||
#Mr Developer | |||
.mr.developer.cfg | |||
|
|||
# Mac crap | |||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,89 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<PropertyGroup> | |||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
<ProjectGuid>{646A3705-DD15-4006-A6C4-29B03154CFEB}</ProjectGuid> | |||
<OutputType>Library</OutputType> | |||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||
<RootNamespace>Palmer.Tests</RootNamespace> | |||
<AssemblyName>Palmer.Tests</AssemblyName> | |||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||
<FileAlignment>512</FileAlignment> | |||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | |||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | |||
<IsCodedUITest>False</IsCodedUITest> | |||
<TestProjectType>UnitTest</TestProjectType> | |||
</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" /> | |||
</ItemGroup> | |||
<Choose> | |||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'"> | |||
<ItemGroup> | |||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | |||
</ItemGroup> | |||
</When> | |||
<Otherwise> | |||
<ItemGroup> | |||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" /> | |||
</ItemGroup> | |||
</Otherwise> | |||
</Choose> | |||
<ItemGroup> | |||
<Compile Include="RetryTests.cs" /> | |||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\Palmer\Palmer.csproj"> | |||
<Project>{df4dc5cc-6db6-40d3-9930-c7fe7e1eeef9}</Project> | |||
<Name>Palmer</Name> | |||
</ProjectReference> | |||
</ItemGroup> | |||
<Choose> | |||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> | |||
<ItemGroup> | |||
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||
<Private>False</Private> | |||
</Reference> | |||
</ItemGroup> | |||
</When> | |||
</Choose> | |||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | |||
<Import Project="$(MSBuildToolsPath)\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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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("Palmer.Tests")] | |||
[assembly: AssemblyDescription("")] | |||
[assembly: AssemblyConfiguration("")] | |||
[assembly: AssemblyCompany("")] | |||
[assembly: AssemblyProduct("Palmer.Tests")] | |||
[assembly: AssemblyCopyright("Copyright © 2012")] | |||
[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("10ab8ba8-2c59-43a0-a2ea-a970c189a56c")] | |||
|
|||
// 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")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
using System; | |||
using Microsoft.VisualStudio.TestTools.UnitTesting; | |||
using System.Net; | |||
|
|||
namespace Palmer.Tests | |||
{ | |||
[TestClass] | |||
public class RetryTests | |||
{ | |||
[TestMethod] | |||
public void Test1() | |||
{ | |||
Retry.On<WebException>().For(5).With<int>( | |||
context => 1 | |||
); | |||
|
|||
Retry.On<WebException>().For(TimeSpan.FromSeconds(15)).With<int>( | |||
context => 1 | |||
); | |||
|
|||
Retry.On<WebException>().Until(x => 1 == 1).With( | |||
delegate(RetryContext context) | |||
{ | |||
Console.WriteLine("Hello World!"); | |||
Console.WriteLine("Good-bye World!"); | |||
} | |||
); | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,31 @@ | |||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio 2012 | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Palmer", "Palmer\Palmer.csproj", "{DF4DC5CC-6DB6-40D3-9930-C7FE7E1EEEF9}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Palmer.Tests", "Palmer.Tests\Palmer.Tests.csproj", "{646A3705-DD15-4006-A6C4-29B03154CFEB}" | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D381C1F1-3CEB-4198-BE12-6A8554E2B106}" | |||
ProjectSection(SolutionItems) = preProject | |||
README.md = README.md | |||
EndProjectSection | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
Release|Any CPU = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{DF4DC5CC-6DB6-40D3-9930-C7FE7E1EEEF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{DF4DC5CC-6DB6-40D3-9930-C7FE7E1EEEF9}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{DF4DC5CC-6DB6-40D3-9930-C7FE7E1EEEF9}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{DF4DC5CC-6DB6-40D3-9930-C7FE7E1EEEF9}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{646A3705-DD15-4006-A6C4-29B03154CFEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{646A3705-DD15-4006-A6C4-29B03154CFEB}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{646A3705-DD15-4006-A6C4-29B03154CFEB}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{646A3705-DD15-4006-A6C4-29B03154CFEB}.Release|Any CPU.Build.0 = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
Oops, something went wrong.