Class PluginResponseInfo
Response object used by plugin/connector actions, to tell the caller how well the call went.
Inheritance
PluginResponseInfo
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public class PluginResponseInfo
Constructors
PluginResponseInfo()
Default constructor, creates an Ok response
Declaration
public PluginResponseInfo()
Properties
ErrorCode
An error code, if available.
Declaration
public string ErrorCode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsOk
A bool simplification of the response state: Return true if the State is not ResponseState.Error.
Declaration
public bool IsOk { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
State
Full response state: Ok, OkWithInfo, Warning or Error. Summarized in the IsOk property: true as long as State is not Error.
Declaration
public ResponseState State { get; set; }
Property Value
| Type | Description |
|---|---|
| ResponseState |
TechExplanation
Always in English
Declaration
public string TechExplanation { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
UserExplanation
A localized explanation to the answer.
Declaration
public string UserExplanation { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Merge(PluginResponseInfo)
Concatenates two response object into one. If one is ok and the other not, then the 'not' wins. The text is concatenated with lineends.
Declaration
public virtual PluginResponseInfo Merge(PluginResponseInfo rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| PluginResponseInfo | rhs | The object to merge into this. |
Returns
| Type | Description |
|---|---|
| PluginResponseInfo |
SetErrorAndUserExplanation(string, string)
Sets the IsOk to false and the user exp to the expl argument
Declaration
public void SetErrorAndUserExplanation(string expl, string tech = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | expl | |
| string | tech |
ToString()
ToString override. Returns a readable PluginResponseInfo representation
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |