C# Client Library
A C# Client Library for the AnalyzeRe REST API
AnalyzeRe.ExtensionMethods Class Reference

Provides the REST request methods available to data endpoints. More...

Static Public Member Functions

static BackAllocations back_allocations_blocking (this IAPIResourceView thisView, string source_id, PollingOptions pollingOptions)
 Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static BackAllocations back_allocations_blocking (this IAPIResourceView thisView, string source_id)
 Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static BackAllocations back_allocations_blocking (this IAPIResourceView thisView, string source_id, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
back_allocations_blocking(IAPIResourceView,string,PollingOptions)

Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static T Change< T, TProperty > (this T obj, Expression< Func< T, TProperty >> propertyExpression, TProperty newValue)
 Changes the specified property on the object (using reflection) and then returns the modified object. More...
 
static CoMetrics co_metrics_blocking< T > (this IAPIResourceView thisView, ProbabilityWindow range, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null)
 Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static List< CoMetricsco_metrics_blocking< T > (this IAPIResourceView thisView, IEnumerable< ProbabilityWindow > ranges, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null)
 Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static CoMetrics co_metrics_blocking< T > (this IAPIResourceView thisView, double probability, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null)
 Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static List< CoMetricsco_metrics_blocking< T > (this IAPIResourceView thisView, List< double > probabilities, IReference< T > component, CoMetricsOptions options, PollingOptions pollingOptions=null)
 Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static CoMetrics co_metrics_blocking< T > (this IAPIResourceView thisView, double probability, IReference< T > component, string filter=null, Perspective perspective=null, string currency=null, string component_filter=null, Perspective component_perspective=null, bool?include_primary_metrics=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static List< CoMetricsco_metrics_blocking< T > (this IAPIResourceView thisView, List< double > probabilities, IReference< T > component, string filter=null, Perspective perspective=null, string currency=null, string component_filter=null, Perspective component_perspective=null, bool?include_primary_metrics=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,IEnumerable<ProbabilityWindow>,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static long Count< T > (this APITypes.IResourceCollection< T > collection, IEnumerable< Parameter > parameters=null, int?timeout=null)
 Get the number of items in this collection. More...
 
static T DeepCopy< T > (this T obj)
 Attempts to make a deep copy of this object by serializing it and then deserializing it to a new object.

See also
ShallowCopy<T>

for a faster, shallow copy method. More...

 
static void Delete (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Requests for the server to delete the specified object from its resource collection. More...
 
static object Delete (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Requests for the server to delete the specified object from its resource collection. More...
 
static T Delete< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Requests for the server to delete the specified object from its resource collection. More...
 
static ExceedanceProbability exceedance_probability_blocking (this IAPIResourceView thisView, double threshold, string filter=null, Perspective perspective=null, bool?inclusive_threshold=null, string threshold_currency=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
exceedance_probability_blocking(IAPIResourceView,double,ExceedanceProbabilityOptions,PollingOptions)

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static List< ExceedanceProbabilityexceedance_probability_blocking (this IAPIResourceView thisView, List< double > thresholds, string filter=null, Perspective perspective=null, bool?inclusive_threshold=null, string threshold_currency=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
exceedance_probability_blocking(IAPIResourceView,IEnumerable<double>,ExceedanceProbabilityOptions,PollingOptions)

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static ExceedanceProbability exceedance_probability_blocking (this IAPIResourceView thisView, double threshold, ExceedanceProbabilityOptions options, PollingOptions pollingOptions=null)
 Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static List< ExceedanceProbabilityexceedance_probability_blocking (this IAPIResourceView thisView, IEnumerable< double > thresholds, ExceedanceProbabilityOptions options, PollingOptions pollingOptions=null)
 Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static double expected_loss (this IAPIResourceView thisView, MetricsOptions options=null)
 Returns the Expected Loss, which is equivalent to requesting the mean value of the tail_metrics distribution with a probability of 1.0. More...
 
static double expected_loss (this IAPIResourceView thisView, string filter=null, Perspective perspective=null, string currency=null, AggregationMethod?aggregation_method=null)
 Obsolete.

See also
expected_loss(IAPIResourceView,MetricsOptions)

Equivalent to requesting the mean value of the tail_metrics with a probability of 1.0. More...

 
static object Get (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. More...
 
static O Get< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. More...
 
static T Get_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified. More...
 
static T GetItem< T > (this APITypes.IResourceCollection< T > collection, string id, IEnumerable< Parameter > parameters=null, int?timeout=null)
 Performs a GET request for a specific resource in this collection. More...
 
static ICollectionResponse< T > GetItems< T > (this APITypes.IResourceCollection< T > collection, IEnumerable< string > ids, IEnumerable< Parameter > parameters=null, int?timeout=null)
 Searches this collection for a list of resource ids and returns a collection response containing all items with an id from the list. See API.Parameters.Ids for more details. More...
 
static object GetSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a GET on a sub-resource of the current resource. Requires the id property to be specified. More...
 
static T GetSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a GET on a sub-resource of the current resource. Requires the id property to be specified. More...
 
static ICollectionResponse< T > List< T > (this APITypes.IResourceCollection< T > collection, long offset, long limit, IEnumerable< Parameter > parameters=null, int?timeout=null)
 Performs a GET request to list the collection at this endpoint. More...
 
static T PollUntilReady< T > (this T resource, PollingOptions pollingOptions=null)
 Poll the IStoredAPIResource_WithStatus.status of a resource until it is TaskStatus.Success. Once a IStoredAPIResource_WithStatus has been created and is being processed, this method will continuously request the IStoredAPIResource_WithStatus.status of the object. Polling behaviour is based on the pollingOptions specified. Returns once the object is ready to be used (status=TaskStatus.Success). More...
 
static object Post (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type. More...
 
static O Post< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a POST on the current resource, with the expectation that the server will respond with the object that was posted. More...
 
static T Post< T > (this T obj, string csv_data, int?timeout=null, Parameters upload_parameters=null)
 POST this Resource, along with it's CSV data. More...
 
static T Post< T > (this APITypes.IResourceCollection< T > collection, T item, IEnumerable< Parameter > parameters=null, int?timeout=null)
 Performs a POST request to add a specific resource to this collection. More...
 
static T Post_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type. More...
 
static object PostSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters, object data, int?timeout=null)
 POSTs some data to a sub-resource of the current resource. More...
 
static T PostSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters, object data, int?timeout=null)
 POSTs some data to a sub-resource of the current resource. More...
 
static object Put (this IAPIResource obj, Type deserializeType, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type. More...
 
static O Put< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a PUT on the current resource, with the expectation that the server will respond with the updated object. More...
 
static T Put_AsType< T > (this IAPIResource obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type. More...
 
static object PutSubResource (this IAPIResource obj, Type deserializeType, string subResource, IEnumerable< Parameter > requestParameters, object data, int?timeout=null)
 Performs a PUT of some data on a sub-resource of the current resource. More...
 
static T PutSubResource< T > (this IAPIResource obj, string subResource, IEnumerable< Parameter > requestParameters, object data, int?timeout=null)
 Performs a PUT of some data on a sub-resource of the current resource. More...
 
static O Save< O > (this O obj, IEnumerable< Parameter > requestParameters=null, int?timeout=null)
 Calls either the POST object if the current resource is new, or PUT if the current resource already has an id. More...
 
static T ShallowCopy< T > (this T obj)
 Makes a copy of this object. More...
 
static TailMetrics tail_metrics_blocking (this IAPIResourceView thisView, double probability, MetricsOptions options, PollingOptions pollingOptions=null)
 Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static TailMetrics tail_metrics_blocking (this IAPIResourceView thisView, double probability, string filter=null, Perspective perspective=null, string currency=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
tail_metrics_blocking(IAPIResourceView,double,MetricsOptions,PollingOptions)

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static List< TailMetricstail_metrics_blocking (this IAPIResourceView thisView, IEnumerable< double > probabilities, MetricsOptions options, PollingOptions pollingOptions=null)
 Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static List< TailMetricstail_metrics_blocking (this IAPIResourceView thisView, List< double > probabilities, string filter=null, Perspective perspective=null, string currency=null, AggregationMethod?aggregation_method=null, bool?secondary_uncertainty=null, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
 Obsolete.

See also
tail_metrics_blocking(IAPIResourceView,IEnumerable<double>,MetricsOptions,PollingOptions)

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...

 
static IReference< T > ToReference< T > (this T obj, bool stronglyTyped=false)
 Converts this IAPIResource object into a strongly typed reference to that object. More...
 
static double tvar (this IAPIResourceView thisView, double probability, MetricsOptions options=null)
 Returns the Tail Value at Risk (TVaR), which is equivalent to requesting the mean value of the tail_metrics distribution at a given probability. More...
 
static double tvar (this IAPIResourceView thisView, double probability, string filter=null, Perspective perspective=null, string currency=null, AggregationMethod?aggregation_method=null)
 Obsolete.

See also
tvar(IAPIResourceView,double,MetricsOptions)

Returns only the mean value of the tail_metrics at the specified probability. More...

 
static double var (this IAPIResourceView thisView, double probability, MetricsOptions options=null)
 Returns the Value at Risk (VaR), which is equivalent to requesting the minimum value of the tail_metrics distribution at a given probability. More...
 
static double var (this IAPIResourceView thisView, double probability, string filter=null, Perspective perspective=null, string currency=null, AggregationMethod?aggregation_method=null)
 Obsolete.

See also
var(IAPIResourceView,double,MetricsOptions)

Returns only the min value of the tail_metrics at the specified probability. More...

 
static WindowMetrics window_metrics_blocking (this IAPIResourceView thisView, ProbabilityWindow range, MetricsOptions options, PollingOptions pollingOptions=null)
 Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 
static List< WindowMetricswindow_metrics_blocking (this IAPIResourceView thisView, IEnumerable< ProbabilityWindow > ranges, MetricsOptions options, PollingOptions pollingOptions=null)
 Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception. More...
 

Detailed Description

Provides the REST request methods available to data endpoints.

Extension Methods with an inferred response type

Adds the contained extension method to all objects implementing the IAPIResource interface.

Adds the contained extension method to all objects implementing the IAPIType interface.

Useful extension methods for IAPIResourceView classes

Definition at line 7 of file ExtensionMethods.IAPIResource_WithDataEndpoint.cs.

Member Function Documentation

static BackAllocations AnalyzeRe.ExtensionMethods.back_allocations_blocking ( this IAPIResourceView  thisView,
string  source_id,
PollingOptions  pollingOptions 
)
inlinestatic

Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
source_idThe id of the component loss source to back-allocate the YELT to.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The URL of the YELT back-allocated to the specified source.

Definition at line 177 of file ExtensionMethods.IAPIResourceView.cs.

static BackAllocations AnalyzeRe.ExtensionMethods.back_allocations_blocking ( this IAPIResourceView  thisView,
string  source_id 
)
inlinestatic

Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
source_idThe id of the component loss source to back-allocate the YELT to.
Returns
The URL of the YELT back-allocated to the specified source.

TODO: Remove this duplicate signature and make the above pollingOptions optional once the deprecated version of this method is deleted and there's no longer ambiguity

Definition at line 193 of file ExtensionMethods.IAPIResourceView.cs.

static BackAllocations AnalyzeRe.ExtensionMethods.back_allocations_blocking ( this IAPIResourceView  thisView,
string  source_id,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
back_allocations_blocking(IAPIResourceView,string,PollingOptions)

Returns back-allocations - but if back-allocations aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
source_idThe id of the component loss source to back-allocate the YELT to.
minPollIntervalMinimum time between status requests. (in seconds) (Default: No min time.)
maxPollIntervalMaximum time between status requests. (in seconds) (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The URL of the YELT back-allocated to the specified source.

Definition at line 308 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static T AnalyzeRe.ExtensionMethods.Change< T, TProperty > ( this T  obj,
Expression< Func< T, TProperty >>  propertyExpression,
TProperty  newValue 
)
inlinestatic

Changes the specified property on the object (using reflection) and then returns the modified object.

Template Parameters
TThe type of object modified and returned.
TPropertyThe type of the property being modified.
Parameters
objThe object (which implements AnalyzeRe.IAPIType) to modify.
propertyExpressionAn expression identifying the property to modify.
newValueThe value to assign to the property.
Returns
The object the method was invoked on.
Exceptions
ArgumentExceptionAn invalid property expression or replacement value was supplied.
Type Constraints
T :IAPIType 

Definition at line 62 of file ExtensionMethods.IAPIType.cs.

static CoMetrics AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
ProbabilityWindow  range,
IReference< T >  component,
CoMetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Template Parameters
TThe type of the component referenced.
Parameters
thisViewThe resource on which to perform this request.
rangeThe probability range for which to compute co-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The co-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 99 of file ExtensionMethods.IAPIResourceView.cs.

static List<CoMetrics> AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
IEnumerable< ProbabilityWindow ranges,
IReference< T >  component,
CoMetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Template Parameters
TThe type of the component referenced.
Parameters
thisViewThe resource on which to perform this request.
rangesThe probability ranges for which to compute co-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The co-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 121 of file ExtensionMethods.IAPIResourceView.cs.

static CoMetrics AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
double  probability,
IReference< T >  component,
CoMetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Template Parameters
TThe type of the component referenced.
Parameters
thisViewThe resource on which to perform this request.
probabilityThe probability for which to compute co-tail-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The co-tail-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 169 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static List<CoMetrics> AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
List< double >  probabilities,
IReference< T >  component,
CoMetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Template Parameters
TThe type of the component referenced.
Parameters
thisViewThe resource on which to perform this request.
probabilitiesThe probability ranges for which to compute co-tail-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The co-tail-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 193 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static CoMetrics AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
double  probability,
IReference< T >  component,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
string  component_filter = null,
Perspective  component_perspective = null,
bool?  include_primary_metrics = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,ProbabilityWindow,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
probabilityThe probability (1 / return_period) at which to calculate the co-tail-metrics.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
filter(Optional - Default: null) The name of the loss filter to apply before computing metrics.
perspective(Optional - Default: null) The loss perspective for which metrics should be computed.
currency(Optional - Default: null) The currency to convert co-tail-metrics results to. If not specified, they will be returned in the view's target currency.
component_filter(Optional - Default: same as filter) The filter to use for the component co_metrics calculation.
component_perspective(Optional - Default: same as perspective) The perspective to use for the component co_metrics calculation.
include_primary_metrics(Optional - Default: false) Set to true to also compute and retrieve the primary metrics.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests. (in seconds) (Default: No min time.)
maxPollIntervalMaximum time between status requests. (in seconds) (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The co-tail-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 234 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static List<CoMetrics> AnalyzeRe.ExtensionMethods.co_metrics_blocking< T > ( this IAPIResourceView  thisView,
List< double >  probabilities,
IReference< T >  component,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
string  component_filter = null,
Perspective  component_perspective = null,
bool?  include_primary_metrics = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
co_metrics_blocking<T>(IAPIResourceView,IEnumerable<ProbabilityWindow>,IReference<T>,CoMetricsOptions,PollingOptions)

Returns co-tail-metrics - but if co-tail-metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
probabilitiesProbabilities, same as in normal co_metrics request.
componentA reference to the component LayerView or PortfolioView to compute co-tail-metrics against.
filter(Optional - Default: null) The name of the loss filter to apply before computing metrics.
perspective(Optional - Default: null) The loss perspective for which metrics should be computed.
currency(Optional - Default: null) The currency to convert co-tail-metrics results to. If not specified, they will be returned in the view's target currency.
component_filter(Optional - Default: same as filter) The filter to use for the component co_metrics calculation.
component_perspective(Optional - Default: same as perspective) The perspective to use for the component co_metrics calculation.
include_primary_metrics(Optional - Default: false) Set to true to also compute and retrieve the primary metrics.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests. (in seconds) (Default: No min time.)
maxPollIntervalMaximum time between status requests. (in seconds) (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The co-tail-metrics at the specified probability.
Type Constraints
T :IAPIResourceView 

Definition at line 280 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static long AnalyzeRe.ExtensionMethods.Count< T > ( this APITypes.IResourceCollection< T >  collection,
IEnumerable< Parameter >  parameters = null,
int?  timeout = null 
)
static

Get the number of items in this collection.

Parameters
collectionThe collection from which to get an item.
parameters(Optional) Additional REST parameters to include with the GET request.
timeout(Optional) The timeout before the request fails.
Returns
A count of items on the server in this collection.
Type Constraints
T :IAPIType 
T :List 
T :collection 
T :parameters 
T :timeout 
T :meta.total_count 
static T AnalyzeRe.ExtensionMethods.DeepCopy< T > ( this T  obj)
inlinestatic

Attempts to make a deep copy of this object by serializing it and then deserializing it to a new object.

See also
ShallowCopy<T>

for a faster, shallow copy method.

Template Parameters
TThe type of the object.
Parameters
objThe object.
Returns
A strongly typed deep of this object.
Type Constraints
T :IAPIType 

Definition at line 42 of file ExtensionMethods.IAPIType.cs.

static void AnalyzeRe.ExtensionMethods.Delete ( this IAPIResource  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Requests for the server to delete the specified object from its resource collection.

Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).

Definition at line 147 of file ExtensionMethods.Rest.cs.

static object AnalyzeRe.ExtensionMethods.Delete ( this IAPIResource  obj,
Type  deserializeType,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Requests for the server to delete the specified object from its resource collection.

Parameters
deserializeTypeThe expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request.
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the delete request on the current resource, deserialized to the specified type T.

Definition at line 286 of file ExtensionMethods.Rest.cs.

static T AnalyzeRe.ExtensionMethods.Delete< T > ( this IAPIResource  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Requests for the server to delete the specified object from its resource collection.

Template Parameters
TThe expected type of the request response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the delete request on the current resource, deserialized to the specified type T.

Definition at line 133 of file ExtensionMethods.Rest.cs.

static ExceedanceProbability AnalyzeRe.ExtensionMethods.exceedance_probability_blocking ( this IAPIResourceView  thisView,
double  threshold,
string  filter = null,
Perspective  perspective = null,
bool?  inclusive_threshold = null,
string  threshold_currency = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
exceedance_probability_blocking(IAPIResourceView,double,ExceedanceProbabilityOptions,PollingOptions)

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
thresholdThreshold, same as in normal exceedance_probability request.
filterFilter, same as in normal tail_metrics request.
perspectivePerspective, same as in normal tail_metrics requests.
inclusive_threshold(Optional - Default: null) Set to true to calculate the probability that a loss is greater than OR EQUAL TO the threshold.
threshold_currency(Optional - Default: null) The currency that the threshold supplied is in. If not specified, the threshold is assumed to be in the target currency of this view.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests (in seconds). (Default: No min time.)
maxPollIntervalMaximum time between status requests (in seconds). (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The exceedance probability for the given loss.

Definition at line 103 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static List<ExceedanceProbability> AnalyzeRe.ExtensionMethods.exceedance_probability_blocking ( this IAPIResourceView  thisView,
List< double >  thresholds,
string  filter = null,
Perspective  perspective = null,
bool?  inclusive_threshold = null,
string  threshold_currency = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
exceedance_probability_blocking(IAPIResourceView,IEnumerable<double>,ExceedanceProbabilityOptions,PollingOptions)

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
thresholdsThresholds, same as in normal exceedance_probability request.
filterFilter, same as in normal tail_metrics request.
perspectivePerspective, same as in normal tail_metrics requests.
inclusive_threshold(Optional - Default: null) Set to true to calculate the probability that a loss is greater than OR EQUAL TO the threshold.
threshold_currency(Optional - Default: null) The currency that the threshold supplied is in. If not specified, the threshold is assumed to be in the target currency of this view.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests (in seconds). (Default: No min time.)
maxPollIntervalMaximum time between status requests (in seconds). (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The exceedance probability for the given loss.

Definition at line 140 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static ExceedanceProbability AnalyzeRe.ExtensionMethods.exceedance_probability_blocking ( this IAPIResourceView  thisView,
double  threshold,
ExceedanceProbabilityOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
thresholdThe threshold at which to calculate the exceedance probability.
optionsA set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The exceedance probability for the given loss.

Definition at line 142 of file ExtensionMethods.IAPIResourceView.cs.

static List<ExceedanceProbability> AnalyzeRe.ExtensionMethods.exceedance_probability_blocking ( this IAPIResourceView  thisView,
IEnumerable< double >  thresholds,
ExceedanceProbabilityOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns exceedance probability - but if the simulation isn't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
thresholdsThe thresholds at which to calculate the exceedance probability.
optionsA set of options which can be used to change the threshold behaviour or compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The exceedance probability for the given loss.

Definition at line 161 of file ExtensionMethods.IAPIResourceView.cs.

static double AnalyzeRe.ExtensionMethods.expected_loss ( this IAPIResourceView  thisView,
MetricsOptions  options = null 
)
inlinestatic

Returns the Expected Loss, which is equivalent to requesting the mean value of the tail_metrics distribution with a probability of 1.0.

Parameters
thisViewThe resource on which to perform this request.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
Returns
The Expected Loss (distribution mean at probability = 1.0)

Definition at line 208 of file ExtensionMethods.IAPIResourceView.cs.

static double AnalyzeRe.ExtensionMethods.expected_loss ( this IAPIResourceView  thisView,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
AggregationMethod aggregation_method = null 
)
inlinestatic

Obsolete.

See also
expected_loss(IAPIResourceView,MetricsOptions)

Equivalent to requesting the mean value of the tail_metrics with a probability of 1.0.

Parameters
thisViewThe object on which to make this request.
filter(Optional - Default: null) The name of the loss filter to apply before computing metrics.
perspective(Optional - Default: null) The loss perspective for which metrics should be computed.
currency(Optional - Default: null) The currency to convert expected loss to. If not specified, they will be returned in the view's target currency.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).

Definition at line 334 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static object AnalyzeRe.ExtensionMethods.Get ( this IAPIResource  obj,
Type  deserializeType,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.

Parameters
deserializeTypeThe expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request.
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the get request on the current resource, deserialized to the specified type T.

Definition at line 166 of file ExtensionMethods.Rest.cs.

static O AnalyzeRe.ExtensionMethods.Get< O > ( this O  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.

Template Parameters
O(Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the get request on the current resource, deserialized to the specified type O.
Type Constraints
O :IAPIResource 

Definition at line 17 of file ExtensionMethods.Rest.InferredType.cs.

static T AnalyzeRe.ExtensionMethods.Get_AsType< T > ( this IAPIResource  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a GET on the current resource to return the equivalent resource stored on the server. Requires the id property to be specified.

Template Parameters
TThe expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the get request on the current resource, deserialized to the specified type T.

Definition at line 20 of file ExtensionMethods.Rest.cs.

static T AnalyzeRe.ExtensionMethods.GetItem< T > ( this APITypes.IResourceCollection< T >  collection,
string  id,
IEnumerable< Parameter >  parameters = null,
int?  timeout = null 
)
inlinestatic

Performs a GET request for a specific resource in this collection.

Parameters
collectionThe collection from which to get an item.
idThe id of the resource to retrieve.
parameters(Optional) Rest parameters to include with the GET request.
timeout(Optional) The timeout before the request fails.
Returns
The data previously uploaded to this endpoint.
Type Constraints
T :IAPIType 

Definition at line 17 of file ExtensionMethods.Rest.ICollection[T].cs.

static ICollectionResponse<T> AnalyzeRe.ExtensionMethods.GetItems< T > ( this APITypes.IResourceCollection< T >  collection,
IEnumerable< string >  ids,
IEnumerable< Parameter >  parameters = null,
int?  timeout = null 
)
inlinestatic

Searches this collection for a list of resource ids and returns a collection response containing all items with an id from the list. See API.Parameters.Ids for more details.

Parameters
collectionThe collection from which to get an item.
idsThe ids of the resources to retrieve.
parameters(Optional) Rest parameters to include with the collection GET request.
timeout(Optional) The timeout before the request fails.
Returns
The data previously uploaded to this endpoint.

This function will automatically set the "limit" parameter to match the number of ids requested, but the server may impose a hard limit on the number of ids that can be requested at one time. See API.Parameters.Ids for more details.

Type Constraints
T :IAPIType 

Definition at line 38 of file ExtensionMethods.Rest.ICollection[T].cs.

static object AnalyzeRe.ExtensionMethods.GetSubResource ( this IAPIResource  obj,
Type  deserializeType,
string  subResource,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a GET on a sub-resource of the current resource. Requires the id property to be specified.

Parameters
deserializeTypeThe expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request.
objThe current resource.
subResourceThe path to the sub-resource from the current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the get request on the current resource, deserialized to the specified type T.

Definition at line 185 of file ExtensionMethods.Rest.cs.

static T AnalyzeRe.ExtensionMethods.GetSubResource< T > ( this IAPIResource  obj,
string  subResource,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a GET on a sub-resource of the current resource. Requires the id property to be specified.

Template Parameters
TThe expected type of the resource get request response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe current resource.
subResourceThe path to the sub-resource from the current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the get request on the current resource, deserialized to the specified type T.

Definition at line 38 of file ExtensionMethods.Rest.cs.

static ICollectionResponse<T> AnalyzeRe.ExtensionMethods.List< T > ( this APITypes.IResourceCollection< T >  collection,
long  offset,
long  limit,
IEnumerable< Parameter >  parameters = null,
int?  timeout = null 
)
inlinestatic

Performs a GET request to list the collection at this endpoint.

Parameters
collectionThe collection from which to get an item.
offsetThe number of results to skip before starting to return results.
limitThe maximum number of results to return.
parameters(Optional) Additional REST parameters to include with the GET request.
timeout(Optional) The timeout before the request fails.
Returns
The data previously uploaded to this endpoint.
Type Constraints
T :IAPIType 

Definition at line 58 of file ExtensionMethods.Rest.ICollection[T].cs.

static T AnalyzeRe.ExtensionMethods.PollUntilReady< T > ( this T  resource,
PollingOptions  pollingOptions = null 
)
inlinestatic

Poll the IStoredAPIResource_WithStatus.status of a resource until it is TaskStatus.Success. Once a IStoredAPIResource_WithStatus has been created and is being processed, this method will continuously request the IStoredAPIResource_WithStatus.status of the object. Polling behaviour is based on the pollingOptions specified. Returns once the object is ready to be used (status=TaskStatus.Success).

Parameters
resourceThe resource to monitor. After invoking this function, this resource's IStoredAPIResource_WithStatus.status and IStoredAPIResource_WithStatus.status_message properties will be updated to reflect the last polled status of the resource.
pollingOptionsControls the polling behaviour.
Exceptions
APIRequestExceptionIf the final status is not "Success"
NotWaitingExceptionIf the pollingOptions PollingOptions.MaxPollTotalTime is exceeded.
Returns
The original resource reference supplied, with its IStoredAPIResource_WithStatus.status and IStoredAPIResource_WithStatus.status_message properties updated.
Type Constraints
T :IStoredAPIResource_WithStatus 

Definition at line 46 of file ExtensionMethods.IStoredAPIResource_WithStatus.cs.

static object AnalyzeRe.ExtensionMethods.Post ( this IAPIResource  obj,
Type  deserializeType,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type.

Parameters
deserializeTypeThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 205 of file ExtensionMethods.Rest.cs.

static O AnalyzeRe.ExtensionMethods.Post< O > ( this O  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a POST on the current resource, with the expectation that the server will respond with the object that was posted.

Template Parameters
O(Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type O.
Type Constraints
O :IAPIResource 

Definition at line 30 of file ExtensionMethods.Rest.InferredType.cs.

static T AnalyzeRe.ExtensionMethods.Post< T > ( this T  obj,
string  csv_data,
int?  timeout = null,
Parameters  upload_parameters = null 
)
inlinestatic

POST this Resource, along with it's CSV data.

Parameters
objThe endpoint on which to make this request.
csv_dataThe csv_data to attach to this resource.
timeoutOptional - The desired POST request timeout (in milliseconds).
upload_parameters(Optional) The upload parameters to use.
Returns
The resulting resource that was posted.
Type Constraints
T :IAPIResource_WithDataEndpoint 

Definition at line 15 of file ExtensionMethods.IAPIResource_WithDataEndpoint.cs.

static T AnalyzeRe.ExtensionMethods.Post< T > ( this APITypes.IResourceCollection< T >  collection,
item,
IEnumerable< Parameter >  parameters = null,
int?  timeout = null 
)
inlinestatic

Performs a POST request to add a specific resource to this collection.

Parameters
collectionThe collection from which to get an item.
itemThe item to post to this collection.
parameters(Optional) Rest parameters to include with the GET request.
timeout(Optional) The timeout before the request fails.
Returns
The data previously uploaded to this endpoint.
Type Constraints
T :IAPIType 

Definition at line 85 of file ExtensionMethods.Rest.ICollection[T].cs.

static T AnalyzeRe.ExtensionMethods.Post_AsType< T > ( this IAPIResource  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a POST on the current resource, returning the server response deserialized to a new object of the specified type.

Template Parameters
TThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 56 of file ExtensionMethods.Rest.cs.

static object AnalyzeRe.ExtensionMethods.PostSubResource ( this IAPIResource  obj,
Type  deserializeType,
string  subResource,
IEnumerable< Parameter >  requestParameters,
object  data,
int?  timeout = null 
)
inlinestatic

POSTs some data to a sub-resource of the current resource.

Parameters
deserializeTypeThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
objThe resource whose subResource we are navigating to.
subResourceThe path to the sub-resource from the current resource.
requestParametersAdditional parameters to include in the request.
dataThe data to POST to the specified sub-resource.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 225 of file ExtensionMethods.Rest.cs.

static T AnalyzeRe.ExtensionMethods.PostSubResource< T > ( this IAPIResource  obj,
string  subResource,
IEnumerable< Parameter >  requestParameters,
object  data,
int?  timeout = null 
)
inlinestatic

POSTs some data to a sub-resource of the current resource.

Template Parameters
TThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe resource whose subResource we are navigating to.
subResourceThe path to the sub-resource from the current resource.
requestParametersAdditional parameters to include in the request.
dataThe data to POST to the specified sub-resource.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 75 of file ExtensionMethods.Rest.cs.

static object AnalyzeRe.ExtensionMethods.Put ( this IAPIResource  obj,
Type  deserializeType,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type.

Parameters
deserializeTypeThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the put request on the current resource, deserialized to the specified type T.

Definition at line 246 of file ExtensionMethods.Rest.cs.

static O AnalyzeRe.ExtensionMethods.Put< O > ( this O  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a PUT on the current resource, with the expectation that the server will respond with the updated object.

Template Parameters
O(Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the put request on the current resource, deserialized to the specified type O.
Type Constraints
O :IAPIResource 

Definition at line 43 of file ExtensionMethods.Rest.InferredType.cs.

static T AnalyzeRe.ExtensionMethods.Put_AsType< T > ( this IAPIResource  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Perform a PUT on the current resource, returning the server response deserialized to a new object of the specified type.

Template Parameters
TThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the put request on the current resource, deserialized to the specified type T.

Definition at line 95 of file ExtensionMethods.Rest.cs.

static object AnalyzeRe.ExtensionMethods.PutSubResource ( this IAPIResource  obj,
Type  deserializeType,
string  subResource,
IEnumerable< Parameter >  requestParameters,
object  data,
int?  timeout = null 
)
inlinestatic

Performs a PUT of some data on a sub-resource of the current resource.

Parameters
deserializeTypeThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
objThe resource whose subResource we are navigating to.
subResourceThe path to the sub-resource from the current resource.
requestParametersAdditional parameters to include in the request.
dataThe data to PUT to the specified sub-resource.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 266 of file ExtensionMethods.Rest.cs.

static T AnalyzeRe.ExtensionMethods.PutSubResource< T > ( this IAPIResource  obj,
string  subResource,
IEnumerable< Parameter >  requestParameters,
object  data,
int?  timeout = null 
)
inlinestatic

Performs a PUT of some data on a sub-resource of the current resource.

Template Parameters
TThe expected type of the resource post response. Use 'IRestResponse' to skip deserializing the request.
Parameters
objThe resource whose subResource we are navigating to.
subResourceThe path to the sub-resource from the current resource.
requestParametersAdditional parameters to include in the request.
dataThe data to PUT to the specified sub-resource.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the post request on the current resource, deserialized to the specified type T.

Definition at line 114 of file ExtensionMethods.Rest.cs.

static O AnalyzeRe.ExtensionMethods.Save< O > ( this O  obj,
IEnumerable< Parameter >  requestParameters = null,
int?  timeout = null 
)
inlinestatic

Calls either the POST object if the current resource is new, or PUT if the current resource already has an id.

Template Parameters
O(Automatically Inferred) The type of the current resource, which is also the expected type of the resource request response.
Parameters
objThe current resource.
requestParametersOptional - Additional parameters to include in the request.
timeoutOptional - The desired request timeout (in milliseconds).
Returns
The server's response to the request on the current resource, deserialized to the specified type O.
Type Constraints
O :IAPIResource 

Definition at line 56 of file ExtensionMethods.Rest.InferredType.cs.

static T AnalyzeRe.ExtensionMethods.ShallowCopy< T > ( this T  obj)
inlinestatic

Makes a copy of this object.

Template Parameters
TThe type of the object.
Parameters
objThe object.
Returns
A strongly typed copy of this object.
Type Constraints
T :IAPIType 

Definition at line 31 of file ExtensionMethods.IAPIType.cs.

static TailMetrics AnalyzeRe.ExtensionMethods.tail_metrics_blocking ( this IAPIResourceView  thisView,
double  probability,
MetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
probabilityThe probability at which to compute tail metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The tail_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 27 of file ExtensionMethods.IAPIResourceView.cs.

static TailMetrics AnalyzeRe.ExtensionMethods.tail_metrics_blocking ( this IAPIResourceView  thisView,
double  probability,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
tail_metrics_blocking(IAPIResourceView,double,MetricsOptions,PollingOptions)

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
probabilityProbability, same as in normal tail_metrics request.
filterFilter, same as in normal tail_metrics request.
perspectivePerspective, same as in normal tail_metrics requests.
currencyCurrency, same as in normal tail_metrics requests.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests. (in seconds) (Default: No min time.)
maxPollIntervalMaximum time between status requests. (in seconds) (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The tail_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 37 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static List<TailMetrics> AnalyzeRe.ExtensionMethods.tail_metrics_blocking ( this IAPIResourceView  thisView,
IEnumerable< double >  probabilities,
MetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
probabilitiesThe probabilities at which to compute tail metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The tail_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 44 of file ExtensionMethods.IAPIResourceView.cs.

static List<TailMetrics> AnalyzeRe.ExtensionMethods.tail_metrics_blocking ( this IAPIResourceView  thisView,
List< double >  probabilities,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
AggregationMethod aggregation_method = null,
bool?  secondary_uncertainty = null,
double  minPollInterval = 0,
double  maxPollInterval = Double.MaxValue,
double  maxPollTotalTime = Double.MaxValue 
)
inlinestatic

Obsolete.

See also
tail_metrics_blocking(IAPIResourceView,IEnumerable<double>,MetricsOptions,PollingOptions)

Returns tail metrics - but if tail metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe object on which to make this request.
probabilitiesProbabilities, same as in normal tail_metrics request.
filterFilter, same as in normal tail_metrics request.
perspectivePerspective, same as in normal tail_metrics requests.
currencyCurrency, same as in normal tail_metrics requests.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).
secondary_uncertainty(Optional - Default: null) Set to false to disable simulation with secondary uncertainty.
minPollIntervalMinimum time between status requests. (in seconds) (Default: No min time.)
maxPollIntervalMaximum time between status requests. (in seconds) (Default: No max time.)
maxPollTotalTimeMaximum polling time before raising a TimeoutException (in seconds). (Default: No timeout)
Returns
The tail_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 68 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static IReference<T> AnalyzeRe.ExtensionMethods.ToReference< T > ( this T  obj,
bool  stronglyTyped = false 
)
inlinestatic

Converts this IAPIResource object into a strongly typed reference to that object.

Template Parameters
TThe type of the IAPIResource object.
Parameters
objThe IAPIResource object.
stronglyTyped(Default True) Whether to ensure that the created reference type is the run-time type of the object (more expensive). If set to false, the reference type will simply be of the type T.
Returns
A strongly typed reference to this IAPIResource object.
Type Constraints
T :IAPIResource 

Definition at line 19 of file ExtensionMethods.Reference.cs.

static double AnalyzeRe.ExtensionMethods.tvar ( this IAPIResourceView  thisView,
double  probability,
MetricsOptions  options = null 
)
inlinestatic

Returns the Tail Value at Risk (TVaR), which is equivalent to requesting the mean value of the tail_metrics distribution at a given probability.

Returns only the mean value of the tail_metrics at the specified probability.

Parameters
thisViewThe resource on which to perform this request.
probabilityThe probability (1 / return_period) at which to calculate the tail_metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
Returns
The Tail Value at Risk (distribution mean) at the specified probability.

Definition at line 222 of file ExtensionMethods.IAPIResourceView.cs.

static double AnalyzeRe.ExtensionMethods.tvar ( this IAPIResourceView  thisView,
double  probability,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
AggregationMethod aggregation_method = null 
)
inlinestatic

Obsolete.

See also
tvar(IAPIResourceView,double,MetricsOptions)

Returns only the mean value of the tail_metrics at the specified probability.

Parameters
thisViewThe object on which to make this request.
probabilityThe probability (1 / return_period) at which to calculate the tail_metrics.
filter(Optional - Default: null) The name of the loss filter to apply before computing metrics.
perspective(Optional - Default: null) The loss perspective for which metrics should be computed.
currency(Optional - Default: null) The currency to convert TVaR to. If not specified, they will be returned in the view's target currency.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).

Definition at line 357 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static double AnalyzeRe.ExtensionMethods.var ( this IAPIResourceView  thisView,
double  probability,
MetricsOptions  options = null 
)
inlinestatic

Returns the Value at Risk (VaR), which is equivalent to requesting the minimum value of the tail_metrics distribution at a given probability.

Parameters
thisViewThe resource on which to perform this request.
probabilityThe probability (1 / return_period) at which to calculate the tail_metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
Returns
The Value at Risk (distribution min) at the specified probability.

Definition at line 236 of file ExtensionMethods.IAPIResourceView.cs.

static double AnalyzeRe.ExtensionMethods.var ( this IAPIResourceView  thisView,
double  probability,
string  filter = null,
Perspective  perspective = null,
string  currency = null,
AggregationMethod aggregation_method = null 
)
inlinestatic

Obsolete.

See also
var(IAPIResourceView,double,MetricsOptions)

Returns only the min value of the tail_metrics at the specified probability.

Parameters
thisViewThe object on which to make this request.
probabilityThe probability (1 / return_period) at which to calculate the tail_metrics.
filter(Optional - Default: null) The name of the loss filter to apply before computing metrics.
perspective(Optional - Default: null) The loss perspective for which metrics should be computed.
currency(Optional - Default: null) The currency to convert VaR to. If not specified, they will be returned in the view's target currency.
aggregation_method(Optional - Default: null) Specifies the method of aggregating event occurrences in a trial year for computing different types of metrics (AEP or OEP).

Definition at line 380 of file ExtensionMethods.IAPIResourceView.Deprecated.cs.

static WindowMetrics AnalyzeRe.ExtensionMethods.window_metrics_blocking ( this IAPIResourceView  thisView,
ProbabilityWindow  range,
MetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
rangeThe probability range for which to compute window metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The window_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 62 of file ExtensionMethods.IAPIResourceView.cs.

static List<WindowMetrics> AnalyzeRe.ExtensionMethods.window_metrics_blocking ( this IAPIResourceView  thisView,
IEnumerable< ProbabilityWindow ranges,
MetricsOptions  options,
PollingOptions  pollingOptions = null 
)
inlinestatic

Returns window metrics - but if window metrics aren't ready (503 with retry-after), it blocks until they are returned, rather than throwing an exception.

Parameters
thisViewThe resource on which to perform this request.
rangesThe probability ranges for which to compute window metrics.
optionsA set of options which can be used to compute metrics net of various filters, loss perspectives, etc.
pollingOptionsDetermines the behaviour of the API when automatically retrying the request if the result is not yet available.
Returns
The window_metrics at the specified probability, filtered, if a filter was provided.

Definition at line 79 of file ExtensionMethods.IAPIResourceView.cs.


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