コード例 #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>();
 }
コード例 #2
0
ファイル: UpdateHandler.cs プロジェクト: larsenjo/odata.net
 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.");
     }
 }
コード例 #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.");
     }
 }
コード例 #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;
        }
コード例 #5
0
 public ODataSimplifiedCreateHandler(RequestHandler other)
     : base(other) { }
コード例 #6
0
 public ODataSimplifiedQueryHandler(RequestHandler other)
     : base(other) { }
コード例 #7
0
ファイル: CreateHandler.cs プロジェクト: larsenjo/odata.net
 public CreateHandler(RequestHandler other, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
     : base(other, HttpMethod.POST, requestUri, headers)
 {
 }
コード例 #8
0
 public BatchHandler(RequestHandler other) :
     base(other, HttpMethod.POST, other.RequestUri, null)
 {
 }
コード例 #9
0
 public PluggableFormatCreateHandler(RequestHandler other)
     : base(other) { }
コード例 #10
0
 public ServiceDocumentHandler(RequestHandler other)
     : base(other, HttpMethod.GET)
 {
 }
コード例 #11
0
 public CreateHandler(RequestHandler other, Uri requestUri = null, IEnumerable <KeyValuePair <string, string> > headers = null)
     : base(other, HttpMethod.POST, requestUri, headers)
 {
 }
コード例 #12
0
 public StatusMonitorRequestHandler(RequestHandler other, Uri requestUri = null, IEnumerable <KeyValuePair <string, string> > headers = null)
     : base(other, HttpMethod.GET, requestUri, headers)
 {
 }
コード例 #13
0
 public ErrorHandler(RequestHandler other, Exception exception) :
     base(other, HttpMethod.GET, other.ServiceRootUri, null)
 {
     this.HandledException = exception;
 }
コード例 #14
0
 public AsyncTask(RequestHandler requestHandler, IODataRequestMessage requestMessage, DateTime dueAt)
 {
     this.requestHandler = requestHandler;
     this.requestMessage = requestMessage;
     this.dueAt = dueAt;
 }
コード例 #15
0
ファイル: BatchHandler.cs プロジェクト: manureini/odata.net
 public BatchHandler(RequestHandler other) :
     base(other, HttpMethod.POST, other.RequestUri, null)
 {
 }
コード例 #16
0
 public PluggableFormatQueryHandler(RequestHandler other)
     : base(other) { }
コード例 #17
0
 public PluggableFormatOperationHandler(RequestHandler other, HttpMethod httpMethod)
     : base(other, httpMethod)
 { }
コード例 #18
0
 public ErrorHandler(RequestHandler other, Exception exception) :
     base(other, HttpMethod.GET, other.ServiceRootUri, null)
 {
     this.HandledException = exception;
 }
コード例 #19
0
 public MetadataDocumentHandler(RequestHandler other)
     : base(other, HttpMethod.GET)
 {
 }
コード例 #20
0
 public MediaStreamHandler(RequestHandler other, HttpMethod method)
     : base(other, method)
 {
 }
コード例 #21
0
 public MediaStreamHandler(RequestHandler other, HttpMethod method)
     : base(other, method)
 {
 }
コード例 #22
0
 public PluggableFormatErrorHandler(RequestHandler other, Exception exception)
     : base(other, exception)
 {
 }
コード例 #23
0
 public StatusMonitorRequestHandler(RequestHandler other, Uri requestUri = null, IEnumerable<KeyValuePair<string, string>> headers = null)
     : base(other, HttpMethod.GET, requestUri, headers)
 {
     
 }
コード例 #24
0