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.Web.Mvc; | |
using System.Web.Routing; | |
using Umbraco.Core; | |
public class Startup : IApplicationEventHandler | |
{ | |
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
} |
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
[xml]$projectFile = Get-Content "C:\projects\chocolateyexplorer\ChocolateyExplorer.WPF\ChocolateyExplorer.WPF.csproj" | |
$projectFile.Project.ChildNodes.Item(1).ApplicationVersion = "$env:APPVEYOR_BUILD_VERSION" | |
$projectFile.Save("C:\projects\chocolateyexplorer\ChocolateyExplorer.WPF\ChocolateyExplorer.WPF.csproj") |
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" |
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
<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
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
[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
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
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; |
NewerOlder