Class ResponseHelper
Static class with a collection of helper methods used in creating response objects
Inherited Members
Namespace: SuperOffice.ErpSync.ConnectorWS
Assembly: SuperOffice.Plugins.dll
Syntax
public static class ResponseHelper
Methods
CreateOkResponse<R>()
Create a PluginResponseInfo where everything is OK
Declaration
public static R CreateOkResponse<R>() where R : PluginResponseInfo, new()
Returns
Type | Description |
---|---|
R |
Type Parameters
Name | Description |
---|---|
R | Actual response object type |
CreateResponse<R>(ConnectorResultBaseWS)
Create a PluginResponseInfo object based on a WCF ConnectorResultBaseWS
Declaration
public static R CreateResponse<R>(ConnectorResultBaseWS wsResult) where R : PluginResponseInfo, new()
Parameters
Type | Name | Description |
---|---|---|
ConnectorResultBaseWS | wsResult | ConnectorResultBaseWS to translate |
Returns
Type | Description |
---|---|
R |
Type Parameters
Name | Description |
---|---|
R | Actual response object type |
CreateResponse<R>(Exception)
Create a PluginResponseInfo object based on a Exception
Declaration
public static R CreateResponse<R>(Exception crash) where R : PluginResponseInfo, new()
Parameters
Type | Name | Description |
---|---|---|
Exception | crash | Exception to translate |
Returns
Type | Description |
---|---|
R |
Type Parameters
Name | Description |
---|---|
R | Actual response object type |
CreateWSResponse<R>(PluginResponseInfo)
Create a WCF response object based on a PluginResponseInfo
Declaration
public static R CreateWSResponse<R>(PluginResponseInfo implementationResponse) where R : ConnectorResultBaseWS, new()
Parameters
Type | Name | Description |
---|---|---|
PluginResponseInfo | implementationResponse | Response object to translate |
Returns
Type | Description |
---|---|
R |
Type Parameters
Name | Description |
---|---|
R | Actual response object type |
CreateWSResponse<R>(Exception)
Create a WCF response object based on an Exception
Declaration
public static R CreateWSResponse<R>(Exception crash) where R : ConnectorResultBaseWS, new()
Parameters
Type | Name | Description |
---|---|---|
Exception | crash | Exception to translate |
Returns
Type | Description |
---|---|
R |
Type Parameters
Name | Description |
---|---|
R | Actual response object type |