/// <summary>
        /// Publishes a curve.
        /// </summary>
        /// <param name="structurePropertiesRange">The structure properties range.</param>
        /// <param name="publishPropertiesRange">The publish properties range.</param>
        /// <param name="valuesRange">The values range.</param>
        /// <returns></returns>
        public string PublishCurve(object[][] structurePropertiesRange, object[][] publishPropertiesRange, object[][] valuesRange)
        {
            // Create curve
            IPricingStructure pricingStructure = PricingStructureFactory.CreatePricingStructure(Logger.Target, Cache, NameSpace, structurePropertiesRange, valuesRange);
            // Get properties needed
            Market        market           = GetMarket(pricingStructure);
            string        uniqueIdentifier = pricingStructure.GetPricingStructureId().UniqueIdentifier;
            NamedValueSet properties       = pricingStructure.GetPricingStructureId().Properties;

            // Save
            Publish(market, uniqueIdentifier, properties, publishPropertiesRange);
            return(uniqueIdentifier);
        }
        /// <summary>
        /// Publishes the volatility cube.
        /// </summary>
        /// <param name="structurePropertiesRange">The structure properties range.</param>
        /// <param name="publishPropertiesRange">The publish properties range.</param>
        /// <param name="strikesOrTenorsRange">The strikes or tenors range.</param>
        /// <param name="valuesRange">The values range.</param>
        /// <returns></returns>
        public string PublishVolatilityCube(object[][] structurePropertiesRange, object[][] publishPropertiesRange, object[][] strikesOrTenorsRange, object[][] valuesRange)
        {
            // Translate into useful objects
            NamedValueSet structureProperties = structurePropertiesRange.ToNamedValueSet();
            var           data = (object[, ])PricingStructureFactory.TrimNulls(valuesRange.ConvertArrayToMatrix());

            decimal[] strikes  = strikesOrTenorsRange.ConvertToOneDimensionalArray <decimal>();
            string[]  expiries = PricingStructureFactory.ExtractExpiries(data).Distinct().ToArray();
            string[]  tenors   = PricingStructureFactory.ExtractTenors(data).Distinct().ToArray();
            decimal[,] vols = PricingStructureFactory.ConvertToDecimalArray(data, 2);
            // Create curve
            var volatilityCube = new VolatilityCube(structureProperties, expiries, tenors, vols, strikes);
            // Get properties needed
            Market        market           = GetMarket(volatilityCube);
            string        uniqueIdentifier = volatilityCube.GetPricingStructureId().UniqueIdentifier;
            NamedValueSet properties       = volatilityCube.GetPricingStructureId().Properties;

            // Save
            Publish(market, uniqueIdentifier, properties, publishPropertiesRange);
            return(uniqueIdentifier);
        }