Example #1
0
        private void addObjectReferenceToList(IFormula formula, IDictionary <string, int> list, IObjectReference objectReference)
        {
            var alias = Regex.Replace(objectReference.Alias, @"\s", "_");

            try
            {
                list.Add(alias, idFor(objectReference.Object));
            }
            catch (ArgumentException ex)
            {
                throw new ArgumentException(Error.AliasAlreadyUsedInFormula(alias, formula.ToString()), ex);
            }
        }