Show / Hide Table of Contents

Class StorageHelper

Static Helper for the Storage API.

Inheritance
object
StorageHelper
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.dll
Syntax
public static class StorageHelper

Fields

| Edit this page View Source

HttpMultipartContentTemplate

Template for posting form data as part of a HTTP multipart request.

Declaration
public const string HttpMultipartContentTemplate = "Content-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}"
Field Value
Type Description
string

Properties

| Edit this page View Source

HttpMultipartBoundary

Gets a new unique boundary for HTTP mutlipart requests.

Declaration
public static string HttpMultipartBoundary { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

HandleError(Exception, string)

Handles Errors.

Declaration
public static RdfStorageException HandleError(Exception ex, string action)
Parameters
Type Name Description
Exception ex

Error.

string action

Action being performed.

Returns
Type Description
RdfStorageException
| Edit this page View Source

HandleError<T>(Exception, string, Func<string, Exception, T>)

Handles Errors.

Declaration
public static T HandleError<T>(Exception ex, string action, Func<string, Exception, T> errorProvider) where T : Exception
Parameters
Type Name Description
Exception ex

Error.

string action

Action being performed.

Func<string, Exception, T> errorProvider

Function that generates the actual errors.

Returns
Type Description
T
Type Parameters
Name Description
T

Error Type.

| Edit this page View Source

HandleHttpError(HttpResponseMessage, string)

Handles HTTP errors, obtaining additional information from the HTTP response if possible.

Declaration
public static RdfStorageException HandleHttpError(HttpResponseMessage response, string action)
Parameters
Type Name Description
HttpResponseMessage response

HTTP response.

string action

Action being performed.

Returns
Type Description
RdfStorageException

Exception that can be raised to notify this error.

| Edit this page View Source

HandleHttpError(WebException, string)

Handles HTTP Errors obtaining additional information from the HTTP response if possible.

Declaration
public static RdfStorageException HandleHttpError(WebException webEx, string action)
Parameters
Type Name Description
WebException webEx

HTTP Error.

string action

Action being performed.

Returns
Type Description
RdfStorageException
| Edit this page View Source

HandleHttpError<T>(HttpResponseMessage, string, Func<string, T>)

Handles HTTP errors obtaining additional information from the HTTP response if possible.

Declaration
public static T HandleHttpError<T>(HttpResponseMessage responseMessage, string action, Func<string, T> errorProvider) where T : Exception
Parameters
Type Name Description
HttpResponseMessage responseMessage

HTTP response message to process.

string action

Action being performed when the response message was received.

Func<string, T> errorProvider

Function that generates the exception to be raised.

Returns
Type Description
T
Type Parameters
Name Description
T

Type of exception to raise.

| Edit this page View Source

HandleHttpError<T>(WebException, string, Func<string, Exception, T>)

Handles HTTP Errors obtaining additional information from the HTTP response if possible.

Declaration
public static T HandleHttpError<T>(WebException webEx, string action, Func<string, Exception, T> errorProvider) where T : Exception
Parameters
Type Name Description
WebException webEx

HTTP Error.

string action

Action being performed.

Func<string, Exception, T> errorProvider

Function that generates the actual errors.

Returns
Type Description
T
Type Parameters
Name Description
T
Remarks

Adapted from Ron Michael's Zettlemoyer's original patch for this in Stardog to use it across all operations as far as possible.

| Edit this page View Source

HandleHttpQueryError(HttpResponseMessage)

Handles HTTP Query Errors obtaining additional information from the HTTP response if possible.

Declaration
public static RdfQueryException HandleHttpQueryError(HttpResponseMessage responseMessage)
Parameters
Type Name Description
HttpResponseMessage responseMessage

HTTP response.

Returns
Type Description
RdfQueryException
| Edit this page View Source

HandleHttpQueryError(WebException)

Handles HTTP Query Errors obtaining additional information from the HTTP response if possible.

Declaration
public static RdfQueryException HandleHttpQueryError(WebException webEx)
Parameters
Type Name Description
WebException webEx

HTTP Error.

Returns
Type Description
RdfQueryException
| Edit this page View Source

HandleQueryError(Exception)

Handles Query Errors.

Declaration
public static RdfQueryException HandleQueryError(Exception ex)
Parameters
Type Name Description
Exception ex

Error.

Returns
Type Description
RdfQueryException
  • Edit this page
  • View Source
In this article
  • Fields
    • HttpMultipartContentTemplate
  • Properties
    • HttpMultipartBoundary
  • Methods
    • HandleError(Exception, string)
    • HandleError<T>(Exception, string, Func<string, Exception, T>)
    • HandleHttpError(HttpResponseMessage, string)
    • HandleHttpError(WebException, string)
    • HandleHttpError<T>(HttpResponseMessage, string, Func<string, T>)
    • HandleHttpError<T>(WebException, string, Func<string, Exception, T>)
    • HandleHttpQueryError(HttpResponseMessage)
    • HandleHttpQueryError(WebException)
    • HandleQueryError(Exception)
Back to top Generated by DocFX