Chris Marisic dotnetchris

View Cassette.targets
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="utf-8" ?>
<!--
The web application csproj file has been modified to import this file.
So after a build, the Cassette bundles will be saved into a cache directory.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(OutputPath)\Cassette.MSBuild.dll" TaskName="CreateBundles"/>
<PropertyGroup>
<!--<CassetteOutputPath Condition="'$(CassetteOutputPath)' == ''">Content/cassette-cache</CassetteOutputPath>-->
View publish.targets
1 2 3 4 5 6 7 8 9 10
<?xml version="1.0" encoding="utf-8" ?>
 
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CassetteOutputPath>$(IntermediateOutputPath)cassette-cache</CassetteOutputPath>
 
<CopyAllFilesToSingleFolderForPackageDependsOn>
BundleAssets;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
View web.config
1 2 3 4 5 6 7 8 9 10
<configuration>
<appSettings>
<add key="Raven/AnonymousAccess" value="All" />
<add key="Raven/RunInMemory" value="true" />
<add key="Raven/VirtualDirectory" value="/ravendb.testserver" />
<add key="Raven/TempIndexPromotionMinimumQueryCount" value="1" />
</appSettings>
<system.web>
<customErrors mode="Off">
</customErrors>
View Skip_transform_results_tests
1 2 3 4 5 6 7 8 9 10
#region Using Statements
 
using System;
using System.Collections.Generic;
using System.Linq;
using Raven.Abstractions.Data;
using Raven.Abstractions.Indexing;
using Raven.Client.Document;
using Raven.Client.Embedded;
using Raven.Client.Indexes;
View gist:3636052
1 2 3 4 5
$dest = "F:\Backup\Runs\backup-"+(Get-Date).ToString("yyyy-MM-dd HHmm")
 
.\Raven.Backup.exe --url=http://localhost/ --dest=$dest
& 'C:\Program Files\7-Zip\7z.exe' a $dest $dest
Remove-Item -Recurse $dest
View gist:3298615
1 2 3 4 5 6 7 8 9 10
[Authorize("Users")]
public class ProfileController : ResourceController
{
private readonly UserReports _userReports;
private readonly Func<UserService> _userServiceFactory;
private readonly ILogger _logger;
private readonly Func<ProfileViewModelValidator> _validatorFactory;
 
public ProfileController(UserReports userReports, Func<UserService> userServiceFactory, Func<ProfileViewModelValidator> validatorFactory, ILogger logger)
{
View gist:2924189
1 2 3 4 5 6 7 8 9 10
public class when_json_dates
{
Establish context = () =>
{
input =@"{""Users"":[{""Id"":""90c68332-a5e2-42ca-bde7-9e0701412110"",""IsActive"":true,""LockedOutUntil"":""\/Date(1289073014137)\/""}],""Count"":1}";
 
 
IEnumerable<IDataReader> readers = new List<IDataReader> { new JsonReader(new DataReaderSettings(DefaultEncoderDecoderConfiguration.CombinedResolverStrategy()), "application/.*json") };
 
decoder = new DefaultDecoder(new RegExBasedDataReaderProvider(readers));
View HenriFormatter.cs
1 2 3 4 5 6 7 8 9 10
// http://haacked.com/archive/2009/01/14/named-formats-redux.aspx#70485
 
using System;
using System.Text;
using System.Web;
using System.Web.UI;
 
namespace StringLib
{
public static class HenriFormatter
View gist:1706161
1 2 3 4 5 6 7 8 9
static bool DoSomethingCompleted = false;
 
Establish context = () =>
{
The<IThing>()
.WhenToldTo(x => x.DoSomething())
.Return(()=> { DoSomethingCompleted = true; return 5; });
};
View gist:1473259
1 2 3 4 5 6 7 8 9
[Subject(typeof(ThingOrchestrator))]
public class Given_i_am_a_logged_user_and_view_things : WithSubject<ThingOrchestrator>
{
private static readonly List<People> PeopleRepository = new List<People> {.....};
private static readonly List<Thing> ThingsRepository = new List<Thing> { ...... };
 
 
private static readonly List<Thing> ResultThings = new List<Thing>();
private static readonly List<Exception> Exceptions = new List<Exception>();
Something went wrong with that request. Please try again.