示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IIdentifier"/> class.
 /// </summary>
 /// <param name="properties">The properties. they must include:
 /// PricingStructureType, CurveName, BuildDateTime and Algorithm.</param>
 public AssetConfigurationIdentifier(NamedValueSet properties)
     : base(properties)
 {
     try
     {
         DataType         = "Configuration.Asset";
         SourceSystem     = PropertyHelper.ExtractSourceSystem(properties);
         Domain           = SourceSystem + '.' + DataType;
         Id               = PropertyHelper.ExtractPropertyIdentifier(properties);
         AssetRef         = PropertyHelper.ExtractAssetRef(properties);
         UniqueIdentifier = BuildUniqueId();
         PropertyHelper.Update(Properties, CurveProp.UniqueIdentifier, UniqueIdentifier);
         PropertyHelper.Update(Properties, "Domain", Domain);
     }
     catch (System.Exception)
     {
         throw new System.Exception("Invalid pricingstrucutre property name.");
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IIdentifier"/> class.
 /// </summary>
 /// <param name="properties">The properties. they must include:
 /// PricingStructureType, CurveName, BuildDateTime and Algorithm.</param>
 public PricingStructurePropertiesIdentifier(NamedValueSet properties)
 {
     Properties = properties;
     try
     {
         DataType             = "Properties.PricingStructures";
         SourceSystem         = PropertyHelper.ExtractSourceSystem(properties);
         Domain               = SourceSystem + '.' + DataType;
         Id                   = PropertyHelper.ExtractPropertyIdentifier(properties);
         PricingStructureType = PropertyHelper.ExtractPricingStructureType(properties);
         UniqueIdentifier     = BuildUniqueId();
         PropertyHelper.Update(Properties, CurveProp.UniqueIdentifier, UniqueIdentifier);
         PropertyHelper.Update(Properties, "Domain", Domain);
     }
     catch (System.Exception)
     {
         throw new System.Exception("Invalid pricingstrucutre property name.");
     }
 }