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 Microsoft.HttpListener.Owin; | |
| using Nancy.Hosting.Owin; | |
| namespace Spike | |
| { | |
| internal class Program | |
| { | |
| private static void Main(string[] args) |
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
| var config = new LoggingConfiguration(); | |
| var nullTarget = new NullTarget(); | |
| config.AddTarget("NullTarget", nullTarget); | |
| config.LoggingRules.Add(new LoggingRule("Raven.*", LogLevel.Debug, nullTarget) { Final = true }); |
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
| Before | |
| public class SimpleClass | |
| { | |
| [LogParamsOnException(LogLevel.Info)] | |
| void Method(string param1, int param2) | |
| { | |
| //Do Stuff | |
| } |
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 ContainsQueryTests : IDisposable | |
| { | |
| private readonly IDocumentStore _documentStore; | |
| public ContainsQueryTests() | |
| { | |
| _documentStore = new EmbeddableDocumentStore {RunInMemory = true}.Initialize(); | |
| using (IDocumentSession session = _documentStore.OpenSession()) | |
| { | |
| session.Store(new TestDocument |
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 interface IWebApplication : IDisposable | |
| { | |
| public Func<IDictionary<string, object>, Task> AppFunc { get; } | |
| public string Url { get; } | |
| } | |
| // Start an app listen = false so that it is pure in-proc for testing. | |
| using(IWebApplication webApp = WebApplication.Start( | |
| builder => builder.UseThing(_foo), |
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
| /* | |
| Usage: | |
| _storeEvents = Wireup | |
| .Init() | |
| .UsingFastInMemoryPersistence() | |
| .InitializeStorageEngine() | |
| .etc... | |
| */ | |
| // ReSharper disable CheckNamespace |
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 Microsoft.Owin.Testing.Tests | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| using Xunit; | |
| public class TestServerTests | |
| { |
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
| <Style TargetType="{x:Type local:MainWindow}"> | |
| <Setter Property="WindowChrome.WindowChrome"> | |
| <Setter.Value> | |
| <WindowChrome /> | |
| </Setter.Value> | |
| </Setter> | |
| <Setter Property="Template"> | |
| <Setter.Value> | |
| <ControlTemplate TargetType="{x:Type local:MainWindow}"> | |
| <Grid> |
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 TestinNancyWithOwinTesting | |
| { | |
| using System; | |
| using System.Net.Http; | |
| using System.Threading.Tasks; | |
| using Nancy; | |
| using Nancy.Bootstrapper; | |
| using Nancy.Testing; | |
| using Owin; | |
| using Microsoft.Owin.Testing; |
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
| // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Reflection; | |
| namespace Microsoft.Owin.FileSystems | |
| { | |
| /// <summary> |