This file contains hidden or 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
| @foreach (var provider in OAuthWebSecurity.RegisteredClientData) | |
| { | |
| <a href="@this.Url.Action("loginexternal", "account", new { provider = provider.AuthenticationClient.ProviderName, returnUrl = this.Model.RedirectUrl })"> | |
| <@provider.DisplayName | |
| </a> | |
| } |
This file contains hidden or 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
| namespace OAuthDemo.Controllers | |
| { | |
| using System; | |
| using System.Web.Mvc; | |
| [Authorize] | |
| public class AccountController : Controller | |
| { | |
| public ActionResult Logout() | |
| { |
This file contains hidden or 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
| public ActionResult Filter(string productCategory, IDictionary<string, string> filters) | |
| { | |
| } |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Web.Routing; | |
| public class DictionaryRouteHandler<TKey, TValue> : MvcRouteHandler | |
| { | |
| private readonly string _key; |
This file contains hidden or 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
| routes.Add( | |
| new Route( | |
| "product/{productCategory}/filter/{*filters}", | |
| new RouteValueDictionary | |
| { | |
| { "controller", "Product" }, | |
| { "action", "Filter" } | |
| }, | |
| new DictionaryRouteHandler<int, string>("filters"))); |
This file contains hidden or 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
| [TestMethod] | |
| public async Task TestGenericOperation | |
| { | |
| var fakeThing = new StubIThingWithGeneric(); | |
| fakeThing.GenericOperationAsyncOf1(() => new SomeOtherThing(); | |
| var target = new TestTarget(fakeThing); | |
| var actual = await target.DoSomething(); |
This file contains hidden or 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
| public class SomeController : Controller | |
| { | |
| public ActionResult GetCookie() | |
| { | |
| var cookie = this.Request.Cookies["CookieName"]; | |
| if(cookie == null) | |
| { | |
| return new HttpStatusCodeResult(HttpStatusCode.BadRequest); | |
| } |
This file contains hidden or 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
| <Fakes xmlns="http://schemas.microsoft.com/fakes/2011/" Diagnostic="true"> | |
| <Assembly Name="SomeThirdPartyAssembly"/> | |
| <ShimGeneration> | |
| <Clear/> | |
| <Add FullName="SomeThirdPartyClassThatInheritsObselete"/> | |
| <Remove Obsolete="1"/> | |
| </ShimGeneration> | |
| </Fakes> |
This file contains hidden or 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
| <PublishUrl>/chocolatey-explorer/</PublishUrl> | |
| <Install>true</Install> | |
| <InstallFrom>Web</InstallFrom> | |
| <UpdateEnabled>true</UpdateEnabled> | |
| <UpdateMode>Foreground</UpdateMode> | |
| <UpdateInterval>7</UpdateInterval> | |
| <UpdateIntervalUnits>Days</UpdateIntervalUnits> | |
| <UpdatePeriodically>false</UpdatePeriodically> | |
| <UpdateRequired>false</UpdateRequired> | |
| <MapFileExtensions>true</MapFileExtensions> |
This file contains hidden or 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
| msbuild ChocolateyExplorer.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /t:Publish /property:ApplicationVersion="$env:APPVEYOR_BUILD_VERSION" |