/// <summary> /// Constructor /// </summary> /// <param name="c">frequency as 1 for annual, 2 for semi-annual ...</param> public FinancialAssetTypeCategoryCode(int c) { FinancialAssetTypeCategoryCodeAdaptee result; FinancialAssetTypeCategoryCodeAdaptee.Codes.TryGetValue(c, out result); if (result != null) { this.InternalObject = result; } else { throw new InvalidCastException(); } }
public override bool Equals(System.Object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to FinancialAssetTypeCategoryCodeAdaptee return false. FinancialAssetTypeCategoryCodeAdaptee p = obj as FinancialAssetTypeCategoryCodeAdaptee; if ((System.Object)p == null) { return(false); } // Return true if the fields match: return((Value == p.Value) && (Label == p.Label)); }
/// <summary> /// Initialisation des constantes dans le dictionnaire /// </summary> static FinancialAssetTypeCategoryCode() { FinancialAssetTypeCategoryCodeAdaptee adapteeA = new FinancialAssetTypeCategoryCodeAdaptee("EQUITIES", "A", 0); EQUITIES = new FinancialAssetTypeCategoryCode(adapteeA); FinancialAssetTypeCategoryCodeAdaptee adapteeO = new FinancialAssetTypeCategoryCodeAdaptee("DEBT INSTRUMENTS", "O", 1); DEBT = new FinancialAssetTypeCategoryCode(adapteeO); FinancialAssetTypeCategoryCodeAdaptee adapteeE = new FinancialAssetTypeCategoryCodeAdaptee("ENTITLEMENTS", "E", 2); ENTITLEMENTS = new FinancialAssetTypeCategoryCode(adapteeE); FinancialAssetTypeCategoryCodeAdaptee adapteeD = new FinancialAssetTypeCategoryCodeAdaptee("DERIVATIVES", "D", 3); DERIVATIVES = new FinancialAssetTypeCategoryCode(adapteeD); FinancialAssetTypeCategoryCodeAdaptee adapteeM = new FinancialAssetTypeCategoryCodeAdaptee("MONEY_MARKET", "M", 4); MONEY_MARKET = new FinancialAssetTypeCategoryCode(adapteeM); FinancialAssetTypeCategoryCodeAdaptee adapteeZ = new FinancialAssetTypeCategoryCodeAdaptee("OTHERS", "Z", 5); OTHERS = new FinancialAssetTypeCategoryCode(adapteeZ); }
private FinancialAssetTypeCategoryCode(FinancialAssetTypeCategoryCodeAdaptee Instance) { this.InternalObject = Instance; }