/// ------------------------------------------------------------------------------------ /// <summary> /// Gets the class. /// </summary> /// <param name="className">Name of the class.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public IClass GetClass(string className) { var query = string.Format("//CellarModule[class/@id='{0}']", className); // ReSharper disable PossibleNullReferenceException var iterator = m_Document.CreateNavigator().Select(query); // ReSharper restore PossibleNullReferenceException if (iterator.MoveNext()) { var module = (XmlElement)iterator.Current.UnderlyingObject; var cellarModule = new CellarModule(module, m_Model); return cellarModule.Classes[className]; } return new DummyClass(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets the relative qualified signature. /// </summary> /// <param name="desiredModule">The desired module.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public string GetRelativeQualifiedSignature(CellarModule desiredModule) { return string.Empty; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets the class. /// </summary> /// <param name="className">Name of the class.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ public IClass GetClass(string className) { string query = string.Format("//CellarModule[class/@id='{0}']", className); XPathNodeIterator iterator = m_Document.CreateNavigator().Select(query); if (iterator.MoveNext()) { XmlElement module = (XmlElement)iterator.Current.UnderlyingObject; CellarModule cellarModule = new CellarModule(module, m_Model); return cellarModule.Classes[className]; } return new DummyClass(); }