C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Optional parameters which can be specified for all simulation result requests. Includes a variety of methods which make it easy to construct, copy, and compare request parameters, as well as convert them to a RequestParameters instance. More...
Public Member Functions | |
SimulationOptions (Perspective perspective=null, string filter=null, bool? secondary_uncertainty=null, ReportingPeriod reporting_period=null) | |
Configure one or more optional simulation request parameters. | |
SimulationOptions (SimulationOptions toCopy) | |
Construct a new set of SimulationOptions from another. | |
bool | Equals (SimulationOptions other) |
Indicates whether the current object is equal to another object of the same type. | |
virtual RequestParameters | GetParameters () |
Convert this i into a set of REST request parameters. | |
virtual T | ShallowCopy< T > () |
Create a shallow copy of this object.
for a serializer-based copy method. | |
Protected Member Functions | |
virtual void | AfterMembersCloned (APIType originalResource) |
Invoked following construction if the current instance has been created using a member-wise clone of some other instance. Override if your derived APIType class contains some members that should not be cloned. | |
bool | BothNullOrEqual< T > (T first, T second) |
Helper method to determine if two classes are equal, or both null. | |
bool | BothNullOrEqual< T > (T? first, T? second) |
Helper method to determine if two nullable values are equal, or both null. | |
Properties | |
static AggregationOptions | Default [get] |
The default simulation request options used when none are specified. | |
string | filter [get, set] |
The name of the predefined filter used to determine which event losses are included in the resulting distribution. | |
Perspective | perspective [get, set] |
The requested Perspective, which determines which factors are included in the loss distribution. | |
ReportingPeriod | reporting_period = new ReportingPeriod() [get, set] |
A reporting period which dictates optional begin and end dates to constrain what event losses are included in the distribution based on their occurrence date and time (sequence). | |
bool? | secondary_uncertainty [get, set] |
Whether or not to simulate using secondary uncertainty (if available). Set this to false to explicitly disable secondary uncertainty. | |
Optional parameters which can be specified for all simulation result requests. Includes a variety of methods which make it easy to construct, copy, and compare request parameters, as well as convert them to a RequestParameters instance.
Definition at line 9 of file SimulationOptions.cs.
|
inline |
Configure one or more optional simulation request parameters.
perspective | The requested Perspective, which determines which factors are included in the loss distribution. |
filter | The name of the predefined filter used to determine which event losses are included in the resulting distribution. |
secondary_uncertainty | Whether or not to simulate using secondary uncertainty (if available). |
reporting_period | A ReportingPeriod, which restricts the distribution to only include event losses in the specified DateTime range. |
Definition at line 42 of file SimulationOptions.cs.
|
inline |
Construct a new set of SimulationOptions from another.
toCopy | The other SimulationOptions to copy. |
Definition at line 53 of file SimulationOptions.cs.
|
inlineprotectedvirtualinherited |
Invoked following construction if the current instance has been created using a member-wise clone of some other instance. Override if your derived APIType class contains some members that should not be cloned.
Overriding implementations should be sure to invoke base.AfterMembersCloned().
A sane question for a code reviewer to ask might be: "Why not avoid copying those members in the first place?" The answer is that there is no framework-supported method of excluding members from a MemberwiseClone. The only officially supported solution is to not use the object.MemberwiseClone method at all and instead have each class implement it's own Copy method. In our case, most objects have no need to specialize their copy implementation (even though they could - the ShallowCopy<T> method is marked virtual). It's simpler to simply "correct" any special-case members after the fact, and requires less error-prone code than if the code were responsible for ensuring no members were missed in a copy. It's also faster than any reflection-based approach, even though such an approach could benefit from custom attributes meant to exclude certain members from copying.
Reimplemented in AnalyzeRe.APITypes.APIResource_WithDataEndpoint, AnalyzeRe.APIResourceView.BaseAPIResourceView, AnalyzeRe.Distributions.CustomDistribution, AnalyzeRe.LossSets.LossSet_WithData, AnalyzeRe.Optimization.Candidate, AnalyzeRe.Optimization.OptimizationView, and AnalyzeRe.StaticSimulation.
Definition at line 37 of file APIType.cs.
|
inlineprotected |
Helper method to determine if two classes are equal, or both null.
T | : | class |
Definition at line 94 of file SimulationOptions.cs.
|
inlineprotected |
Helper method to determine if two nullable values are equal, or both null.
T | : | struct |
Definition at line 100 of file SimulationOptions.cs.
|
inline |
Indicates whether the current object is equal to another object of the same type.
other | An object to compare with this object. |
Definition at line 83 of file SimulationOptions.cs.
|
inlinevirtual |
Convert this i into a set of REST request parameters.
Reimplemented in AnalyzeRe.Metrics.AggregationOptions, AnalyzeRe.Metrics.CoMetricsOptions, AnalyzeRe.Metrics.ExceedanceProbabilityOptions, AnalyzeRe.Metrics.MetricsOptions, and AnalyzeRe.Metrics.YELTOptions.
Definition at line 66 of file SimulationOptions.cs.
|
inlinevirtualinherited |
Create a shallow copy of this object.
for a serializer-based copy method.
If this object contains any members that reference the current object (this), the class should override this method to avoid cloning a reference to the old class.
Implements AnalyzeRe.IAPIType.
T | : | IAPIType |
Definition at line 14 of file APIType.cs.
|
staticget |
The default simulation request options used when none are specified.
Definition at line 12 of file SimulationOptions.cs.
|
getset |
The name of the predefined filter used to determine which event losses are included in the resulting distribution.
Definition at line 21 of file SimulationOptions.cs.
|
getset |
The requested Perspective, which determines which factors are included in the loss distribution.
Definition at line 17 of file SimulationOptions.cs.
|
getset |
A reporting period which dictates optional begin and end dates to constrain what event losses are included in the distribution based on their occurrence date and time (sequence).
Definition at line 29 of file SimulationOptions.cs.
|
getset |
Whether or not to simulate using secondary uncertainty (if available). Set this to false to explicitly disable secondary uncertainty.
Definition at line 25 of file SimulationOptions.cs.