C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.IReference< out T > Interface Template Reference

Base interface for all reference entities. More...

Public Member Functions

GetValue (IEnumerable< Parameter > requestParameters=null, int? timeout=null, bool updateCache=false)
 Gets the resource that this reference refers to by requesting it from the server.
 
void Resolve (IEnumerable< Parameter > requestParameters=null, int? timeout=null, bool updateCache=false)
 Resolve this reference by retrieving the referenced object. If this reference is already resolved, this method does nothing. To refresh the resolved object (e.g. if the referenced object is mutable and might have changed) you can set updateCache to true.
 
ShallowCopy< T > ()
 Create a shallow copy of this object.
 

Properties

string CollectionName [get]
 The name of the collection at which this resource resides.
 
string href [get]
 The HREF that can be used to retrieve the object being referred to.
 
string ref_id [get]
 The id of the object being referred to.
 
string reference_type [get]
 In cases where a model can reference resources belonging to one of a number of collections, this property is used to indicate what type of resource the collection refers to.
 
bool resolved [get]
 Indicates whether the reference has been resolved and the value is available.
 
Type ResourceType [get]
 Returns the runtime type of resource this reference refers to, or the generic type parameter T if unresolved.
 
Value [get]
 Returns the resolved object being referred to.
 

Detailed Description

Base interface for all reference entities.

Interface which should be used for all Reference{T} references to ensure covariance can be used. e.g.: Ensures that the assignment IReference{BaseType} layer = new Reference{DerivedType} is possible.

Type Constraints
T :IAPIResource 

Definition at line 12 of file IReference[T].cs.

Inheritance diagram for AnalyzeRe.IReference< out T >:
AnalyzeRe.IAPIType AnalyzeRe.APITypes.Reference

Member Function Documentation

◆ GetValue()

T AnalyzeRe.IReference< out T >.GetValue ( IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null,
bool  updateCache = false 
)

Gets the resource that this reference refers to by requesting it from the server.

Parameters
requestParametersOptional - Additional parameters to include in the GET request resolving the resource, only used if the resource is not already resolved, or if updateCache is set to true.
timeoutOptional (Default: no timeout) - The desired request timeout (in milliseconds) after which the request will time out.
updateCacheOptional (Default: false) - Set to true to ignore the previously resolved reference value (if any) and retrieve an updated copy of the resource from the server. If false, and this reference was previously resolved, a reference to the previously resolved resource will be returned.
Exceptions
RequestTimeoutExceptionIf the server takes longer than timeout milliseconds to return the resource.
Returns
The resource that this reference refers to.

◆ Resolve()

void AnalyzeRe.IReference< out T >.Resolve ( IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null,
bool  updateCache = false 
)

Resolve this reference by retrieving the referenced object. If this reference is already resolved, this method does nothing. To refresh the resolved object (e.g. if the referenced object is mutable and might have changed) you can set updateCache to true.

Parameters
requestParametersOptional - Additional parameters to include in the GET request resolving the resource, only used if the resource is not already resolved.
timeoutOptional (Default: no timeout) - The desired request timeout (in milliseconds) after which the request will time out.
updateCacheOptional (Default: false) - Set to true to ignore any previously resolved reference value (if any) and re-retrieve an updated copy of the resource from the server. If false, and this reference was previously resolved, a reference to the previously resolved resource will be returned.
Exceptions
RequestTimeoutExceptionIf the server takes longer than timeout milliseconds to return the resource.

◆ ShallowCopy< T >()

T AnalyzeRe.IAPIType.ShallowCopy< T > ( )
inherited

Create a shallow copy of this object.

Returns
A shallow copy of this object.

Implemented in AnalyzeRe.APIType.

Type Constraints
T :IAPIType 

Property Documentation

◆ CollectionName

string AnalyzeRe.IReference< out T >.CollectionName
get

The name of the collection at which this resource resides.

Definition at line 27 of file IReference[T].cs.

◆ href

string AnalyzeRe.IReference< out T >.href
get

The HREF that can be used to retrieve the object being referred to.

Implemented in AnalyzeRe.APITypes.Reference.

Definition at line 22 of file IReference.cs.

◆ ref_id

string AnalyzeRe.IReference< out T >.ref_id
get

The id of the object being referred to.

Implemented in AnalyzeRe.APITypes.Reference.

Definition at line 17 of file IReference.cs.

◆ reference_type

string AnalyzeRe.IReference< out T >.reference_type
get

In cases where a model can reference resources belonging to one of a number of collections, this property is used to indicate what type of resource the collection refers to.

Implemented in AnalyzeRe.APITypes.Reference.

Definition at line 13 of file IReference.cs.

◆ resolved

bool AnalyzeRe.IReference< out T >.resolved
get

Indicates whether the reference has been resolved and the value is available.

Definition at line 16 of file IReference[T].cs.

◆ ResourceType

Type AnalyzeRe.IReference< out T >.ResourceType
get

Returns the runtime type of resource this reference refers to, or the generic type parameter T if unresolved.

Definition at line 32 of file IReference[T].cs.

◆ Value

T AnalyzeRe.IReference< out T >.Value
get

Returns the resolved object being referred to.

Definition at line 23 of file IReference[T].cs.


The documentation for this interface was generated from the following files: