Error!
Success!

By tag: Singleton

showing:  of
0
kicks

Are Static Variables in Base Classes Shared In Derived Sub Classes?  (Unpublished)

Development Gotchas - Something that caught me out recently is the behavior of static variables in C# classes, and how they behave in derived classes. Also how does this differ with static variables in Generic<T> base classes? Finally, we use this understanding to create a generic base Singlet...


Kicked By:
Drop Kicked By:
0
kicks

Design Patterns - Generic Singleton Pattern  (Unpublished)

A little follow up from yesterday ’s Singleton Pattern, where I asked for some help on how you would approach a generic singleton. With the help of Andrew Stevenson and ExNihilo, we came up with the following Generic Singleton Pattern.


Kicked By:
Drop Kicked By:
0
kicks

Design Patterns - Singleton Pattern  (Unpublished)

Today we’ll have a look at a well known pattern, the Singleton Pattern. Most people have already heard about this one. The definition: “Ensure a class has only one instance and provide a global point of access to it.“


Kicked By:
Drop Kicked By:
0
kicks

Static Singletons for ASP.NET Controls  (Unpublished)

When building generic ASP.NET Server controls that also provide a sort of API service to other custom controls or page level code, it's often necessary to ensure that only a single instance of a control exists, and that only that single instance of this control or component can be accessed in the co...


Kicked By:
Drop Kicked By:
0
kicks

C# - Singleton Pattern vs. Static Classes  (Unpublished)

Problem: Store some common data in a singleton or static class about your program in an object array, which you store in a class. It saves state between usages and stores some caches, and must be initialized only once and shared in many code locations. Making a new object each time would be expensiv...


Kicked By:
Drop Kicked By:
0
kicks

Singletons are boring, hence factor out the concern (with a twist)  (Unpublished)

The umpteenth pattern to singletons...I know you've seen it by the gross ton. Anyway, I just wanted to add a twist with the implicit operator and here you find the result.


Kicked By:
Drop Kicked By:
0
kicks

C# singleton snippet  (Unpublished)

I've decided to stop the copy-paste madness. Not that I use singletons so very often, but still - It never changes, so lets use a snippet.


Kicked By:
Drop Kicked By:
0
kicks

Singleton C# code snippet  (Unpublished)

A complete documented and attributed singleton C# code snippet. Highly recommended. 5 key-strokes for a singleton.


Kicked By:
Drop Kicked By:
0
kicks

What's wrong with this code? #1 - Discussion  (Unpublished)

Discussion over the thread-safe singleton snippet presented in "What's wrong with this code? #1"


Kicked By:
Drop Kicked By:
0
kicks

How to Use the Singleton Pattern and the Garbage Collector to Manage a  (Unpublished)

Here's an easy to minimize the overhead of an expensive resource, such as an image or a network connection, using the singleton pattern and some simple hints to the garbage collector.


Kicked By:
Drop Kicked By:
0
kicks

When is a singleton not a singleton? Serialization!  (Unpublished)

How to prevent a singleton class to be instantiated multiple times when deserialized.


Kicked By:
Drop Kicked By:
0
kicks

.NET interview question - when is a singleton not a singleton  (Unpublished)

A tricky interview question about duplicated singleton instances.


Kicked By:
Drop Kicked By:
0
kicks

ASP.NET Singleton-per-Page pattern  (Unpublished)

Implementing a singleton-per-page ASP.NET pattern.


Kicked By:
Drop Kicked By:
0
kicks

Design Patterns: Thoughts on the Singleton Pattern  (Unpublished)

Thoughts on the Singleton Pattern (Executive summary: Don't!)


Kicked By:
Drop Kicked By:
0
kicks

.NET Remoting Use-Cases and Best Practices  (Unpublished)

Most people who don't know me personally assume that I value .NET Remoting above all other means of developing distributed applications. They might also assume that I'll use Remoting as a catch-all solution to any distributed application.


Kicked By:
Drop Kicked By: