/// <summary>
        /// Determines whether the specified FqnFormulaComponent is equal to the current one. 
        /// </summary>
        /// <param name="other">
        /// The other.
        /// </param>
        /// <returns>
        /// The System.Boolean.
        /// </returns>
        public bool Equals(FqnFormulaComponent other)
        {
            if (object.ReferenceEquals(null, other))
            {
                return false;
            }

            if (object.ReferenceEquals(this, other))
            {
                return true;
            }

            return other.FullyQualifiedName == this.FullyQualifiedName
                   && other.DisplayName == this.DisplayName && other.DataType == this.DataType;
        }
        private static void ReplaceFormulaComponent(List<FormulaComponentBase> formulaComponents,
                                                    Dictionary<FqnFormulaComponent, object> fqnValues,
                                                    FqnFormulaComponent fqnComponent, int i)
        {
            object value = GetValue(fqnValues, fqnComponent);
            FormulaComponentBase newFormulaComponenent = CreateNewFormulaComponent(value,
                                                                                   fqnComponent.FullyQualifiedName);
            formulaComponents.Insert(i, newFormulaComponenent);

            formulaComponents.RemoveAt(i + 1);
        }
        private static object GetValue(Dictionary<FqnFormulaComponent, object> fqnValues,
                                       FqnFormulaComponent lookupComponent)
        {
            object value;
            if (fqnValues.TryGetValue(lookupComponent, out value))
            {
                return value;
            }

            AssemblyTraceSource.Instance.TraceEvent(
                TraceEventType.Critical,
                0,
                "Could not find a resolved value for the Fully Qualified Name '{0}' in the dictionary in ReplaceFqnFormulaComponents, the next line shows the contents of the dictionary.",
                lookupComponent.FullyQualifiedName);

            AssemblyTraceSource.Instance.TraceData(TraceEventType.Warning, 0, fqnValues);

            throw new Exception(
                string.Format(
                    "Formula Replace Fqns: could not find a value for the fqn: {0}",
                    lookupComponent.FullyQualifiedName));
        }