コード例 #1
0
ファイル: DataColumn.cs プロジェクト: ju-rgen/OSPSuite.Core
 private static void validateDimensionIs(AuxiliaryType auxiliaryType, IDimension dimension, IDimension targetDimension)
 {
     if (!dimension.Equals(targetDimension))
     {
         throw new InvalidArgumentException("Wrong Dimension for " + auxiliaryType + ": " + dimension.Name + " instead of " + targetDimension.Name);
     }
 }
コード例 #2
0
        /// <summary>
        /// The compare to.
        /// </summary>
        /// <param name="other">
        /// The other. 
        /// </param>
        /// <returns>
        /// The <see cref="int"/> . 
        /// </returns>
        /// <exception cref="SdmxSemmanticException">
        /// Throws Validate exception.
        /// </exception>
        public virtual int CompareTo(IDimension other)
        {
            if (other.Position == this.Position)
            {
                if (!other.Equals(this))
                {
                    throw new SdmxSemmanticException(
                        "Two dimensions (" + this.Id + " & " + other.Id + ") can not share the same dimension position : "
                        + this.Position);
                }
            }

            return (other.Position > this.Position) ? -1 : +1;
        }
コード例 #3
0
 public bool CanConvertFrom(IDimension dimension)
 {
     return(_sourceDimension.Equals(dimension));
 }
コード例 #4
0
 public bool CanConvertTo(IDimension dimension)
 {
     return(_targetDimension.Equals(dimension));
 }