Exemplo n.º 1
0
 public DeltaHandler(RequestHandler other, DeltaSnapshot deltaSnapshot, string deltaToken)
     : base(other, HttpMethod.GET, deltaSnapshot.QueryUri)
 {
     DeltaToken = deltaToken;
     DeltaSnapshot = deltaSnapshot.Clone();
     DeltaItems = new List<ODataItem>();
 }
Exemplo n.º 2
0
 public UpdateHandler(RequestHandler other, HttpMethod httpMethod, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
     : base(other, httpMethod, requestUri, headers)
 {
     if (httpMethod != HttpMethod.PATCH && httpMethod != HttpMethod.PUT)
     {
         throw new ArgumentException("The HttpMethod in UpdateHandler must be PATCH or PUT.");
     }
 }
Exemplo n.º 3
0
 public OperationHandler(RequestHandler other, HttpMethod httpMethod)
     : base(other, httpMethod)
 {
     if (httpMethod != HttpMethod.GET && httpMethod != HttpMethod.POST)
     {
         throw new ArgumentException("The HttpMethod in OperationHandler must be GET or POST.");
     }
 }
Exemplo n.º 4
0
        protected RequestHandler(RequestHandler other, HttpMethod httpMethod, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
        {
            // TODO: [tiano] We should have a deep check in to prevent infinite loop caused by bad code.
            this.HttpMethod = httpMethod;

            if (requestUri == null)
            {
                this.RequestUri = Utility.RebuildUri(other.RequestUri);
            }
            else
            {
                this.RequestUri = Utility.RebuildUri(requestUri);
            }


            this.DataSource = other.DataSource;

            if (headers == null)
            {
                this.RequestAcceptHeader = other.RequestAcceptHeader;
                this.RequestHeaders = new Dictionary<string, string>(other.RequestHeaders);
            }
            else
            {
                this.RequestHeaders = new Dictionary<string, string>();

                foreach (KeyValuePair<string, string> kvp in headers)
                {
                    this.RequestHeaders[kvp.Key] = kvp.Value;
                }

                this.RequestAcceptHeader = this.RequestHeaders.ContainsKey("Accept") ? this.RequestHeaders["Accept"] : string.Empty;
            }

            this.ServiceRootUri = Utility.RebuildUri(other.ServiceRootUri);

            this.QueryContext = new QueryContext(this.ServiceRootUri, this.RequestUri, this.DataSource.Model);

            this.PreferenceContext = other.PreferenceContext;
        }
 public ODataSimplifiedCreateHandler(RequestHandler other)
     : base(other) { }
 public ODataSimplifiedQueryHandler(RequestHandler other)
     : base(other) { }
Exemplo n.º 7
0
 public CreateHandler(RequestHandler other, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
     : base(other, HttpMethod.POST, requestUri, headers)
 {
 }
Exemplo n.º 8
0
 public BatchHandler(RequestHandler other) :
     base(other, HttpMethod.POST, other.RequestUri, null)
 {
 }
 public PluggableFormatCreateHandler(RequestHandler other)
     : base(other) { }
 public ServiceDocumentHandler(RequestHandler other)
     : base(other, HttpMethod.GET)
 {
 }
Exemplo n.º 11
0
 public CreateHandler(RequestHandler other, Uri requestUri = null, IEnumerable <KeyValuePair <string, string> > headers = null)
     : base(other, HttpMethod.POST, requestUri, headers)
 {
 }
Exemplo n.º 12
0
 public StatusMonitorRequestHandler(RequestHandler other, Uri requestUri = null, IEnumerable <KeyValuePair <string, string> > headers = null)
     : base(other, HttpMethod.GET, requestUri, headers)
 {
 }
Exemplo n.º 13
0
 public ErrorHandler(RequestHandler other, Exception exception) :
     base(other, HttpMethod.GET, other.ServiceRootUri, null)
 {
     this.HandledException = exception;
 }
Exemplo n.º 14
0
 public AsyncTask(RequestHandler requestHandler, IODataRequestMessage requestMessage, DateTime dueAt)
 {
     this.requestHandler = requestHandler;
     this.requestMessage = requestMessage;
     this.dueAt = dueAt;
 }
Exemplo n.º 15
0
 public BatchHandler(RequestHandler other) :
     base(other, HttpMethod.POST, other.RequestUri, null)
 {
 }
 public PluggableFormatQueryHandler(RequestHandler other)
     : base(other) { }
 public PluggableFormatOperationHandler(RequestHandler other, HttpMethod httpMethod)
     : base(other, httpMethod)
 { }
Exemplo n.º 18
0
 public ErrorHandler(RequestHandler other, Exception exception) :
     base(other, HttpMethod.GET, other.ServiceRootUri, null)
 {
     this.HandledException = exception;
 }
Exemplo n.º 19
0
 public MetadataDocumentHandler(RequestHandler other)
     : base(other, HttpMethod.GET)
 {
 }
Exemplo n.º 20
0
 public MediaStreamHandler(RequestHandler other, HttpMethod method)
     : base(other, method)
 {
 }
Exemplo n.º 21
0
 public MediaStreamHandler(RequestHandler other, HttpMethod method)
     : base(other, method)
 {
 }
 public PluggableFormatErrorHandler(RequestHandler other, Exception exception)
     : base(other, exception)
 {
 }
 public StatusMonitorRequestHandler(RequestHandler other, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
     : base(other, HttpMethod.GET, requestUri, headers)
 {
     
 }
Exemplo n.º 24
0