-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Async API, net45, Sample WebApi App
* Upgrade net45, fluent assertions, VS, version rev * Add badges * Expose inner object cache * Add GetOrAddAsync api * Upgrade nunit to 3.4.1 * Lots of async tests * Add GetAsync method * upgrade nuget restore and use appveyor to pack not msbuild * Remove packages and restore on build * Add a sample web app to demonstrate async caching * Update docs
- Loading branch information
1 parent
36240d9
commit 57618d7
Showing
51 changed files
with
1,185 additions
and
54,033 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 | Diff line number | Diff line change |
---|---|---|
|
@@ -187,3 +187,6 @@ Desktop.ini | |
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
packages/ | ||
.vs/ |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LazyCache.UnitTests | ||
{ | ||
public static class AsyncHelper | ||
{ | ||
public static Task<T> CreateCancelledTask<T>() | ||
{ | ||
var tcs = new TaskCompletionSource<T>(); | ||
tcs.SetCanceled(); | ||
return tcs.Task; | ||
} | ||
|
||
public static Task<T> CreateTaskWithException<T, TException>() where TException : Exception | ||
{ | ||
var tcs = new TaskCompletionSource<T>(); | ||
tcs.SetException(Activator.CreateInstance<TException>()); | ||
return tcs.Task; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.