Example #1
0
 public InMemoryCommunicationContext()
 {
     ApplicationBaseUri = new Uri("http://local");
     Request            = new InMemoryRequest();
     Response           = new InMemoryResponse();
     ServerErrors       = new List <Error>();
     Environment        = new Environment();
 }
 public InMemoryCommunicationContext()
 {
     ApplicationBaseUri = new Uri("http://local");
     Request = new InMemoryRequest();
     Response = new InMemoryResponse();
     ServerErrors = new List<Error>();
     Environment = new Environment();
 }
 public HttpListenerCommunicationContext(IHost host, HttpListenerContext nativeContext)
 {
     ServerErrors   = new List <Error>();
     Environment    = new Environment();
     _host          = host;
     _nativeContext = nativeContext;
     User           = nativeContext.User;
     Request        = new HttpListenerRequest(this, nativeContext.Request);
     Response       = new HttpListenerResponse(this, nativeContext.Response);
 }
 protected AbstractMultipartFormDataCodec(ICommunicationContext context, 
     ICodecRepository codecs,
     IDependencyResolver container,
     ITypeSystem typeSystem,
     IObjectBinderLocator binderLocator)
 {
     // temporary until IRequest / IResponse are moved to the container
     _pipeline = context.Environment;
     _codecs = codecs;
     _typeSystem = typeSystem;
     _container = container;
     BinderLocator = binderLocator;
     Log = NullLogger<CodecLogSource>.Instance;
 }
 protected AbstractMultipartFormDataCodec(ICommunicationContext context,
                                          ICodecRepository codecs,
                                          IDependencyResolver container,
                                          ITypeSystem typeSystem,
                                          IObjectBinderLocator binderLocator)
 {
     // temporary until IRequest / IResponse are moved to the container
     _pipeline     = context.Environment;
     _codecs       = codecs;
     _typeSystem   = typeSystem;
     _container    = container;
     BinderLocator = binderLocator;
     Log           = NullLogger <CodecLogSource> .Instance;
 }
 public SinglePipeline(Func <T> creator,
                       IDependencyResolver resolver,
                       Dictionary <Type, Func <ICommunicationContext, PipelineContinuation> > actions)
 {
     ContextData = new Environment();
     _resolver   = resolver;
     if (!_resolver.HasDependency(typeof(T)))
     {
         _resolver.AddDependency <T>();
     }
     _list = new List <IPipelineContributor> {
         creator != null?creator() : resolver.Resolve <T>()
     };
     _actions = actions;
 }
 public UriParametersFilter(ICommunicationContext context, IErrorCollector collector)
 {
     Logger = NullLogger.Instance;
     Errors = collector;
     _environment = context.Environment;
 }
Example #8
0
 public AbstractApplicationXWwwFormUrlencodedCodec(ICommunicationContext context, IObjectBinderLocator locator)
 {
     _environment   = context.Environment;
     _binderLocator = locator;
 }
 public UriParametersFilter(ICommunicationContext context, IErrorCollector collector)
 {
     Logger       = NullLogger.Instance;
     Errors       = collector;
     _environment = context.Environment;
 }
 public AbstractApplicationXWwwFormUrlencodedCodec(ICommunicationContext context, IObjectBinderLocator locator)
 {
     _environment = context.Environment;
     _binderLocator = locator;
 }