By tag: sharpregion
0
kicks
A generic Dispenser class
Feeling ashamed for keeping your clients waiting until your code finally constructs your heavy classes/forms?
This utility instantiates objects in a background thread and aspires to always be "full" to the capacity requested. Useful in cases the object being constructed uses many resour...
0
kicks
Give back to your testing framework
Can there be code reuse in testing classes? Is code coverage the only measurement we have for test efficiency? Should our testing framework test design and meta-code as well as functionality? Use this test classes base-class to test some things you probably haven't tested before.
0
kicks
Searching for derived types in an assembly
Sometimes we need to find all classes or interfaces that derive a certain Type. There are several possible scenarios for this kind of search - For instance, if we are trying to load a plug-in assembly at runtime and wish to initialize all the classes that implement the IPluginBase interface. Using t...
0
kicks
A C# fluent repeater
A fully-featured fluent class used for repeating method calls, handle exceptions, callbacks and more...
Just plug-and-play and start repeating stuff!
0
kicks
Enumerating the GAC using 'foreach'
Ever tried enumerating the Global assemblies cache?
Now it has become easier.
0
kicks
Using the Task Scheduler for saving memory
A Wallpaper Randomizer in C# can be a good example for using the Task Scheduler in windows for saving memory.
0
kicks
C# singleton snippet
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.
0
kicks
[Flags] and you - Take 2
Comparing enum values can sometime leave your code a little messy and inaccessible. Using this small EnumHelper extension methods class, your code should be left a little more readable and fluent.
0
kicks
Debugging can screw things up
Using the 'DebuggerBrowsable' attribute to avoid debugging-misbehavior.
0
kicks
Beware of the mysterious params in C#!
The 'params' keyword may behave different than you might think it should!
This one is a must for every C# developer out there!
0
kicks
Fun with Continuous-Integration (Really!)
Introducing: BILTONS.
Biltons are actually sound files that are played by the build-machine, according to the developer that made the last changes ("Build-Tones").
It really adds a lot of fun to the dev environment.
0
kicks
Events, Generics and Extension Methods
See some interesting new methods to deal with events and EventHandlers.