summaryrefslogtreecommitdiffstats
path: root/projecttemplates/MvcRelyingParty/Code/Extensions.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-06-16 16:05:44 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-06-16 16:05:44 -0700
commitc74bede6f773bd0a0c6362a6647a2939554ccd9a (patch)
treec43abdf614a40e6932e8d5597817a6197a3742d5 /projecttemplates/MvcRelyingParty/Code/Extensions.cs
parent6616faa0d09dc0fd6f60bc5ce122476aefaec44c (diff)
downloadDotNetOpenAuth-c74bede6f773bd0a0c6362a6647a2939554ccd9a.zip
DotNetOpenAuth-c74bede6f773bd0a0c6362a6647a2939554ccd9a.tar.gz
DotNetOpenAuth-c74bede6f773bd0a0c6362a6647a2939554ccd9a.tar.bz2
Removes project templates.
These haven't run correctly for many months anyway, and they'd be horribly out-dated even if they did work.
Diffstat (limited to 'projecttemplates/MvcRelyingParty/Code/Extensions.cs')
-rw-r--r--projecttemplates/MvcRelyingParty/Code/Extensions.cs46
1 files changed, 0 insertions, 46 deletions
diff --git a/projecttemplates/MvcRelyingParty/Code/Extensions.cs b/projecttemplates/MvcRelyingParty/Code/Extensions.cs
deleted file mode 100644
index 09437b0..0000000
--- a/projecttemplates/MvcRelyingParty/Code/Extensions.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-namespace MvcRelyingParty {
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Web;
- using System.Web.Mvc;
-
- internal static class Extensions {
- internal static Uri ActionFull(this UrlHelper urlHelper, string actionName) {
- return new Uri(HttpContext.Current.Request.Url, urlHelper.Action(actionName));
- }
-
- internal static Uri ActionFull(this UrlHelper urlHelper, string actionName, string controllerName) {
- return new Uri(HttpContext.Current.Request.Url, urlHelper.Action(actionName, controllerName));
- }
-
- internal static Task ToApm(this Task task, AsyncCallback callback, object state) {
- if (task == null) {
- throw new ArgumentNullException("task");
- }
-
- var tcs = new TaskCompletionSource<object>(state);
- task.ContinueWith(
- t => {
- if (t.IsFaulted) {
- tcs.TrySetException(t.Exception.InnerExceptions);
- } else if (t.IsCanceled) {
- tcs.TrySetCanceled();
- } else {
- tcs.TrySetResult(null);
- }
-
- if (callback != null) {
- callback(tcs.Task);
- }
- },
- CancellationToken.None,
- TaskContinuationOptions.None,
- TaskScheduler.Default);
-
- return tcs.Task;
- }
- }
-}