|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DiagnosticExplorer.Silverlight
{
public static class Extensions
{
private const StringComparison _ignoreCase = StringComparison.CurrentCultureIgnoreCase;
public static DiagSink FindByName(this IEnumerable<DiagSink> sinks, string name)
{
if (sinks == null) throw new ArgumentNullException("sinks");
return (from sink in sinks
where string.Equals(name, sink.Name, _ignoreCase)
select sink).FirstOrDefault();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.