I have a suggestion. All collections should support the Composite pattern. I've had many situations where I've wanted to specify multiple filesets or divide up the namespace imports and then collect them up where they are used.
Suppose I have three different namespace imports (N1, N2, and N3) and two projects (P1 and P2). P1 requires N1 and N2. P2 requires N1 and N3. Clearly I would define N1 as a global namespace import and each project would "define" the extra imports it requires. If this capability already exists then I'm happy. A hint to how this is accomplished would be appreciated in that case. --Edwin -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gert Driesen Sent: Thursday, January 27, 2005 11:58 AM To: 'Nant Dev' Cc: '[EMAIL PROTECTED] Sourceforge. Net' Subject: [nant-dev] Support for global collections / referencable types Hi, I've added a possible implementation to CVS that allows us to support global collections. To summarize implementation : - modify the collection class to derive from a new DataTypeCollectionBase - have it implement Ilist - add an ElementName attribute (with the name of the global type) - add a BuildElement attribute to the Add method Classes that use the collection should have both a getter and a setter for the collection to allow the referenced type to be set. That last part is what I have a problem with: I'd really like to have an implementation that avoids the need for having setters on collection based properties. Anyone have any bright ideas on this or does anyone have time to give this some thought ? How exactly has support for referencable types been implemented in Ant ? Any lessons we can learn from them ? As a example / proof of concept, I've transformed the <imports> child element that is used in <vbc>, <script> and <asminfo> into a global type called <namespaceimports>. This allows the following build fragment to be used: <project name="whatever" default="build"> <namespaceimports id="test.imports"> <import namespace="System" /> <import namespace="System.Data" /> <import namespace="System.Windows.Forms" /> </namespaceimports> <target name="build"> <vbc ...> <imports refid="test.imports" /> ... </vbc> </target> </project> Any feedback on the implementation is greatly appreciated ! Gert ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers