That's what I thought. I tried using a static constructor but you have
to explicitly create an object to get it to fire.  I'm looking for
something that will automatically run the code to register  my prefix
without the user of the lib having to do anything.  Their first line of
code should be something like

Wr = WebRequest.Create("blah blah url");

Is there something at the assembly level or an attribute that I could
use to automatically fire some code at app startup?

Reggie

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Richard Birkby
> Sent: Friday, May 24, 2002 4:21 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] Automatically executing code
>
> Can you use a static constructor somewhere?
> System.Net registers HTTP, HTTPS and FILE the first time the prefix
list
> is
> used *.
>
>
> Richard
> * It uses a double check locking idiom without a volatile keyword...
>
> > -----Original Message-----
> > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of
> > Reggie Burnett
> > Sent: 24 May 2002 01:17
> > To: [EMAIL PROTECTED]
> > Subject: [DOTNET] Automatically executing code
> >
> >
> > I'm implementing a webrequest/webresponse pair and the docs say that
you
> > have to call WebRequest.RegisterPrefix to register your creator
object
> > with that prefix.  What is the best way to make that call
automatically
> > without the user of the library needing to explicitly do that?
> >
> > Reggie
> >
> > You can read messages from the DOTNET archive, unsubscribe from
DOTNET,
> or
> > subscribe to other DevelopMentor lists at
http://discuss.develop.com.
>
> You can read messages from the DOTNET archive, unsubscribe from
DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to