One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| using System; | |
| using System.Linq; | |
| using Autofac; | |
| using Autofac.Core; | |
| namespace Autofac.Logging | |
| { | |
| /// <summary> | |
| /// Sets up automatic DI for service dependencies on <typeparamref name="TLogger"/>, | |
| /// via an external factory that resolves based on the type of the resolver |
| public class AsyncMediatorPipeline<TRequest, TResponse> : IAsyncRequestHandler<TRequest, TResponse> where TRequest : IAsyncRequest<TResponse> | |
| { | |
| private readonly IAsyncRequestHandler<TRequest, TResponse> inner; | |
| private readonly IAsyncPreRequestHandler<TRequest>[] preRequestHandlers; | |
| private readonly IAsyncPostRequestHandler<TRequest, TResponse>[] postRequestHandlers; | |
| public AsyncMediatorPipeline(IAsyncRequestHandler<TRequest, TResponse> inner, IAsyncPreRequestHandler<TRequest>[] preRequestHandlers, IAsyncPostRequestHandler<TRequest, TResponse>[] postRequestHandlers) | |
| { | |
| this.inner = inner; |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| using SampleApi.Results; | |
| using System; | |
| using System.Net.Http; | |
| using System.Web.Http; | |
| namespace SampleApi | |
| { | |
| public static class IHttpActionResultExtensions | |
| { | |
| public static IHttpActionResult With(this IHttpActionResult inner, string responsePhrase = null, Action<HttpResponseMessage> responseAction = null) |
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
| public class ServiceResolverAdapter : IDependencyResolver | |
| { | |
| private readonly System.Web.Mvc.IDependencyResolver dependencyResolver; | |
| public ServiceResolverAdapter(System.Web.Mvc.IDependencyResolver dependencyResolver) | |
| { | |
| if (dependencyResolver == null) throw new ArgumentNullException("dependencyResolver"); | |
| this.dependencyResolver = dependencyResolver; | |
| } |