Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ANN: DumpNS utility (was Re: C# Example)

Doh! Mental note: Test URL from _outside_ firewall before posting!

Sorry about that - it's working now (really!)

--Peter

"Peter Drayton" <peter@razorsoft.com> wrote:
>Hi all,
>
>I whipped up a little utility to dump all of the namespaces in one or more
>assemblies. This should give Greg exactly what he asked for. Basically,
you
>can get a human-readable output listing all of the namespaces in each
>assembly, or a CSV-formatted dump suitable for pulling into Excel and using
>as a cross-reference.
>
>It's available at http://www.razorsoft.net (the site's barren right now
>apart from DumpNS, but there's more on the way once I clean up some more
of
>the stuff I've been playing with.
>I've included source in case anyone's interested, but it was hacked out
in
>about 30 minutes, so it's basically worth what you just paid for it!
>
>--Peter
>
>"Oscar" <consulBanana@hotmail.com> wrote in message
>news:39999fc3$1@news.dev-archive.com...
>> I've been looking for the same thing, actually. So far these are the
only
>> tools I've seen:
>>
>> 1)those .chm files
>> 2)ildasm.exe (in %sdk root%/bin)(takes a .dll apart for you - kind of
the
>> inverse fn)
>> 3)WinCV.exe (same place)
>> 4)the example(can't remember what it is 'cause I couldn't get it to
>compile
>> 5)the "random include" method mentioned previously
>>
>> WinCV is probably one of your best options, though I couldn't get it to
>load
>> up just now(I need to raid one of the other office machines for memory
>;) )
>> It probably wouldn't be too hard to extend that program or write a similar
>> one, but I probably won't make it to winForms for a while now.
>>
>> "Greg Huber" <ghuber@NOSPAMPLEASEhcr-manorcare.com> wrote in message
>> news:39998278$1@news.dev-archive.com...
>> > cpref.chm seems to have everything listed, but what would really be
nice
>> is
>> > a document that has a one-to-one mapping of namespace to assembly for
>> > example:
>> >
>> > System.Data.ADO -- System.Data.dll
>> > System.Net -- System.Net.dll
>> > System.Runtime.InteropServices -- mscorlib.dll
>> >
>> > or even:
>> > System.Data.DLL
>> > --List of namespaces
>> >
>> > System.Net.dll
>> > --List of namespaces
>> >
>> > Maybe there is and I haven't found it yet.. :)
>> >
>> > "Oscar" <consulBanana@hotmail.com> wrote in message
>> > news:39997af1$1@news.dev-archive.com...
>> > > All the reference I wrote about should have come with your sdk. It's
>> the
>> > > sdkstart.chm file buried in the sdk folder under docs. If you're
>> familiar
>> > > with the general layout of MSDN stuff, it'll be a cinch. If you're
>> > > not...whoa. When I was introduced to MSDN for the first time, I
>> couldn't
>> > > find the same article twice for about three months :)
>> > >
>> > > "Greg Huber" <ghuber@NOSPAMPLEASEhcr-manorcare.com> wrote in message
>> > > news:39982f62@news.dev-archive.com...
>> > > > Yeah, playing around always seems to be the best way to figure it
>out!
>> > > I'll
>> > > > agree on that one :) I wonder what harm is done including extra
>> > namespaces
>> > > > when you don't need them, maybe just a bigger EXE? (ie, similar
to
>> C++).
>> > > > I'll have to dig up the documentation on the reference that you're
>> > > > mentioning so I don't have to be lazy.
>> > > >
>> > > > Thanks for the advice!
>> > > >
>> > > > Greg
>> > > >
>> > > >
>> > > >
>> > > > "Oscar" <consulBanana@hotmail.com> wrote in message
>> > > > news:39982ac4$1@news.dev-archive.com...
>> > > > > You'll notice that a lot of people have been having problems with
>> > > > > compilations, especially on examples. I posted a similar problem
>> with
>> > > > XML,
>> > > > > but the revelation hit me a couple of hours later. When you're
>> > > compiling
>> > > > an
>> > > > > example, check out the listing in the reference. Someone who
>knows
>> a
>> > > > little
>> > > > > more about assemblies than me could add some detail here, but
the
>> name
>> > > of
>> > > > > the dll you need to include will be listed in the Requirements
>> section
>> > > of
>> > > > > the class members. For example, if you grab one of the classes
>> under
>> > > > > System.Net, you'll see System.net.dll listed as the required
>> assembly.
>> > > > >
>> > > > > Alternatively, you can do like I did the first time: Go to
>%system
>> > > > > root%/ComPlus/v2000.14.1812, and start including relavent looking
>> dlls
>> > > > until
>> > > > > it compiles :)
>> > > > >
>> > > > > "Greg Huber" <ghuber@NOSPAMPLEASEhcr-manorcare.com> wrote in
>message
>> > > > > news:3997e97a$1@news.dev-archive.com...
>> > > > > > I found the code sample below on the microsoft web site that
>> allows
>> > > you
>> > > > to
>> > > > > > create a simple TCP listener with c#:
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>http://msdn.microsoft.com/library/default.asp?URL=/library/techart/PDC_websv
>> > > > > > c.htm
>> > > > > >
>> > > > > > But when I compile I get this error:
>> > > > > >
>> > > > > > Server.cs(2,14): error CS0234: The type or namespace name 'Net'
>> does
>> > > not
>> > > > > > exist i
>> > > > > > n the class or namespace 'System'
>> > > > > > Server.cs(3,14): error CS0234: The type or namespace name 'Net'
>> does
>> > > not
>> > > > > > exist i
>> > > > > > n the class or namespace 'System'
>> > > > > >
>> > > > > > Is there something I'm not doing right? How do I get the Net
>> > classes?
>> > > > (Did
>> > > > > > they not come with the NGWS preview)?
>> > > > > >
>> > > > > > Thanks,
>> > > > > > Greg
>> > > > > >
>> > > > > > /* Begin Code */
>> > > > > > using System;
>> > > > > > using System.Net;
>> > > > > > using System.Net.Sockets;
>> > > > > > using System.Text;
>> > > > > >
>> > > > > > class Server
>> > > > > > {
>> > > > > > public static void Main()
>> > > > > > {
>> > > > > > DateTime now;
>> > > > > > String strDateLine;
>> > > > > > Encoding ASCII = Encoding.ASCII;
>> > > > > >
>> > > > > > // listen on port 23
>> > > > > > TCPListener tcpl = new TCPListener(23);
>> > > > > >
>> > > > > > tcpl.Start();
>> > > > > >
>> > > > > > Console.WriteLine("Waiting for clients to connect");
>> > > > > > Console.WriteLine("Press Ctrl+c to Quit...");
>> > > > > >
>> > > > > > while (true)
>> > > > > > {
>> > > > > > // Accept will block until someone connects
>> > > > > > Socket s = tcpl.Accept();
>> > > > > >
>> > > > > > // Get the current date and time then concatenate it
>> > > > > > // into a string
>> > > > > > now = DateTime.Now;
>> > > > > > strDateLine = now.ToShortDateString() + "
" +
>> > > > > > now.ToLongTimeString();
>> > > > > >
>> > > > > > // Convert the string to a Byte Array & send
>it
>> > > > > > Byte[] byteDateLine =
>> > > > > > ASCII.GetBytes(strDateLine.ToCharArray());
>> > > > > > s.Send(byteDateLine, byteDateLine.Length, 0);
>> > > > > > Console.WriteLine("Sent " + strDateLine);
>> > > > > > }
>> > > > > > }
>> > > > > > }
>> > > > > >
>> > > > > > /* End Code */
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>
[11221 byte] By [Peter Drayton] at [2007-11-9 18:21:37]