Click here to Skip to main content
Click here to Skip to main content

LINQ to Tree - A Generic Technique for Querying Tree-like Structures

By , 4 Mar 2010
 

<#@ template language="C#v3.5" hostSpecific="true" debug="true" #>

<#@ include file="..\LinqToTreeCodeGen.tt" #>

<#@ import namespace="System.IO" #>

using System.IO;

<#

string typeName = "DirectoryInfo";
string adapterType = "FileSystemTreeAdapter";
string targetNamespace = "LinqToFileSystem";

// note, because DirectoryInfo.Equals does not evaluate true for two instances of the 
// same directory, we have to specify an equality comparison that uses the FullName property
GenerateLinqMethods(typeName, adapterType, targetNamespace,
	false, "child.FullName == item.FullName");

 #>

By viewing downloads associated with this article you agree to the Terms of use 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Colin Eberhardt
Architect Scott Logic
United Kingdom United Kingdom
I am CTO at ShinobiControls, a team of iOS developers who are carefully crafting iOS charts, grids and controls for making your applications awesome.
 
I am a Technical Architect for Visiblox which have developed the world's fastest WPF / Silverlight and WP7 charts.
 
I am also a Technical Evangelist at Scott Logic, a provider of bespoke financial software and consultancy for the retail and investment banking, stockbroking, asset management and hedge fund communities.
 
Visit my blog - Colin Eberhardt's Adventures in .NET.
 
Follow me on Twitter - @ColinEberhardt
 
-
Follow on   Twitter   Google+

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130617.1 | Last Updated 5 Mar 2010
Article Copyright 2010 by Colin Eberhardt
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid