Encog.Bot.Browse.WebPage.AddDataUnit C# (CSharp) Method

AddDataUnit() public method

Add a data unit to the collection.
public AddDataUnit ( DataUnit unit ) : void
unit DataUnit The data unit to load.
return void
        public void AddDataUnit(DataUnit unit)
        {
            _data.Add(unit);
        }

Usage Example

 /// <summary>
 /// Create a dataunit to hode the code HTML tag.
 /// </summary>
 /// <param name="str">The code to create the data unit with.</param>
 private void CreateCodeDataUnit(String str)
 {
     if (str.Trim().Length > 0)
     {
         var d = new CodeDataUnit {
             Code = str
         };
         _page.AddDataUnit(d);
     }
 }