C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
SimulationResult.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.IO;
4
8using RestSharp;
9
11{
14 {
16 protected abstract T DefaultOptions { get; }
17
23
38 public string Get(T options = null, bool blocking = true, int? timeout = null,
40 {
41 ValidateOwnerHasId();
43 if (!blocking)
44 return Get(parameters, timeout ?? Int32.MaxValue);
45 return API.PollUntilReady(() => Get(parameters, timeout ?? Int32.MaxValue),
47 }
48
72 bool blocking = true, int? timeout = null, IEnumerable<Parameter> requestParameters = null)
73 {
74 ValidateOwnerHasId();
76 // If blocking, perform HEAD requests until the result reports that it is ready.
77 if (blocking)
78 {
79 API.PollUntilReady(() => Head(parameters, timeout ?? Int32.MaxValue),
81 }
82 return GetStream(consumeStream, parameters, timeout ?? Int32.MaxValue);
83 }
84
92 public IRestResponse Head(T options = null, int? timeout = null,
94 {
95 ValidateOwnerHasId();
97 return Head(parameters, timeout);
98 }
99 }
100}
Defines a new SimulationResult endpoint off the current resource.
T DefaultOptions
The default simulation options for the type T .
IRestResponse GetStream(Action< Stream > consumeStream, T options=null, bool blocking=true, int? timeout=null, IEnumerable< Parameter > requestParameters=null)
Performs a GET for this simulation result and streams the result to the specified handler,...
SimulationResult(IAPIResourceView owner, string relativePath)
Defines a new SimulationResult endpoint off the current resource.
IRestResponse Head(T options=null, int? timeout=null, IEnumerable< Parameter > requestParameters=null)
Perform a HEAD request for this simulation result. This can be used to determine whether the result i...
string Get(T options=null, bool blocking=true, int? timeout=null, IEnumerable< Parameter > requestParameters=null)
Performs a GET for this simulation result and returns the response as string.
Describes an additional data sub-resource available off a resource. Endpoint supports GET and PUT.
Describes a collection of resources which can be listed.
API methods / requests made available to the user.
Optional parameters which can be specified for all simulation result requests. Includes a variety of ...
Determines the behaviour of the API when automatically retrying a request whose result is not yet rea...
Helper class which makes it easier to build a set of request parameters.
RequestParameters AddParameters(IEnumerable< Parameter > collection)
Adds the specified parameters to this list and returns the list.
PortfolioView and LayerView interface.