Skip to content

Commit 49ce01e

Browse files
committed
Correcting line endings
1 parent 9b504d8 commit 49ce01e

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

tools/StaticAnalysis/HelpAnalyzer/HelpAnalyzer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public void Analyze(IEnumerable<string> scopes)
4848
foreach (var directory in Directory.EnumerateDirectories(Path.GetFullPath(baseDirectory)))
4949
{
5050
var helpFiles = Directory.EnumerateFiles(directory, "*.dll-Help.xml")
51-
.Where(f => !processedHelpFiles.Contains(Path.GetFileName(f), StringComparer.OrdinalIgnoreCase)).ToList();
51+
.Where(f => !processedHelpFiles.Contains(Path.GetFileName(f),
52+
StringComparer.OrdinalIgnoreCase)).ToList();
5253
if (helpFiles.Any())
5354
{
5455
Directory.SetCurrentDirectory(directory);

tools/StaticAnalysis/HelpAnalyzer/XmlExtensions.cs

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public static class XmlExtensions
2626
/// </summary>
2727
/// <param name="parent">The element to search</param>
2828
/// <param name="name">The child element name to search for</param>
29-
/// <returns>An enumeration of child elements with the given name, or null if none are found.</returns>
29+
/// <returns>An enumeration of child elements with the given name, or null if none
30+
/// are found.</returns>
3031
public static IEnumerable<XElement> GetChildElements(this XElement parent, string name)
3132
{
3233
return parent.Descendants().Where(e => String.Equals(e.Name.LocalName, name));
@@ -37,12 +38,14 @@ public static IEnumerable<XElement> GetChildElements(this XElement parent, strin
3738
/// </summary>
3839
/// <param name="parent">The element to search</param>
3940
/// <param name="name">The child element name to search for</param>
40-
/// <param name="predicate">The additioinal condition to staify</param>
41+
/// <param name="predicate">The additional condition to satisfy</param>
4142
/// <returns>An enumeration of child elements with the given name that satisfy the predicate,
4243
/// or null if none are found.</returns>
43-
public static IEnumerable<XElement> GetChildElements(this XElement parent, string name, Func<XElement, bool> predicate )
44+
public static IEnumerable<XElement> GetChildElements(this XElement parent, string name,
45+
Func<XElement, bool> predicate )
4446
{
45-
return parent.Descendants().Where(e => String.Equals(e.Name.LocalName, name) && predicate(e));
47+
return parent.Descendants().Where(e => String.Equals(e.Name.LocalName, name)
48+
&& predicate(e));
4649
}
4750

4851
/// <summary>
@@ -63,13 +66,15 @@ public static XElement GetChildElement(this XElement parent, string name)
6366
/// <param name="name">The child element name to search for</param>
6467
/// <param name="predicate">Additional conditions over the desired child element</param>
6568
/// <returns></returns>
66-
public static XElement GetChildElement(this XElement parent, string name, Func<XElement, bool> predicate )
69+
public static XElement GetChildElement(this XElement parent, string name,
70+
Func<XElement, bool> predicate )
6771
{
68-
return parent.Descendants().FirstOrDefault(e => String.Equals(e.Name.LocalName, name) && predicate(e));
72+
return parent.Descendants().FirstOrDefault(e => String.Equals(e.Name.LocalName, name)
73+
&& predicate(e));
6974
}
7075

7176
/// <summary>
72-
/// Determines if the given element conatins a child element of the given name
77+
/// Determines if the given element contains a child element of the given name
7378
/// </summary>
7479
/// <param name="element">The element to search</param>
7580
/// <param name="name">The child element name to search for</param>
@@ -80,19 +85,22 @@ public static bool ContainsChildElement(this XElement element, string name)
8085
}
8186

8287
/// <summary>
83-
/// Determines if the given element conatins a child element of the given name that staifies the specified predicate
88+
/// Determines if the given element contains a child element of the given name that satisfies
89+
/// the specified predicate
8490
/// </summary>
8591
/// <param name="element">The element to search</param>
8692
/// <param name="name">The child element name to search for</param>
8793
/// <param name="predicate">An additional condition on descendant elements</param>
8894
/// <returns>true if the given child element exists, otherwise false</returns>
89-
public static bool ContainsChildElement(this XElement element, string name, Func<XElement, bool> predicate)
95+
public static bool ContainsChildElement(this XElement element, string name,
96+
Func<XElement, bool> predicate)
9097
{
91-
return element.Descendants().Any(e => string.Equals(e.Name.LocalName, name) && predicate(e));
98+
return element.Descendants().Any(e => string.Equals(e.Name.LocalName, name)
99+
&& predicate(e));
92100
}
93101

94102
/// <summary>
95-
/// Determines if the given element conatins a child element with any of the provided names
103+
/// Determines if the given element contains a child element with any of the provided names
96104
/// </summary>
97105
/// <param name="element">The element to search</param>
98106
/// <param name="names">The child element names to search for</param>
@@ -103,13 +111,16 @@ public static bool ContainsChildElement(this XElement element, IEnumerable<strin
103111
}
104112

105113
/// <summary>
106-
/// Determines if the given element conatins a child element with any of the provided names that satifies the given predicate
114+
/// Determines if the given element contains a child element with any of the provided names that
115+
/// satisfies the given predicate
107116
/// </summary>
108117
/// <param name="element">The element to search</param>
109118
/// <param name="names">The child element names to search for</param>
110-
/// <param name="predicate">An additional condition to check on descendat elements</param>
111-
/// <returns>True if any child element has the specified name and satisfies the specified predicate.</returns>
112-
public static bool ContainsChildElement(this XElement element, IEnumerable<string> names, Func<XElement, bool> predicate )
119+
/// <param name="predicate">An additional condition to check on descendant elements</param>
120+
/// <returns>True if any child element has the specified name and satisfies the specified
121+
/// predicate.</returns>
122+
public static bool ContainsChildElement(this XElement element, IEnumerable<string> names,
123+
Func<XElement, bool> predicate )
113124
{
114125
return names.Any( n => element.ContainsChildElement(n, predicate));
115126
}

0 commit comments

Comments
 (0)