C
Chris Marsh
All
I have a small project that I'm working on - more for my own edification
than the resultant product. The purpose of the project is to display the
different versions of assemblies that are referenced by other assemblies (in
a given folder), and which the referencing assemblies are. Therefore, if the
folder foo is being inspected, the following may be a typical result:
foo [folder]
|
---- assembly1 [assembly being referenced by at least one assembly in folder
foo]
|
---- 1.2.3.4 [version]
|
---- assembly2.dll [references assembly 1, version 1.2.3.4]
|
---- assembly3.dll
|
---- 1.2.3.5
|
---- assembly6.dll
|
---- assembly7
|
---- 1.2.3.8
|
---- assembly1.dll
|
---- 1.2.3.9
|
---- assembly2.dll
To achieve this, I'm iterating through each file in the folder, and if it's
an assembly I'm then getting its collection of references; from each of
which I can build my "map" of all assembly references as shown above.
Where I'm getting stuck (and the real point of the exercise from a personal
development perspective) is how to store this data. Is there an existing
collection type that lends itself to this hierarchical structure, or need I
roll my own? If so, what would be suitable underlying collection types, and
how would they interact? How would I handle sorting?
Any comments or advice would be very much appreciated, as I would like to
understand the optimal manner in whcih to approach this sort of problem.
Many thanks in advance!
I have a small project that I'm working on - more for my own edification
than the resultant product. The purpose of the project is to display the
different versions of assemblies that are referenced by other assemblies (in
a given folder), and which the referencing assemblies are. Therefore, if the
folder foo is being inspected, the following may be a typical result:
foo [folder]
|
---- assembly1 [assembly being referenced by at least one assembly in folder
foo]
|
---- 1.2.3.4 [version]
|
---- assembly2.dll [references assembly 1, version 1.2.3.4]
|
---- assembly3.dll
|
---- 1.2.3.5
|
---- assembly6.dll
|
---- assembly7
|
---- 1.2.3.8
|
---- assembly1.dll
|
---- 1.2.3.9
|
---- assembly2.dll
To achieve this, I'm iterating through each file in the folder, and if it's
an assembly I'm then getting its collection of references; from each of
which I can build my "map" of all assembly references as shown above.
Where I'm getting stuck (and the real point of the exercise from a personal
development perspective) is how to store this data. Is there an existing
collection type that lends itself to this hierarchical structure, or need I
roll my own? If so, what would be suitable underlying collection types, and
how would they interact? How would I handle sorting?
Any comments or advice would be very much appreciated, as I would like to
understand the optimal manner in whcih to approach this sort of problem.
Many thanks in advance!