Class StorageHelper
Static Helper for the Storage API.
Inheritance
System.Object
StorageHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Storage
Assembly: dotNetRDF.dll
Syntax
public static class StorageHelper
Fields
| Improve this Doc View SourceHttpMultipartContentTemplate
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 |
---|---|
System.String |
Properties
| Improve this Doc View SourceHttpMultipartBoundary
Gets a new unique boundary for HTTP mutlipart requests.
Declaration
public static string HttpMultipartBoundary { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceHandleError(Exception, String)
Handles Errors.
Declaration
public static RdfStorageException HandleError(Exception ex, string action)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | ex | Error. |
System.String | action | Action being performed. |
Returns
Type | Description |
---|---|
RdfStorageException |
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. |
System.String | action | Action being performed. |
System.Func<System.String, System.Exception, T> | errorProvider | Function that generates the actual errors. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | Error Type. |
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. |
System.String | action | Action being performed. |
Returns
Type | Description |
---|---|
RdfStorageException |
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. |
System.String | action | Action being performed. |
System.Func<System.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(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 |
HandleQueryError(Exception)
Handles Query Errors.
Declaration
public static RdfQueryException HandleQueryError(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | ex | Error. |
Returns
Type | Description |
---|---|
RdfQueryException |