For Babelfish Release 1.11.1.3

ResponseT Class

Abstract class representing all Rest API Responses. A concret implementation of a Response class should coorespond to exactly one REST API method call. T is the type of data object expected returned by the REST API call.

Definition

Namespace: Scopos.BabelFish.Responses
Assembly: BabelFish (in BabelFish.dll) Version: 1.11.1.4+b1da393815f6638555a663d9a94167ecabea5695
C#
public abstract class Response<T>
where T : new(), BaseClass
Inheritance
Object    ResponseT
Derived
More

Type Parameters

T

Constructors

ResponseT Base constructor.
ResponseT(Request) 

Properties

Body Gets or Sets the raw body returned by the Rest API Call. If the StatusCode is something other than OK (200), the value of Body will be invalid.
ExceptionMessage 
FileSystemCachedResponse If true, indicates this response was from file system local storage, and not from an API call.
HasOkStatusCode Helper function. Returns true if .OverallStausCode is OK.
InMemoryCachedResponse If true, indicates this response was from in memory cache, and not from an API call.
Json The serialized text value returned by the Rest API. This value is only set if there was an error.
MessageResponse Gets or sets the MesageResponse *status* data object returned by the Rest API Call. The Message Response contains all of the standard fields returned in a Scopos Rest API call, including Message and NextToken (if used). What it doesn't contain is the requested data model object.
OverallStatusCode Gets or Sets the overall status code. Pinpointing errors other than from the Rest API.
Request The Request object used to generate this Response object.
RestApiStatusCode Gets or Sets the Status Code returned by the Rest API call.
TimeToRun Total time of the request. Includes the time it takes to make the API call plus time to parse the returned JSON into object form.
Value Gets or sets the data object returned by the Rest API Call.
WriteToFileSystemCacheOnSuccess Boolean indicating if the response should be written to file system cache on a successful call. Default value is false.

Methods

ConvertBodyToValue Function responsible for each concrete implementation to convert the Body, which is a JToken object, into the Value, which is of type T.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetCacheValueExpiryTime Returns the time that the response object is considered out of date and should not longer be used in a cached response. To enable cache for a API call two things needs to happen. First the concrete APIClient needs to enabled caching response by setting .IgnoreLocalCache to false. Second, each request object must enable it by overridding GetCacheValueExpiryTime to a value in the future.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also