1- // Description: Html Agility Pack - HTML Parsers, selectors, traversors, manupulators.
1+ // Description: Html Agility Pack - HTML Parsers, selectors, traversors, manupulators.
22// Website & Documentation: http://html-agility-pack.net
33// Forum & Issues: https://github.com/zzzprojects/html-agility-pack
44// License: https://github.com/zzzprojects/html-agility-pack/blob/master/LICENSE
55// More projects: http://www.zzzprojects.com/
6- // Copyright © ZZZ Projects Inc. 2014 - 2017. All rights reserved.
6+ // Copyright © ZZZ Projects Inc. 2014 - 2017. All rights reserved.
77
88#if ! METRO && ! NETSTANDARD1_3
99
@@ -29,7 +29,7 @@ public partial class HtmlNode
2929 /// <exception cref="XPathException">Why it's thrown.</exception>
3030 /// <exception cref="NodeNotFoundException">Why it's thrown.</exception>
3131 /// <exception cref="NodeAttributeNotFoundException">Why it's thrown.</exception>
32- /// <exception cref="FormatException">Why it's thrown.</exception>
32+ /// <exception cref="FormatException">Why it's thrown.</exception>
3333 /// <exception cref="Exception">Why it's thrown.</exception>
3434 public T GetEncapsulatedData < T > ( )
3535 {
@@ -50,7 +50,7 @@ public T GetEncapsulatedData<T>()
5050 /// <exception cref="XPathException">Why it's thrown.</exception>
5151 /// <exception cref="NodeNotFoundException">Why it's thrown.</exception>
5252 /// <exception cref="NodeAttributeNotFoundException">Why it's thrown.</exception>
53- /// <exception cref="FormatException">Why it's thrown.</exception>
53+ /// <exception cref="FormatException">Why it's thrown.</exception>
5454 /// <exception cref="Exception">Why it's thrown.</exception>
5555 public T GetEncapsulatedData < T > ( HtmlDocument htmlDocument )
5656 {
@@ -72,7 +72,7 @@ public T GetEncapsulatedData<T>(HtmlDocument htmlDocument)
7272 /// <exception cref="XPathException">Why it's thrown.</exception>
7373 /// <exception cref="NodeNotFoundException">Why it's thrown.</exception>
7474 /// <exception cref="NodeAttributeNotFoundException">Why it's thrown.</exception>
75- /// <exception cref="FormatException">Why it's thrown.</exception>
75+ /// <exception cref="FormatException">Why it's thrown.</exception>
7676 /// <exception cref="Exception">Why it's thrown.</exception>
7777 public object GetEncapsulatedData ( Type targetType , HtmlDocument htmlDocument = null )
7878 {
@@ -175,7 +175,7 @@ public object GetEncapsulatedData(Type targetType, HtmlDocument htmlDocument = n
175175 // Property is None-IEnumerable HasXPath-user-defined class
176176 if ( propertyInfo . PropertyType . IsDefinedAttribute ( typeof ( HasXPathAttribute ) ) == true )
177177 {
178- HtmlDocument innerHtmlDocument = new HtmlDocument ( ) ;
178+ HtmlDocument innerHtmlDocument = new HtmlDocument ( ) ;
179179
180180 innerHtmlDocument . LoadHtml ( Tools . GetHtmlForEncapsulation ( htmlNode , xPathAttribute . NodeReturnType ) ) ;
181181
@@ -192,7 +192,7 @@ public object GetEncapsulatedData(Type targetType, HtmlDocument htmlDocument = n
192192 {
193193 string result = string . Empty ;
194194
195- if ( xPathAttribute . AttributeName == null ) // It target value of HTMLTag
195+ if ( xPathAttribute . AttributeName == null ) // It target value of HTMLTag
196196 {
197197 result = Tools . GetNodeValueBasedOnXPathReturnType < string > ( htmlNode , xPathAttribute ) ;
198198 }
@@ -381,6 +381,9 @@ public object GetEncapsulatedData(Type targetType, HtmlDocument htmlDocument = n
381381 }
382382 #endregion targetObject_NOTDefined_XPath
383383 }
384+
385+
386+
384387 }
385388
386389
@@ -624,10 +627,12 @@ internal static IList GetNodesValuesBasedOnXPathReturnType(HtmlNodeCollection ht
624627
625628
626629 IList result = listGenericType . CreateIListOfType ( ) ;
630+
627631 foreach ( HtmlNode node in htmlNodeCollection )
628632 {
629- result . Add ( Convert . ChangeType ( GetHtmlForEncapsulation ( node , xPathAttribute . NodeReturnType ) , listGenericType ) ) ;
633+ result . Add ( Convert . ChangeType ( GetHtmlForEncapsulation ( node , xPathAttribute . NodeReturnType ) , listGenericType ) ) ;
630634 }
635+
631636 return result ;
632637 }
633638
@@ -724,7 +729,7 @@ internal static int CountOfIEnumerable<T>(this IEnumerable<T> source)
724729 counter ++ ;
725730 }
726731 return counter ;
727- }
732+ }
728733
729734 /// <summary>
730735 /// Return html part of <see cref="HtmlNode"/> based on <see cref="ReturnType"/>
@@ -747,6 +752,8 @@ internal static string GetHtmlForEncapsulation(HtmlNode node, ReturnType returnT
747752 throw new IndexOutOfRangeException ( "Unhandled ReturnType : " + returnType . ToString ( ) ) ;
748753 } ;
749754 }
755+
756+
750757 }
751758
752759
@@ -756,7 +763,7 @@ internal static string GetHtmlForEncapsulation(HtmlNode node, ReturnType returnT
756763 public enum ReturnType
757764 {
758765 /// <summary>
759- /// The text between the start and end tags of the object.
766+ /// The text between the start and end tags of the object.
760767 /// </summary>
761768 InnerText ,
762769
@@ -855,18 +862,18 @@ public sealed class SkipNodeNotFoundAttribute : Attribute
855862 public class NodeNotFoundException : Exception
856863 {
857864 /// <summary>
858- ///
865+ ///
859866 /// </summary>
860867 public NodeNotFoundException ( ) { }
861868
862869 /// <summary>
863- ///
870+ ///
864871 /// </summary>
865872 /// <param name="message"></param>
866873 public NodeNotFoundException ( string message ) : base ( message ) { }
867874
868875 /// <summary>
869- ///
876+ ///
870877 /// </summary>
871878 /// <param name="message"></param>
872879 /// <param name="inner"></param>
@@ -880,18 +887,18 @@ public NodeNotFoundException(string message, Exception inner) : base(message, in
880887 public class NodeAttributeNotFoundException : Exception
881888 {
882889 /// <summary>
883- ///
890+ ///
884891 /// </summary>
885892 public NodeAttributeNotFoundException ( ) { }
886893
887894 /// <summary>
888- ///
895+ ///
889896 /// </summary>
890897 /// <param name="message"></param>
891898 public NodeAttributeNotFoundException ( string message ) : base ( message ) { }
892899
893900 /// <summary>
894- ///
901+ ///
895902 /// </summary>
896903 /// <param name="message"></param>
897904 /// <param name="inner"></param>
@@ -906,18 +913,18 @@ public class MissingXPathException : Exception
906913 {
907914
908915 /// <summary>
909- ///
916+ ///
910917 /// </summary>
911918 public MissingXPathException ( ) { }
912919
913920 /// <summary>
914- ///
921+ ///
915922 /// </summary>
916923 /// <param name="message"></param>
917924 public MissingXPathException ( string message ) : base ( message ) { }
918925
919926 /// <summary>
920- ///
927+ ///
921928 /// </summary>
922929 /// <param name="message"></param>
923930 /// <param name="inner"></param>
@@ -926,7 +933,7 @@ public MissingXPathException(string message, Exception inner) : base(message, in
926933
927934}
928935
929- #if FX20
936+ #if FX20
930937namespace System . Runtime . CompilerServices
931938{
932939 [ AttributeUsage ( AttributeTargets . Method |
0 commit comments