C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Represents a reference, used in Fee objects. More...
Public Types | |
enum | LossSource { Losses , ReinstatementBrokerage } |
Sources of Losses. More... | |
enum | PremiumSource { Premium , ReinstatementPremium } |
Sources of Premium. More... | |
Public Member Functions | |
FeeReference () | |
Default constructor. | |
bool | Equals (FeeReference other) |
Determine if this FeeReference is equivalent to another. | |
override bool | Equals (object obj) |
Determine if this FeeReference is equivalent to another object. | |
override int | GetHashCode () |
Get the HashCode for this FeeReference. | |
virtual T | ShallowCopy< T > () |
Create a shallow copy of this object.
for a serializer-based copy method. | |
Static Public Member Functions | |
static FeeReference | Create (Fee source) |
Create a reference to a Fee source. | |
static FeeReference | Create (LossSource source) |
Create a reference to a Loss source. | |
static FeeReference | Create (PremiumSource source) |
Create a reference to a Premium source. | |
static FeeReference | CreateFromFeeName (string name) |
Create a reference to a Fee from its name. | |
static FeeReference | CreateFromPremiumOrLossName (string name) |
Create a reference to a Premium or Loss from its name. | |
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. | |
Properties | |
List< string > | _ref [get, set] |
The reference path. | |
static FeeReference | Losses [get] |
Layer Losses Reference. | |
static FeeReference | Premium [get] |
Premium reference. | |
static FeeReference | ReinstatementBrokerage [get] |
Reinstatement Brokerage Reference. | |
static FeeReference | ReinstatementPremium [get] |
Reinstatement Premium Reference. | |
Represents a reference, used in Fee objects.
TODO: This implementation seems unecessarily complicated
Definition at line 12 of file FeeReference.cs.
Sources of Losses.
Enumerator | |
---|---|
Losses | Layer losses. |
ReinstatementBrokerage | Reinstatement brokerage source. |
Definition at line 32 of file FeeReference.cs.
Sources of Premium.
Enumerator | |
---|---|
Premium | Premium source. |
ReinstatementPremium | Reinstatement premium source. |
Definition at line 24 of file FeeReference.cs.
|
inline |
Default constructor.
Definition at line 42 of file FeeReference.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.
|
inlinestatic |
Create a reference to a Fee source.
source | The fee source. |
Definition at line 82 of file FeeReference.cs.
|
inlinestatic |
Create a reference to a Loss source.
source | The Loss source. |
Definition at line 66 of file FeeReference.cs.
|
inlinestatic |
Create a reference to a Premium source.
source | The Premium source. |
Definition at line 58 of file FeeReference.cs.
|
inlinestatic |
Create a reference to a Fee from its name.
name | The fee's name. |
Definition at line 90 of file FeeReference.cs.
|
inlinestatic |
Create a reference to a Premium or Loss from its name.
name | The Premium or Loss name. |
Definition at line 98 of file FeeReference.cs.
bool AnalyzeRe.Fees.FeeReference.Equals | ( | FeeReference | other | ) |
Determine if this FeeReference is equivalent to another.
other | FeeReference to compare to this. |
override bool AnalyzeRe.Fees.FeeReference.Equals | ( | object | obj | ) |
Determine if this FeeReference is equivalent to another object.
obj | Object to compare to this. |
|
inline |
Get the HashCode for this FeeReference.
Definition at line 132 of file FeeReference.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.
|
getset |
The reference path.
Definition at line 20 of file FeeReference.cs.
|
staticget |
Layer Losses Reference.
Definition at line 113 of file FeeReference.cs.
|
staticget |
Premium reference.
Definition at line 104 of file FeeReference.cs.
|
staticget |
Reinstatement Brokerage Reference.
Definition at line 110 of file FeeReference.cs.
|
staticget |
Reinstatement Premium Reference.
Definition at line 107 of file FeeReference.cs.