C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.Fees.FeeReference Class Reference

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.

See also
ExtensionMethods.DeepCopy<T>

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.
 

Detailed Description

Represents a reference, used in Fee objects.

TODO: This implementation seems unecessarily complicated

Definition at line 12 of file FeeReference.cs.

Inheritance diagram for AnalyzeRe.Fees.FeeReference:
AnalyzeRe.APIType AnalyzeRe.IAPIType

Member Enumeration Documentation

◆ LossSource

Sources of Losses.

Enumerator
Losses 

Layer losses.

ReinstatementBrokerage 

Reinstatement brokerage source.

Definition at line 32 of file FeeReference.cs.

◆ PremiumSource

Sources of Premium.

Enumerator
Premium 

Premium source.

ReinstatementPremium 

Reinstatement premium source.

Definition at line 24 of file FeeReference.cs.

Constructor & Destructor Documentation

◆ FeeReference()

AnalyzeRe.Fees.FeeReference.FeeReference ( )
inline

Default constructor.

Definition at line 42 of file FeeReference.cs.

Member Function Documentation

◆ AfterMembersCloned()

virtual void AnalyzeRe.APIType.AfterMembersCloned ( APIType  originalResource)
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.

◆ Create() [1/3]

static FeeReference AnalyzeRe.Fees.FeeReference.Create ( Fee  source)
inlinestatic

Create a reference to a Fee source.

Parameters
sourceThe fee source.
Returns
A reference to the fee.

Definition at line 82 of file FeeReference.cs.

◆ Create() [2/3]

static FeeReference AnalyzeRe.Fees.FeeReference.Create ( LossSource  source)
inlinestatic

Create a reference to a Loss source.

Parameters
sourceThe Loss source.
Returns
A reference to the loss source.

Definition at line 66 of file FeeReference.cs.

◆ Create() [3/3]

static FeeReference AnalyzeRe.Fees.FeeReference.Create ( PremiumSource  source)
inlinestatic

Create a reference to a Premium source.

Parameters
sourceThe Premium source.
Returns
A reference to the premium source.

Definition at line 58 of file FeeReference.cs.

◆ CreateFromFeeName()

static FeeReference AnalyzeRe.Fees.FeeReference.CreateFromFeeName ( string  name)
inlinestatic

Create a reference to a Fee from its name.

Parameters
nameThe fee's name.
Returns
A reference to the fee named.

Definition at line 90 of file FeeReference.cs.

◆ CreateFromPremiumOrLossName()

static FeeReference AnalyzeRe.Fees.FeeReference.CreateFromPremiumOrLossName ( string  name)
inlinestatic

Create a reference to a Premium or Loss from its name.

Parameters
nameThe Premium or Loss name.
Returns
A reference to the Premium or Loss named.

Definition at line 98 of file FeeReference.cs.

◆ Equals() [1/2]

bool AnalyzeRe.Fees.FeeReference.Equals ( FeeReference  other)

Determine if this FeeReference is equivalent to another.

Parameters
otherFeeReference to compare to this.
Returns
True if the other object is a FeeReference and it is equivalent to this.

◆ Equals() [2/2]

override bool AnalyzeRe.Fees.FeeReference.Equals ( object  obj)

Determine if this FeeReference is equivalent to another object.

Parameters
objObject to compare to this.
Returns
True if the other object is a FeeReference and it is equivalent to this.

◆ GetHashCode()

override int AnalyzeRe.Fees.FeeReference.GetHashCode ( )
inline

Get the HashCode for this FeeReference.

Returns
A unique HashCode for this FeeReference

Definition at line 132 of file FeeReference.cs.

◆ ShallowCopy< T >()

virtual T AnalyzeRe.APIType.ShallowCopy< T > ( )
inlinevirtualinherited

Create a shallow copy of this object.

See also
ExtensionMethods.DeepCopy<T>

for a serializer-based copy method.

Returns
A shallow copy of this object.

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.

Type Constraints
T :IAPIType 

Definition at line 14 of file APIType.cs.

Property Documentation

◆ _ref

List<string> AnalyzeRe.Fees.FeeReference._ref
getset

The reference path.

Definition at line 20 of file FeeReference.cs.

◆ Losses

FeeReference AnalyzeRe.Fees.FeeReference.Losses
staticget

Layer Losses Reference.

Definition at line 113 of file FeeReference.cs.

◆ Premium

FeeReference AnalyzeRe.Fees.FeeReference.Premium
staticget

Premium reference.

Definition at line 104 of file FeeReference.cs.

◆ ReinstatementBrokerage

FeeReference AnalyzeRe.Fees.FeeReference.ReinstatementBrokerage
staticget

Reinstatement Brokerage Reference.

Definition at line 110 of file FeeReference.cs.

◆ ReinstatementPremium

FeeReference AnalyzeRe.Fees.FeeReference.ReinstatementPremium
staticget

Reinstatement Premium Reference.

Definition at line 107 of file FeeReference.cs.


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