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 enum Cacheability | |
| { | |
| NoCache, | |
| Private, | |
| Public, | |
| } |
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
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var server = WebApp.Start("http://localhost:1002/", (app) => | |
| { | |
| var config = new HttpConfiguration(); | |
| config.MapHttpAttributeRoutes(); | |
| config.Services.Replace(typeof(IExceptionHandler), new RethrowExceptionHandler()); |
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 Result<T> | |
| { | |
| public bool IsSuccess { get; private set; } | |
| public string ErrorMessage { get; private set; } | |
| public IEnumerable<T> Results { get; private set; } | |
| private Result() | |
| { } | |
| public static Result<T> Success(IEnumerable<T> results) |
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 crap | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Data; | |
| using System.Data.SqlClient; | |
| public class PartialAppPlayground |
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 Fabrik.Common.Net | |
| { | |
| /// <summary> | |
| /// RFC5988 Link relation types <see cref="http://www.iana.org/assignments/link-relations/link-relations.xml"/>. | |
| /// </summary> | |
| public static class LinkRelations | |
| { | |
| /// <summary> | |
| /// Refers to a resource that is the subject of the link's context. |
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 GetEventStoreRepository : IRepository | |
| { | |
| private const string EventClrTypeHeader = "EventClrTypeName"; | |
| private const string AggregateClrTypeHeader = "AggregateClrTypeName"; | |
| private const string CommitIdHeader = "CommitId"; | |
| private const int WritePageSize = 500; | |
| private const int ReadPageSize = 500; | |
| private readonly Func<Type, Guid, string> _aggregateIdToStreamName; |
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
| { | |
| "_links": { | |
| "self": [ | |
| { | |
| "href": "/orders/10" | |
| } | |
| ], | |
| "warehouse": [ | |
| { | |
| "href": "/warehouse/10" |
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 Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Dynamic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Net; |
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.Concurrent; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using System.Threading.Tasks.Dataflow; | |
| namespace TDFDemo | |
| { | |
| class Program | |
| { |
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 ApiKeyAuthHandler : DelegatingHandler | |
| { | |
| private const string ApiKeySchemeName = "ApiKey"; | |
| private const string AuthResponseHeader = "WWW-Authenticate"; | |
| protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
| { | |
| var authHeader = request.Headers.Authorization; | |
| if (authHeader != null && authHeader.Scheme == ApiKeySchemeName) |
NewerOlder