private static Grid CreateContainer(IFormulaToken token) { // find template in FormulaTokenTemplates.xaml FormulaTokenTemplate template; if (!FormulaTokenTemplates.TryGetValue(token.GetType(), out template)) { Debug.WriteLine("Please add template for \"" + token.GetType().Name + "\" to FormulaTokenTemplates.xaml. "); return(null); } return(template.CreateContainer(token)); }
bool ITestEquatable <IFormulaToken> .TestEquals(IFormulaToken other) { return(other != null && other.GetType() == GetType() && TestEquals((FormulaToken)other)); }
private static Grid CreateContainer(IFormulaToken token) { // find template in FormulaTokenTemplates.xaml FormulaTokenTemplate template; if (!FormulaTokenTemplates.TryGetValue(token.GetType(), out template)) { Debug.WriteLine("Please add template for \"" + token.GetType().Name + "\" to FormulaTokenTemplates.xaml. "); return null; } return template.CreateContainer(token); }