C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
A class containing a resource that can be Posted with dependencies. More...
Public Member Functions | |
InjectableResource (T unPOSTedResource) | |
Create a new injectable resource. | |
InjectableResource (T unPOSTedResource, string data) | |
Create a new injectable resource with some data to upload at injection time. | |
Static Public Member Functions | |
static IInjectableResource< T > | Create< T > (T resource, bool mocked=false) |
Static method for creating wrapping a resource in a DisposableResource.Create container (where the type parameter can be inferred). | |
static IInjectableResource< T > | Create< T > (T resource, string data, bool mocked=false) |
Static method for creating wrapping a resource in a DisposableResource.Create container (where the type parameter can be inferred). | |
Properties | |
IReference< T > | AsInlinedReference [get] |
A reference to the unPOSTed resource (i.e. an inlined reference). | |
IReference< T > | AsReference [get] |
A reference to the posted resource. | |
bool | Mocked [get, set] |
If true, the resource is mocked (doesn't actually exist on a server) and so attempts to do server-side operations with this resource should fail. | |
T | Posted [get] |
The posted resource, ready to be referenced. | |
Type | UnderlyingType [get] |
Get the runtime type of the resource that an instance will inject. | |
T | Unposted [get] |
The unPOSTed resource definition. | |
A class containing a resource that can be Posted with dependencies.
Static class to facilitate creation of strongly typed DisposableResources without the need to specify a type parameter.
T | The type of resource contained. |
T | : | IAPIResource |
Definition at line 49 of file InjectableResource[T].cs.
|
inline |
Create a new injectable resource.
unPOSTedResource | The resource to be Posted at injection time. |
Definition at line 94 of file InjectableResource[T].cs.
|
inline |
Create a new injectable resource with some data to upload at injection time.
unPOSTedResource | The resource to be Posted at injection time. |
data | The data to upload at Post time. |
Definition at line 106 of file InjectableResource[T].cs.
|
inlinestatic |
Static method for creating wrapping a resource in a DisposableResource.Create container (where the type parameter can be inferred).
T | The type of resource being made disposable. |
resource | An unPOSTed valid resource that is ready to be POSTed |
mocked | Whether to create this as a mocked resource, meaning it will not actually be posted against a live server, it will simply be given a fake id. |
T | : | IAPIResource |
Definition at line 188 of file InjectableResource[T].cs.
|
inlinestatic |
Static method for creating wrapping a resource in a DisposableResource.Create container (where the type parameter can be inferred).
T | The type of resource being made disposable. |
resource | An unPOSTed valid resource that is ready to be POSTed |
data | The data to be uploaded against the resource. |
mocked | Whether to create this as a mocked resource, meaning it will not actually be posted against a live server, it will simply be given a fake id. |
T | : | IAPIResource_WithDataEndpoint |
Definition at line 202 of file InjectableResource[T].cs.
|
get |
A reference to the unPOSTed resource (i.e. an inlined reference).
Definition at line 68 of file InjectableResource[T].cs.
|
get |
A reference to the posted resource.
Definition at line 64 of file InjectableResource[T].cs.
|
getset |
If true, the resource is mocked (doesn't actually exist on a server) and so attempts to do server-side operations with this resource should fail.
Definition at line 55 of file InjectableResource[T].cs.
|
get |
The posted resource, ready to be referenced.
Definition at line 61 of file InjectableResource[T].cs.
|
get |
Get the runtime type of the resource that an instance will inject.
Definition at line 71 of file InjectableResource[T].cs.
|
get |
The unPOSTed resource definition.
Definition at line 58 of file InjectableResource[T].cs.