Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-18 Thread Frank Hileman
tatic constructors are thread-safe. Regards, Frank Hileman Prodige Software Corporation - Original Message - From: "Peter Lillevold" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 18, 2002 5:56 AM Subject: Re: [ADVANCED-DOTNET] Singleton pattern > Actually,

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-18 Thread Richard Birkby
On Behalf Of Stefan > Avramtchev > Sent: 18 June 2002 13:47 > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Singleton pattern > > > I think the type contructors is thread safe. > > How otherwise is the framework guarding this rule if not by locking some > internal obj

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-18 Thread Peter Lillevold
. juni 2002 14:47 To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Singleton pattern I think the type contructors is thread safe. How otherwise is the framework guarding this rule if not by locking some internal object (not the being-initialised class ofcourse) in order to guarantee that only

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-10 Thread Frank Hileman
Static methods provide no more encapsulation than instance methods. Static methods are less flexible because they cannot be virtual. I don't see any advantage. The property which retrieves the Singleton instance must be static. If the Singleton has no data at all, then it makes sense to just use

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-06 Thread franklin gray
http://www.aspalliance.com/aldotnet/examples/translate.aspx -Original Message- From: Shawn Wildermuth [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 12:30 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Singleton pattern What tool did you use to go from C# to VB

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-06 Thread Brad Abrams
- From: Frank Hileman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 8:20 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Singleton pattern Hello Brad Adams, Why do you have all this locking code? A static constructor is already thread-safe. From C# spec: "The static constr

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-06 Thread Shawn Wildermuth
: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Singleton pattern > > > Brian: > > I ran this through the C# to Vb web tool and below is what I > got (After I took out the comments). > > Questions: > 1) What is _value? > 2) How is it different from the bottom cl

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-06 Thread Frank Hileman
Hello Brad Adams, Why do you have all this locking code? A static constructor is already thread-safe. From C# spec: "The static constructor for a class executes at most one time during a single program instantiation" You can read messages from the Advanced DOTNET archive, unsubscribe from Advan

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-06 Thread Brad Abrams
that the assignment to _value and any writes inside the Singleton constructor complete before the instance can be accessed ..brad -Original Message- From: Ian Griffiths [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 5:57 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-04 Thread Greg Reinacker
e variable). -Mike http://staff.develop.com/woodring http://www.develop.com/devresources - Original Message - From: "Greg Reinacker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 03, 2002 5:09 PM Subject: Re: [ADVANCED-DOTNET] Singleton pattern > &g

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-04 Thread Mike Woodring
riable). -Mike http://staff.develop.com/woodring http://www.develop.com/devresources - Original Message - From: "Greg Reinacker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 03, 2002 5:09 PM Subject: Re: [ADVANCED-DOTNET] Singleton pattern

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-04 Thread Jonni Faiga
Hi, Given an exe that contains multiple services, with LoaderOptimization of SingleDomain, I would presume that each service would be created in separate AppDomain, and they would access to separate Singletons. But this is not the case! Below is code that shows that they access the *same* Singlet

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-03 Thread Shawn Wildermuth
> -Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]] On Behalf Of Noam Arbel > Sent: Saturday, June 01, 2002 12:39 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Singleton pattern > > > I think it is usefull to

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-02 Thread Noam Arbel
I think it is usefull to understand when SuppressFinalize() should be used. If you look at code like this: public class UseResource { public void OpenResource() { // open a resource for use } public void UseResource() { // Do some stuff with the resource } public void Clos

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-02 Thread Lars Jonsson
/default.asp?url=/library/en-us/dnbda/html/ singletondespatt.asp -- Lars > -Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]]On Behalf Of Jonni Faiga > Sent: 31 May 2002 10:38 > To: [EMAIL PROTECTED] > Subject: [ADVANCED-DOTNET]

Re: [ADVANCED-DOTNET] Singleton pattern

2002-05-31 Thread Bill Conroy
Conroy [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 31, 2002 8:02 AM >To: [EMAIL PROTECTED] >Subject: Re: [ADVANCED-DOTNET] Singleton pattern > > >This is Bill, and I'm quite sure I'm right. Actually, I'm positive. And >Bajaj is correct also. It's all about the sta

Re: [ADVANCED-DOTNET] Singleton pattern

2002-05-31 Thread Brent E. Rector
Wise Owl Demeanor for .NET - an obfuscation utility http://www.wiseowl.com/Products/Products.aspx -Original Message- From: franklin gray [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 8:04 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Singleton pattern The rema

Re: [ADVANCED-DOTNET] Singleton pattern

2002-05-31 Thread franklin gray
if this is the problem (I don't think it is though). -Original Message- From: Bill Conroy [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 8:02 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Singleton pattern This is Bill, and I'm quite sure I'm right. Actual