Esempio n. 1
0
 /// <summary>
 /// Locates and element using an element locator.
 /// </summary>
 /// <param name="ElementLocator">
 /// A locator for the element to be found.
 /// </param>
 /// <returns>
 /// A reference to the matching element. A null reference will be returned
 /// if no matching element can be found.
 /// </returns>
 internal Element LocateElement(Locator ElementLocator)
 {
     foreach (var CurrentSchema in SchemaList)
     {
         var matchingElement = CurrentSchema.LocateElement(ElementLocator);
         if (matchingElement != null)
         {
             return(matchingElement);
         }
     }
     return(null);
 }
Esempio n. 2
0
 /// <summary>
 /// Locates an element given an element locator.
 /// </summary>
 /// <param name="ElementLocator">
 /// The locator specifying the element to find.
 /// </param>
 /// <returns>
 /// The element referenced by the locator; null if the element cannot be found.
 /// </returns>
 /// <remarks>
 /// This method should most likely be moved into a class which wraps <see cref="Element"/>
 /// collections with a value-added wrapper class.
 /// </remarks>
 private Element LocateElement(Locator ElementLocator)
 {
     foreach (XbrlSchema CurrentSchema in this.ValidatedFragment.Schemas)
     {
         var FoundElement = CurrentSchema.LocateElement(ElementLocator);
         if (FoundElement != null)
         {
             return(FoundElement);
         }
     }
     return(null);
 }