C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
ExtensionMethods.IAPIResourceView.Deprecated.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
5
6// Disable warnings about snake_case function names in this method. While it goes against
7// C# best-practice, it's done intentionally to follow the API conventions closely.
8#pragma warning disable IDE1006
9
10namespace AnalyzeRe
11{
13 public static partial class ExtensionMethods
14 {
15 // TODO: Delete Deprecated Methods after phase-out period.
16 #region Deprecated Blocking Metrics Requests
30 [Obsolete("Please provide a ProbabilityWindow rather than a double tail-probability. " +
31 "This legacy method was less flexible and only returned the co-tail-metrics.")]
33 this IAPIResourceView thisView, double probability,
34 IReference<T> component, CoMetricsOptions options,
35 PollingOptions pollingOptions = null)
36 where T : IAPIResourceView
37 {
38 return co_metrics_blocking(thisView, ProbabilityWindow.Tail(probability), component, options, pollingOptions);
39 }
40
54 [Obsolete("Please provide a list of ProbabilityWindows rather than doubles. " +
55 "This legacy method was less flexible and only returned the co-tail-metrics.")]
56 public static List<CoMetrics> co_metrics_blocking<T>(
57 this IAPIResourceView thisView, List<double> probabilities,
58 IReference<T> component, CoMetricsOptions options,
59 PollingOptions pollingOptions = null)
60 where T : IAPIResourceView
61 {
62 return co_metrics_blocking(thisView, probabilities.Select(ProbabilityWindow.Tail), component, options, pollingOptions);
63 }
64
75 [Obsolete("This method has been replaced with an overload that uses a PollingOptions object. " +
76 "This legacy method was less flexible and only returned the co-tail-metrics.")]
78 this IAPIResourceView thisView, string source_id,
79 double minPollInterval = 0, double maxPollInterval = Double.MaxValue, double maxPollTotalTime = Double.MaxValue)
80 {
81 return API.PollUntilReady(() =>
82 thisView.back_allocations(source_id),
83 minPollInterval, maxPollInterval, maxPollTotalTime);
84 }
85 #endregion Deprecated Blocking Metrics Requests
86 }
87}
API methods / requests made available to the user.
Provides the REST request methods available to data endpoints.
static CoMetrics co_metrics_blocking< T >(this IAPIResourceView thisView, ProbabilityWindow range, IReference< T > component, CoMetricsOptions options=null, PollingOptions pollingOptions=null)
Returns co-metrics - but if co-metrics aren't ready (503 with retry-after), it blocks until they are ...
static BackAllocations back_allocations_blocking(this IAPIResourceView thisView, string source_id, double minPollInterval=0, double maxPollInterval=Double.MaxValue, double maxPollTotalTime=Double.MaxValue)
Obsolete. back_allocations_blocking(IAPIResourceView,String,PollingOptions)Returns back-allocations -...
The structure returned when requesting back-allocated metrics for a view.
Optional parameters which can be specified for co-metrics requests.
The structure returned when requesting Co-Metrics for a view.
Determines the behaviour of the API when automatically retrying a request whose result is not yet rea...
A probability range used to dictate the set of ordered trial losses in a loss distribution that shoul...
static ProbabilityWindow Tail(double tail_probability)
Returns a window representing the tail probability range [0, tail_probability], such that all losses ...
PortfolioView and LayerView interface.
BackAllocations back_allocations(string source_id, int? timeout=null)
Returns a URL to the YELT of this view back-allocated to some component loss source.
Base interface for all reference entities.