Example #1
0
 internal Tuple(XbrlFragment ParentFragment, INode TupleNode) : base(ParentFragment, TupleNode)
 {
     this.Facts = new FactCollection();
     foreach (INode CurrentChild in TupleNode.ChildNodes)
     {
         var CurrentFact = Fact.Create(ParentFragment, CurrentChild);
         if (CurrentFact != null)
         {
             this.Facts.Add(CurrentFact);
         }
     }
 }
Example #2
0
 /// <summary>
 /// Reads all of the facts in the XBRL fragment and creates an object for each.
 /// </summary>
 /// <remarks>
 /// <para>
 /// Element instances can be any of the following:
 /// </para>
 /// <para>
 /// <list type="bullet">
 /// <item>
 /// an item, represented in an XBRL schema by an element with a substitution group of "item"
 /// and represented by an <see cref="Item"/> object
 /// </item>
 /// <item>
 /// a tuple, represented in an XBRL schema by an element with a substitution group of "tuple"
 /// and represented by an <see cref="Tuple"/> object
 /// </item>
 /// </list>
 /// </para>
 /// </remarks>
 private void ReadFacts()
 {
     this.Facts          = new FactCollection();
     this.Facts.Capacity = this.XbrlRootNode.ChildNodes.Count;
     foreach (INode CurrentChild in this.XbrlRootNode.ChildNodes)
     {
         var CurrentFact = Fact.Create(this, CurrentChild);
         if (CurrentFact != null)
         {
             this.Facts.Add(CurrentFact);
         }
     }
     this.Facts.TrimExcess();
 }