コード例 #1
0
 public InMemoryCommunicationContext()
 {
     ApplicationBaseUri = new Uri("http://local");
     Request            = new InMemoryRequest();
     Response           = new InMemoryResponse();
     ServerErrors       = new List <Error>();
     Environment        = new Environment();
 }
コード例 #2
0
 public InMemoryCommunicationContext()
 {
     ApplicationBaseUri = new Uri("http://local");
     Request = new InMemoryRequest();
     Response = new InMemoryResponse();
     ServerErrors = new List<Error>();
     Environment = new Environment();
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 public UriParametersFilter(ICommunicationContext context, IErrorCollector collector)
 {
     Logger = NullLogger.Instance;
     Errors = collector;
     _environment = context.Environment;
 }
コード例 #8
0
 public AbstractApplicationXWwwFormUrlencodedCodec(ICommunicationContext context, IObjectBinderLocator locator)
 {
     _environment   = context.Environment;
     _binderLocator = locator;
 }
コード例 #9
0
 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;
 }