PC Review


Reply
Thread Tools Rate Thread

Alphabetically ordering classes in large cs file

 
 
ndawson@hotmail.com
Guest
Posts: n/a
 
      23rd Jun 2008
Hi all

I use the XSD utility provided with visual studio 2008 to convert xsd
files into a c# project file, we then call this DLL from an
application written in Delphi to provide read/write capability. To
fully get this working we need to manually modify the .cs file that is
generated adding in interface definitions so this managed dll can be
seen by COM.

This works fine until the xsd files are updated.Changes of about 5% of
the xsd files result in totally different cs files being created,
trying to perform a file comparison on current and previous versions
of the generated .cs file is near impossible even though only small
parts of the xsd files have changed. This leaves me with the job of
having to manually go though the new CS file and include all of the
interfaces that were previoulsy there.

I was thinking that there might be a utility which could process a .cs
file and reorder the classes definied within alphabetically thereby
allowing me to see the actual changes more clearly.

Perhaps someone out there could point me in the right direction or
give me an alternative solution to my problem?
 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      23rd Jun 2008
I wonder if you couldn't do this better using partial classes? i.e.
leave the tool-generated file alone, and create a *separate* .cs file
for your additions. You can add attributes, interface implememntations,
and members (fields, properties, methods etc) to the classes this way.
The only thing you can't do cleanly is add attributes to individual
methods declared in the generated .cs file.

Marc
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how could I ordering alphabetically a column? mermontes Microsoft Excel Misc 2 18th Dec 2009 03:14 PM
Re-ordering Pages in Large Document =?Utf-8?B?Q2hlcmk=?= Microsoft Word Document Management 2 1st Nov 2006 04:29 PM
Very large arrays and .NET classes Peter Duniho Microsoft C# .NET 10 4th Oct 2006 07:09 AM
Very large arrays and .NET classes Peter Duniho Microsoft Dot NET Framework 10 4th Oct 2006 07:09 AM
Passing large amounts of data between classes/functions =?Utf-8?B?TWFjY2E=?= Microsoft C# .NET 11 24th Jan 2006 12:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 AM.