Show / Hide Table of Contents

Class StorageHelper

Static Helper for the Storage API.

Inheritance
System.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

| Improve this Doc 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

| Improve this Doc View Source

HttpMultipartBoundary

Gets a new unique boundary for HTTP mutlipart requests.

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

Methods

| Improve this Doc View Source

HandleError(Exception, string)

Handles Errors.

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

Error.

string action

Action being performed.

Returns
Type Description
RdfStorageException
| Improve this Doc 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
System.Exception ex

Error.

string action

Action being performed.

System.Func<T1, T2, TResult><string, System.Exception, T> errorProvider

Function that generates the actual errors.

Returns
Type Description
T
Type Parameters
Name Description
T

Error Type.

| Improve this Doc 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
System.Net.Http.HttpResponseMessage response

HTTP response.

string action

Action being performed.

Returns
Type Description
RdfStorageException

Exception that can be raised to notify this error.

| Improve this Doc 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
System.Net.WebException webEx

HTTP Error.

string action

Action being performed.

Returns
Type Description
RdfStorageException
| Improve this Doc 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
System.Net.Http.HttpResponseMessage responseMessage

HTTP response message to process.

string action

Action being performed when the response message was received.

System.Func<T, TResult><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.

| Improve this Doc 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
System.Net.WebException webEx

HTTP Error.

string action

Action being performed.

System.Func<T1, T2, TResult><string, System.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.

| Improve this Doc 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
System.Net.Http.HttpResponseMessage responseMessage

HTTP response.

Returns
Type Description
RdfQueryException
| Improve this Doc 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
System.Net.WebException webEx

HTTP Error.

Returns
Type Description
RdfQueryException
| Improve this Doc View Source

HandleQueryError(Exception)

Handles Query Errors.

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

Error.

Returns
Type Description
RdfQueryException
  • Improve this Doc
  • 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